/* ══════════════════════════════════════════════════════
   i18n — Language toggle + banner
   ══════════════════════════════════════════════════════ */

/* ── toggle button ──────────────────────────────────── */
#lang-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 3, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(134, 85, 246, 0.35);
    border-radius: 8px;
    padding: 5px 8px;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 5px;
    transition: color 0.18s ease, background 0.18s ease;
    line-height: 1;
}

.lang-btn:hover {
    color: #C084FC;
}

.lang-btn.active {
    color: #fff;
    background: #8655F6;
}

.lang-sep {
    color: rgba(255, 255, 255, 0.18);
    font-size: 0.65rem;
    user-select: none;
    padding: 0 1px;
}

/* ── suggestion banner ──────────────────────────────── */
#i18n-banner {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(130%);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(8, 4, 18, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(134, 85, 246, 0.45);
    border-radius: 12px;
    padding: 11px 16px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(134, 85, 246, 0.18);
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

#i18n-banner.visible {
    transform: translateX(-50%) translateY(0);
}

.i18n-banner-text {
    opacity: 0.9;
}

.i18n-banner-btn {
    background: #8655F6;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background 0.18s ease;
    white-space: nowrap;
}

.i18n-banner-btn:hover {
    background: #C084FC;
}

.i18n-banner-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.18s ease;
}

.i18n-banner-close:hover {
    color: #fff;
}

/* ── mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
    #lang-switch {
        top: 14px;
        right: 14px;
    }

    #i18n-banner {
        width: calc(100% - 32px);
        white-space: normal;
        flex-wrap: wrap;
        bottom: 16px;
        gap: 8px;
    }
}

/* ── theme toggle ────────────────────────────────────── */
#theme-switch {
    position: fixed;
    top: 20px;
    right: 120px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 3, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(134, 85, 246, 0.35);
    border-radius: 8px;
    padding: 5px 8px;
}

.theme-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
    line-height: 1;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 5px;
    transition: color 0.18s ease, background 0.18s ease;
}

.theme-btn:hover {
    color: #C084FC;
}

.theme-btn[aria-pressed="true"] {
    color: #fff;
    background: #8655F6;
}

.theme-sep {
    color: rgba(255, 255, 255, 0.18);
    font-size: 0.65rem;
    user-select: none;
    padding: 0 1px;
}

@media (max-width: 768px) {
    #theme-switch {
        top: 14px;
        right: 104px;
    }
}

/* ── light mode overrides for toggle pills ───────────── */
[data-theme="light"] #lang-switch {
    background: rgba(244, 244, 242, 0.85);
    border-color: rgba(37, 99, 235, 0.25);
}
[data-theme="light"] .lang-btn {
    color: rgba(17, 24, 39, 0.4);
}
[data-theme="light"] .lang-btn:hover {
    color: #1D4ED8;
}
[data-theme="light"] .lang-btn.active {
    color: #fff;
    background: var(--purple);
}
[data-theme="light"] .lang-sep {
    color: rgba(17, 24, 39, 0.15);
}

[data-theme="light"] #theme-switch {
    background: rgba(244, 244, 242, 0.85);
    border-color: rgba(37, 99, 235, 0.25);
}
[data-theme="light"] .theme-btn {
    color: rgba(17, 24, 39, 0.4);
}
[data-theme="light"] .theme-btn:hover {
    color: #1D4ED8;
}
[data-theme="light"] .theme-btn[aria-pressed="true"] {
    color: #fff;
    background: var(--purple);
}
[data-theme="light"] .theme-sep {
    color: rgba(17, 24, 39, 0.15);
}

[data-theme="light"] #i18n-banner {
    background: rgba(248, 242, 229, 0.97);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--text);
}

[data-theme="light"] .i18n-banner-btn {
    background: var(--purple);
}
[data-theme="light"] .i18n-banner-btn:hover {
    background: #1D4ED8;
}

[data-theme="light"] #lang-switch,
[data-theme="light"] #theme-switch {
    background: rgba(248, 242, 229, 0.85);
    border-color: rgba(37, 99, 235, 0.25);
}
[data-theme="light"] .lang-sep,
[data-theme="light"] .theme-sep {
    color: rgba(30, 41, 59, 0.2);
}
