/* ===== MODERNÝ PROFESIONÁLNY JAZYKOVÝ PREPÍNAČ ===== */
.language-switcher {
    position: relative;
    margin: 0 20px;
    display: block !important;
    visibility: visible !important;
    z-index: 9999;
}

.language-dropdown {
    position: relative;
}

.language-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 100px;
    justify-content: space-between;
}

.language-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.language-btn .fas {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-dropdown.open .language-btn .fas {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    backdrop-filter: blur(20px);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.language-options.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #374151;
    text-decoration: none;
    gap: 12px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.language-option:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
}

.language-option.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
}

.language-option.active::after {
    content: '✓';
    position: absolute;
    right: 18px;
    font-size: 16px;
    font-weight: bold;
}

.flag-icon {
    width: 24px;
    height: 18px;
    display: inline-block;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* ===== ŠTÝLY PRE UMIESTNENIE V USER-INFO ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info .language-switcher {
    margin: 0;
    position: relative;
}

.user-info .language-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 80px;
    border-radius: 6px;
}

.user-info .language-btn .flag-icon {
    width: 20px;
    height: 15px;
}

.user-info .language-options {
    right: 0;
    left: auto;
    top: calc(100% + 6px);
    min-width: 180px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ===== VLAJKY KRAJÍN - OBRÁZKY ===== */
.flag-sk { background-image: url('/static/images/flags/sk.png'); }
.flag-en { background-image: url('/static/images/flags/us.png'); }
.flag-de { background-image: url('/static/images/flags/de.png'); }
.flag-fr { background-image: url('/static/images/flags/fr.png'); }
.flag-es { background-image: url('/static/images/flags/es.png'); }
.flag-it { background-image: url('/static/images/flags/it.png'); }

/* ===== TMAVÝ REŽIM PODPORA ===== */
@media (prefers-color-scheme: dark) {
    .language-options {
        background: #1f2937;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .language-option {
        color: #d1d5db;
    }
    
    .language-option:hover {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        color: #f9fafb;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .language-switcher {
        margin: 0 10px;
    }
    
    .language-btn {
        padding: 8px 10px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .language-options {
        min-width: 160px;
    }
    
    .user-info {
        gap: 12px;
    }
    
    .user-info .language-btn {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 60px;
    }
    
    .user-info .language-btn .flag-icon {
        width: 18px;
        height: 14px;
    }
}

/* ===== FOKUS ACCESSIBILITY ===== */
.language-btn:focus,
.language-option:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ===== LOADING STATE ===== */
.language-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.language-btn.loading .fas {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}