/* ============================================================
   Sentinel Family – Language Switcher Styles
   ============================================================ */

/* ---- Switcher container ---- */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ---- Toggle button ---- */
.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: transparent;
    border: 1.5px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700, #374151);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    white-space: nowrap;
    line-height: 1;
}

.lang-switcher-btn:hover {
    border-color: var(--primary, #3b82f6);
    color: var(--primary, #3b82f6);
    background: rgba(59, 130, 246, 0.04);
}

.lang-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.lang-switcher.open .lang-chevron {
    transform: rotate(180deg);
}

/* ---- Dropdown panel ---- */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 120px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---- Language option buttons ---- */
.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700, #374151);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--dark, #0f172a);
}

.lang-option.active {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary, #3b82f6);
    font-weight: 600;
}

.lang-flag {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.lang-code {
    letter-spacing: 0.04em;
}

/* ============================================================
   Mobile: language switcher inside the expanded nav drawer
   ============================================================ */
@media (max-width: 768px) {
    .lang-switcher {
        /* In mobile, push it to its own row with some top spacing */
        width: 100%;
        justify-content: flex-start;
        margin-top: 4px;
    }

    .lang-switcher-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .lang-dropdown {
        /* On mobile, drop down below the button within the nav drawer */
        position: static;
        box-shadow: none;
        border: 1px solid var(--gray-200, #e5e7eb);
        border-radius: 10px;
        margin-top: 4px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        display: none;
        min-width: 100%;
    }

    .lang-switcher.open .lang-dropdown {
        display: flex;
    }

    .lang-option {
        padding: 10px 12px;
        font-size: 14px;
    }
}
