/* Páginas legais (Privacidade e Termos) — usa as variáveis de tema de style.css */
.legal-top { border-bottom: 1px solid var(--border); background: var(--card); }
.legal-top .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.legal-top a.back { color: var(--muted); font-size: .9rem; }
.legal-top a.back:hover { color: var(--accent); }

.legal { max-width: 780px; margin: 0 auto; padding: 56px 16px 80px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: .88rem; margin-bottom: 32px; }
.legal .summary {
  background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 36px;
}
.legal .summary strong { display: block; margin-bottom: 6px; font-family: var(--font-head); }
.legal h2 { font-size: 1.3rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin-bottom: 12px; }
.legal ul { padding-left: 20px; margin-bottom: 12px; display: grid; gap: 6px; }
.legal strong { color: var(--text); }
.legal a { color: var(--accent); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .92rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { color: var(--text); font-family: var(--font-head); font-weight: 600; }
.legal td { color: var(--muted); }
.legal .table-wrap { overflow-x: auto; }

/* Rodapé com o botão flutuante do WhatsApp: abre espaço para ele não cobrir os links */
body:has(.whats) .footer { padding-bottom: 96px; }

/* Links legais no rodapé (todas as páginas) */
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; }
.footer-legal a, .footer-legal button { color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.footer-legal a:hover, .footer-legal button:hover { color: var(--accent); }

/* Painel de preferências de cookies */
.cookie-modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(0,0,0,.55); }
.cookie-modal.open { display: grid; }
.cookie-box {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 18px; padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); font-family: var(--font-body);
}
.cookie-box h2 { font-family: var(--font-head); font-size: 1.35rem; margin-bottom: 8px; }
.cookie-box > p { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.cookie-box > p a { color: var(--accent); text-decoration: underline; }
.cookie-cat { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.cookie-cat header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-cat h3 { font-family: var(--font-head); font-size: 1rem; }
.cookie-cat p { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.cookie-cat .always { font-size: .75rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.cookie-actions .btn { padding: 10px 20px; font-size: .88rem; }
.cookie-saved { color: #16a34a; font-size: .85rem; margin-top: 10px; text-align: right; min-height: 1.2em; }
