/* ========================================
   LANGUAGE SWITCHER — Navbar Widget
   ======================================== */

.lang-switcher {
    display: inline-flex;
    align-items: center;
    position: relative;
    background: rgba(111, 111, 255, 0.06);
    border: 1px solid rgba(111, 111, 255, 0.12);
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
    height: 36px;
    flex-shrink: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lang-switcher:hover {
    border-color: rgba(111, 111, 255, 0.3);
    box-shadow: 0 0 12px rgba(111, 111, 255, 0.15);
}

/* Sliding indicator behind active button */
.lang-indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(41, 85, 255, 0.35), rgba(154, 77, 255, 0.25));
    box-shadow: 0 0 12px rgba(41, 85, 255, 0.3), inset 0 0 6px rgba(154, 77, 255, 0.15);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}

/* Each language button */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.03em;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    transform: scale(1.03);
}

.lang-btn.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(154, 77, 255, 0.5);
}

/* Flag emoji sizing */
.lang-flag {
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* Label text */
.lang-label {
    display: inline;
}

/* ────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────── */

@media (max-width: 768px) {
    .lang-switcher {
        height: 32px;
        border-radius: 10px;
        padding: 2px;
    }

    .lang-btn {
        padding: 3px 8px;
        font-size: 0.78rem;
        gap: 4px;
    }

    .lang-flag {
        font-size: 0.95rem;
    }

    .lang-indicator {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .lang-switcher {
        height: 30px;
    }

    .lang-btn {
        padding: 2px 6px;
        font-size: 0.75rem;
    }

    /* Hide text labels on very small screens, keep flags */
    .lang-label {
        display: none;
    }
}