/* Infinity Bands — bandeiras de idioma do cabeçalho (ver assets/lang-flags.js) */
.lang-flags {
    --lf-bg: #fff;
    --lf-line: #eadfd2;
    --lf-ink: #141414;
    --lf-accent: #e2461b;
    --lf-active: #fde6dc;
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.lang-flags .lf-current { display: none; }
.lang-flags .lf-list {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    background: var(--lf-bg);
}
.lang-flags .lf-option {
    display: grid;
    place-items: center;
    width: 36px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--lf-ink);
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.lang-flags .lf-option:hover { opacity: 1; transform: translateY(-1px); }
.lang-flags .lf-option[aria-pressed="true"] { opacity: 1; background: var(--lf-active); }
.lang-flags .lf-option:focus-visible,
.lang-flags .lf-current:focus-visible { outline: 2px solid var(--lf-accent); outline-offset: 2px; }
.lang-flags .lf-flag {
    display: block;
    flex: 0 0 auto;
    width: 24px;
    height: 16px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.lang-flags .lf-flag svg { display: block; width: 100%; height: 100%; }
.lang-flags .lf-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Tela estreita: só a bandeira atual; as outras abrem numa lista */
.lang-flags.is-compact .lf-current {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    margin: 0;
    padding: 0 11px;
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    background: var(--lf-bg);
    color: var(--lf-ink);
    cursor: pointer;
}
.lang-flags.is-compact .lf-caret {
    width: 0;
    height: 0;
    margin-top: 4px;
    border: 4px solid transparent;
    border-top: 5px solid var(--lf-accent);
}
.lang-flags.is-compact .lf-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1100;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: 172px;
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(20, 20, 20, 0.16);
}
.lang-flags.is-compact.is-open .lf-list { display: flex; }
.lang-flags.is-compact .lf-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: auto;
    height: auto;
    padding: 10px 12px;
    border-radius: 10px;
    opacity: 1;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
}
.lang-flags.is-compact .lf-option:hover { transform: none; background: var(--lf-active); }
.lang-flags.is-compact .lf-name { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

/* Área do membro e certificado: o seletor antigo tinha uma setinha no contêiner */
#site-header .site-language-wrap.lang-flags::after { content: none !important; display: none !important; }

/* Tema escuro e alto contraste da área do membro */
html[data-theme="dark"] .lang-flags {
    --lf-bg: #26211e;
    --lf-line: #4a403a;
    --lf-ink: #f6efe7;
    --lf-active: rgba(226, 70, 27, 0.28);
}
html.site-high-contrast .lang-flags {
    --lf-bg: #000;
    --lf-line: #fff;
    --lf-ink: #fff;
    --lf-accent: #ffd400;
    --lf-active: #333;
}
html.site-high-contrast .lang-flags .lf-option { opacity: 1; }
html.site-high-contrast .lang-flags .lf-option[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #ffd400; }

@media (prefers-reduced-motion: reduce) {
    .lang-flags .lf-option { transition: none; }
    .lang-flags .lf-option:hover { transform: none; }
}
