/* Premium Language Switcher - Steve Jobs Style */
/* Minimalist, elegant, with obsessive attention to detail */

.language-switcher {
    display: inline-flex;
    align-items: center;
    position: relative;
    height: 32px;
    margin-right: 24px;
    /* Remove old pill background */
    background: none;
    padding: 0;
    border-radius: 0;
}

/* The minimalist approach - just text, no containers */
.lang-btn {
    font-size: 14px;
    font-weight: 500;
    color: #86868b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    position: relative;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: #1d1d1f;
}

.lang-btn.active {
    color: #7C3AED;
    font-weight: 600;
}

/* The divider - minimal but present */
.lang-divider {
    width: 1px;
    height: 16px;
    background: #d2d2d7;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Premium toggle - inspired by iOS */
.lang-toggle {
    display: none; /* Hide the toggle, use text-only approach */
}

/* Alternative premium design - capsule style */
.language-switcher-premium {
    display: inline-flex;
    align-items: center;
    position: relative;
    height: 28px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 2px;
    margin-right: 24px;
}

.language-switcher-premium .lang-option {
    position: relative;
    padding: 0 14px;
    height: 24px;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: #86868b;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.language-switcher-premium .lang-option:hover {
    color: #1d1d1f;
}

.language-switcher-premium .lang-option.active {
    color: #1d1d1f;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Sliding indicator - the Steve Jobs touch */
.language-switcher-premium .lang-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 36px;
    height: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.language-switcher-premium[data-lang="es"] .lang-indicator {
    transform: translateX(36px);
}

/* Ultra-minimalist version - just a slash */
.language-switcher-minimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 24px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.language-switcher-minimal .lang-option {
    color: #86868b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 2px;
    transition: color 0.2s ease;
    position: relative;
    text-transform: uppercase;
}

.language-switcher-minimal .lang-option:hover {
    color: #1d1d1f;
}

.language-switcher-minimal .lang-option.active {
    color: #1d1d1f !important;
    font-weight: 700 !important;
}

/* Underline animation for active state */
.language-switcher-minimal .lang-option::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #7C3AED;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-switcher-minimal .lang-option.active::after {
    transform: scaleX(1);
}

.language-switcher-minimal .lang-slash {
    color: #d2d2d7;
    user-select: none;
}

/* Mobile - even more minimal */
@media (max-width: 768px) {
    .navbar .language-switcher-minimal,
    .nav-wrapper .language-switcher-minimal,
    #languageSwitcher {
        position: fixed !important;
        top: 18px !important;
        transform: none !important;
        right: 90px !important;
        left: auto !important;
        z-index: 10000 !important;
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 6px 10px;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin: 0 !important;
        will-change: auto !important;
    }

    .language-switcher-minimal .lang-option {
        color: #86868b;
        background: none;
        border: none;
        padding: 2px 4px;
        font-weight: 500;
        letter-spacing: 0.02em;
    }

    .language-switcher-minimal .lang-option.active {
        color: #7C3AED !important;
        font-weight: 700 !important;
    }

    .language-switcher-minimal .lang-slash {
        color: #d2d2d7;
        font-weight: 300;
    }

    /* Hide other desktop versions */
    .language-switcher,
    .language-switcher-premium {
        display: none !important;
    }
}

/* Smooth state transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus states for accessibility */
.lang-option:focus-visible,
.lang-btn:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Dark mode support - subtle adjustments */
@media (prefers-color-scheme: dark) {
    .language-switcher-premium {
        background: rgba(255, 255, 255, 0.06);
    }

    .language-switcher-premium .lang-option.active {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .lang-btn {
        color: #98989d;
    }

    .lang-btn.active {
        color: #A78BFA;
    }

    .language-switcher-minimal .lang-option {
        color: #98989d;
    }

    .language-switcher-minimal .lang-option.active {
        color: white;
    }

    .language-switcher-minimal .lang-option.active::after {
        background: #A78BFA;
    }
}