/* =====================================================
   App Language Switcher - Sidebar Style
   ===================================================== */

/* Auth page language switcher */
.auth-lang-switcher {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 6px;
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 5px;
    z-index: 100;
}

.auth-lang-switcher .lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.auth-lang-switcher .lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.auth-lang-switcher .lang-option.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.auth-lang-switcher .lang-flag {
    font-size: 13px;
    font-weight: 600;
}

/* Auth page language switcher - inline inside card */
.auth-lang-switcher-inline {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-lang-switcher-inline .lang-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
}

.auth-lang-switcher-inline .lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.auth-lang-switcher-inline .lang-option.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
}

.auth-lang-switcher-inline .lang-flag {
    font-size: 16px;
    line-height: 1;
}

.auth-lang-switcher-inline .lang-name {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Language switcher in sidebar */
.sidebar-lang-switcher {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    margin: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.sidebar-lang-switcher .lang-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
}

.sidebar-lang-switcher .lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-lang-switcher .lang-option.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    color: #fff;
}

.sidebar-lang-switcher .lang-flag {
    font-size: 16px;
    line-height: 1;
}

/* Collapsed sidebar - stack vertically */
.sidebar.collapsed .sidebar-lang-switcher {
    flex-direction: column;
    padding: 4px 8px;
    margin: 4px 8px;
}

.sidebar.collapsed .sidebar-lang-switcher .lang-option {
    padding: 6px;
}

.sidebar.collapsed .sidebar-lang-switcher .lang-name {
    display: none;
}

/* =====================================================
   Dropdown Style (for header placement)
   ===================================================== */

.lang-dropdown {
    position: relative;
    z-index: 1000;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.lang-toggle .globe-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.lang-toggle .chevron-icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.lang-dropdown.open .lang-toggle .chevron-icon {
    transform: rotate(180deg);
}

.lang-current {
    min-width: 20px;
    text-align: center;
}

/* Dropdown Menu */
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e1e2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu .lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', -apple-system, sans-serif;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.lang-menu .lang-option:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #fff;
}

.lang-menu .lang-option.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #fff;
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-name {
    flex: 1;
}

.lang-option .check-icon {
    width: 14px;
    height: 14px;
    opacity: 0;
    color: #667eea;
    transition: opacity 0.15s ease;
}

.lang-option.active .check-icon {
    opacity: 1;
}

/* =====================================================
   Mobile responsive
   ===================================================== */

@media (max-width: 768px) {
    .sidebar-lang-switcher {
        padding: 6px 8px;
        margin: 6px 8px;
    }

    .sidebar-lang-switcher .lang-option {
        padding: 6px 8px;
        font-size: 12px;
    }

    .lang-toggle {
        padding: 6px 10px;
        font-size: 12px;
    }
}
