/**
 * Language Switch Component Styles
 * v20241224
 */

/* ============================================
   LANGUAGE SWITCH - Dashboard Header
   ============================================ */
.language-switch {
    position: relative;
    margin-right: 8px;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--gray-200, #E5E7EB);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-600, #4A5565);
    transition: all 0.15s ease;
}

.language-btn:hover {
    background: var(--gray-50, #F9FAFB);
    border-color: var(--gray-300, #D1D5DB);
}

.lang-code {
    font-weight: 500;
    letter-spacing: 0.02em;
    font-size: 13px;
}

.lang-arrow {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.2s ease;
}

.language-switch.open .lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.language-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: white;
    border: 1px solid var(--gray-200, #E5E7EB);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
    animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-700, #374151);
    text-align: left;
    transition: background 0.1s ease;
}

.lang-option:hover {
    background: var(--gray-50, #F9FAFB);
}

.lang-option:first-child {
    border-radius: 7px 7px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 7px 7px;
}

.lang-option.active {
    background: var(--gray-100, #F3F4F6);
    font-weight: 500;
}



/* ============================================
   LANGUAGE SWITCH - Widget Header (Compact)
   ============================================ */
.widget-lang-switch {
    position: relative;
}

.widget-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: background 0.2s;
}

.widget-lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.widget-lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 130px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.widget-lang-dropdown.show {
    display: block;
    animation: dropdownFade 0.15s ease;
}

.widget-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-700, #374151);
    text-align: left;
    transition: background 0.1s ease;
}

.widget-lang-option:hover {
    background: var(--gray-50, #F9FAFB);
}

.widget-lang-option.active {
    background: var(--gray-100, #F3F4F6);
    font-weight: 500;
}

.widget-lang-btn .lang-code {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.02em;
}


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .language-btn {
        padding: 6px 8px;
    }

    .lang-arrow {
        display: none;
    }

    .language-dropdown {
        right: -8px;
    }
}
