/* ── Franklin Credit — DeepL Language Selector ───────────────────────────── */

/* ── Wrapper: positions selector + "Translating…" indicator side by side ── */
.fc-lang-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    font-weight: normal;
}

/* ── The clickable trigger ───────────────────────────────────────────────── */
.fc-lang-selector {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.fc-lang-current {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    transition: background 0.2s;
}

.fc-lang-selector:hover .fc-lang-current,
.fc-lang-selector[aria-expanded="true"] .fc-lang-current {
    background: rgba(205,160,0,0.25);
    border-color: #CDA000;
}

.fc-lang-caret {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.fc-lang-selector[aria-expanded="true"] .fc-lang-caret {
    transform: rotate(180deg);
}

/* ── Dropdown list ───────────────────────────────────────────────────────── */
.fc-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    max-height: 280px;
    overflow-y: auto;
    background: #222;
    border: 1px solid #555;
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.fc-lang-selector[aria-expanded="true"] .fc-lang-dropdown {
    display: block;
}

/* ── Scrollbar styling for the dropdown ─────────────────────────────────── */
.fc-lang-dropdown::-webkit-scrollbar { width: 5px; }
.fc-lang-dropdown::-webkit-scrollbar-track { background: #333; }
.fc-lang-dropdown::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

/* ── Individual option ───────────────────────────────────────────────────── */
.fc-lang-option {
    padding: 7px 14px;
    font-size: 12px;
    color: #ddd;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.fc-lang-option:hover {
    background: #CDA000;
    color: #000;
}

.fc-lang-option.selected {
    background: rgba(205,160,0,0.2);
    color: #CDA000;
    font-weight: bold;
}

/* ── "Translating…" inline indicator ────────────────────────────────────── */
.fc-lang-translating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #CDA000;
    font-size: 12px;
    white-space: nowrap;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.fc-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(205,160,0,0.3);
    border-top-color: #CDA000;
    border-radius: 50%;
    animation: fc-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes fc-spin {
    to { transform: rotate(360deg); }
}

/* ── Fixed translate-in-progress banner (bottom of viewport) ────────────── */
.fc-translate-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    border: 1px solid #CDA000;
    color: #CDA000;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-family: Arial, sans-serif;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    white-space: nowrap;
}

/* ── Mobile: hide label text, keep globe icon visible ───────────────────── */
@media (max-width: 600px) {
    .fc-lang-wrap {
        gap: 6px;
    }
    .fc-lang-current span:not(.fc-lang-caret) {
        display: none;
    }
    .fc-lang-dropdown {
        right: 0;
        min-width: 140px;
    }
}
