/* TrackFY Consent — usa os tokens do tema (--brand-*) com fallback, para servir a qualquer site da rede. */
.tfc { font-family: var(--brand-font, ui-sans-serif, system-ui, -apple-system, sans-serif); color: var(--brand-text, #08121F); }
.tfc [hidden] { display: none !important; }

/* ---- barra ---- */
.tfc-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000;
    display: flex; gap: 1.25rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 1rem clamp(1rem, 4vw, 2.5rem);
    background: #fff; border-top: 1px solid var(--brand-border, #D9DFE5);
    box-shadow: 0 -8px 30px rgba(1, 40, 84, .12);
}
.tfc-bar__text { flex: 1 1 28rem; font-size: .9rem; line-height: 1.5; }
.tfc-bar__text strong { display: block; font-family: var(--brand-font-display, inherit); font-size: 1rem; margin-bottom: .15rem; color: var(--brand-primary, #012854); }
.tfc-bar__text p { margin: 0; color: var(--brand-muted, #586474); }
.tfc a { color: var(--brand-secondary, #0072DA); text-decoration: underline; }
.tfc-bar__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* Recusar e Aceitar têm o mesmo peso visual (sem "dark pattern"); Personalizar é o secundário. */
.tfc-btn {
    appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2;
    padding: .7rem 1.25rem; border-radius: var(--radius-md, .5rem);
    border: 2px solid var(--brand-primary, #012854); background: var(--brand-primary, #012854); color: #fff;
    transition: background .15s, color .15s;
}
.tfc-btn:hover { background: var(--brand-secondary, #0072DA); border-color: var(--brand-secondary, #0072DA); }
.tfc-btn--ghost { background: transparent; color: var(--brand-primary, #012854); }
.tfc-btn--ghost:hover { background: var(--brand-surface, #F8FAFD); color: var(--brand-primary, #012854); border-color: var(--brand-primary, #012854); }
.tfc-btn:focus-visible, .tfc-modal__close:focus-visible, .tfc-switch input:focus-visible + .tfc-switch__track {
    outline: 3px solid var(--brand-secondary, #0072DA); outline-offset: 2px;
}

/* botão flutuante do WhatsApp sobe junto com a barra */
body.tfc-bar-open .whatsapp-float { bottom: calc(var(--tfc-h, 0px) + 1rem) !important; }

/* ---- modal ---- */
.tfc-modal {
    position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center;
    padding: 1rem; background: rgba(1, 40, 84, .55);
}
.tfc-modal__panel {
    position: relative; width: min(34rem, 100%); max-height: calc(100vh - 2rem); overflow-y: auto;
    padding: 1.75rem; background: #fff; border-radius: var(--radius-lg, 1rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.tfc-modal__panel h2 { margin: 0 2rem .5rem 0; font-family: var(--brand-font-display, inherit); font-size: 1.25rem; color: var(--brand-primary, #012854); }
.tfc-modal__panel > p { margin: 0 0 1rem; font-size: .9rem; line-height: 1.5; color: var(--brand-muted, #586474); }
.tfc-modal__close {
    position: absolute; top: .75rem; right: .75rem; width: 2.25rem; height: 2.25rem;
    border: 0; background: transparent; font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--brand-muted, #586474);
}
body.tfc-modal-open { overflow: hidden; }

.tfc-cats { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.tfc-cat { padding: .9rem 0; border-top: 1px solid var(--brand-border, #D9DFE5); }
.tfc-cat p { margin: .35rem 0 0; font-size: .85rem; line-height: 1.45; color: var(--brand-muted, #586474); }
.tfc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.tfc-cat__on { font-size: .8rem; font-weight: 600; color: var(--brand-whatsapp, #2EB45C); }

/* interruptor */
.tfc-switch { position: relative; flex: none; width: 2.75rem; height: 1.5rem; }
.tfc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tfc-switch__track { position: absolute; inset: 0; border-radius: 999px; background: #B8C2CE; transition: background .15s; pointer-events: none; }
.tfc-switch__track::after {
    content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem;
    border-radius: 50%; background: #fff; transition: transform .15s;
}
.tfc-switch input:checked + .tfc-switch__track { background: var(--brand-secondary, #0072DA); }
.tfc-switch input:checked + .tfc-switch__track::after { transform: translateX(1.25rem); }

.tfc-modal__actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 40rem) {
    .tfc-bar { gap: .75rem; padding: .85rem 1rem; }
    .tfc-bar__text { flex-basis: 100%; font-size: .85rem; line-height: 1.4; }
    .tfc-bar__text strong { font-size: .95rem; }
    /* Recusar e Aceitar lado a lado (mesmo peso); Personalizar embaixo, largura total */
    .tfc-bar__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
    .tfc-bar__actions .tfc-btn { padding: .65rem .5rem; }
    .tfc-bar__actions .tfc-btn--ghost { grid-column: 1 / -1; order: 3; }
    .tfc-modal__actions { width: 100%; }
    .tfc-modal__actions .tfc-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .tfc-btn, .tfc-switch__track, .tfc-switch__track::after { transition: none; }
}

/* link do rodapé do tema */
.trackfy-consent-link { color: inherit; text-decoration: underline; }
