/* Portal do Cliente do Piquete 24h — mobile first, big text, high contrast (docs/adr/0050).
   Same palette as NexusSB's nx.css, tokens copied here — a deliberate exception to "raw colours only
   in nx.css": this page is served on its own subdomain and never loads NexusSB's stylesheets.
   Outside :root use only the tokens. */
:root {
    --navy: #12185D; --primary: #0B6E90; --primary-hover: #095E7A;
    --bg: #f1f5f9; --surface: #ffffff; --border: #cbd5e1;
    --text: #0f172a; --on-dark: #ffffff; --muted: #475569;
    --ok: #15803d; --ok-bg: #dcfce7; --ok-fg: #14532d;
    --warn-bg: #fef3c7; --warn-fg: #78350f;
    --danger: #c81e1e; --danger-hover: #a51616; --danger-bg: #fee2e2; --danger-fg: #7f1d1d;
    --radius: 16px; --shadow: 0 2px 10px rgba(15,23,42,.08);
    --tam: 18px;
}
:root.letra-grande { --tam: 21px; }
:root.letra-muito-grande { --tam: 25px; }
* { box-sizing: border-box; }
html { font-size: var(--tam); }
body { margin: 0; font-family: system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; }
[hidden] { display: none !important; }
a { color: var(--primary); }
h1 { font-size: 1.45rem; line-height: 1.25; margin: .4rem 0 .8rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }

.topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--navy); color: var(--on-dark); padding: 8px 14px; }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.marca img { width: 34px; height: 34px; border-radius: 8px; background: var(--surface); }
.marca small { display: block; font-weight: 600; font-size: .7rem; opacity: .85; }
.topo-botoes { display: flex; gap: 6px; }
.btn-topo { font: inherit; font-size: .8rem; font-weight: 700; color: var(--on-dark); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 8px 12px; min-height: 44px; cursor: pointer; }

.faixa-emergencia { background: var(--danger); color: var(--on-dark); padding: 8px 14px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.faixa-emergencia a { color: var(--on-dark); font-weight: 800; }

.conteudo { max-width: 680px; margin: 0 auto; padding: 14px 16px 28px; outline: none; }
.cartao { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.centrado { text-align: center; }
.destaque { font-size: 1.05rem; }
.nota { color: var(--muted); font-size: .85rem; }
.rodape { text-align: center; color: var(--muted); font-size: .75rem; padding: 0 16px 24px; }
.sem-js { padding: 16px; font-weight: 700; }

.desenho { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 10px; }
.desenho.mini { max-width: 96px; margin: 0; }
.heroi-desenhos { display: flex; justify-content: center; gap: 10px; margin: 6px 0 16px; }
.bloco { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--primary); background: #e0f2fe; border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }

.btn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 0; border-radius: 14px; padding: 14px 18px; min-height: 56px; cursor: pointer; background: var(--primary); color: var(--on-dark); }
.btn:hover { background: var(--primary-hover); }
.btn:focus-visible, .btn-topo:focus-visible, .ligacao:focus-visible { outline: 4px solid #f59e0b; outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-principal { width: 100%; font-size: 1.15rem; min-height: 64px; }
.btn-largo { width: 100%; }
.btn-sec { background: var(--surface); color: var(--navy); border: 2px solid var(--border); }
.btn-sec:hover { background: var(--bg); }
.btn-pequeno { min-height: 44px; padding: 8px 14px; font-size: .85rem; }
.btn-ligar { width: 100%; background: var(--ok); font-size: 1.1rem; min-height: 64px; flex-wrap: wrap; }
.btn-ligar:hover { background: #166534; }
.btn-ligar .numero { width: 100%; font-weight: 600; font-size: .9rem; opacity: .95; }
.btn-ligar.btn-pequeno { font-size: .9rem; min-height: 52px; }
.btn-112 { background: var(--danger); font-size: 1.35rem; min-height: 76px; }
.btn-112:hover { background: var(--danger-hover); }
.icone-tel { font-size: 1.2em; }
.botoes { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.ligacao { font: inherit; background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; }

.navegacao { display: flex; gap: 8px; margin-bottom: 10px; }
.pergunta h1 { text-align: center; }
.respostas { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.btn-resposta { width: 100%; justify-content: flex-start; text-align: left; background: var(--surface); color: var(--text); border: 2px solid var(--border); font-size: 1.05rem; min-height: 64px; }
.btn-resposta:hover { border-color: var(--primary); background: #f0f9ff; }
.com-desenhos .btn-resposta { padding: 10px 14px; }
.resposta-desenho { width: 84px; max-width: 84px; flex-shrink: 0; margin: 0; }

.ecra-emergencia { border-top: 8px solid var(--danger); }
.ecra-emergencia h1 { color: var(--danger-fg); }
.instrucoes { padding-left: 1.3rem; margin: 12px 0; }
.instrucoes li { margin-bottom: .55rem; font-size: 1.05rem; }
.faixa { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.faixa-aviso { background: var(--warn-bg); color: var(--warn-fg); }
.faixa-perigo { background: var(--danger-bg); color: var(--danger-fg); font-weight: 600; }

.formulario h2 { margin-bottom: .3rem; }
.formulario-curto { border: 3px solid var(--danger); }
.campo { margin: 12px 0; }
.campo label { display: block; font-weight: 700; margin-bottom: 4px; }
.obrigatorio { color: var(--danger); }
.campo input, .campo textarea { font: inherit; width: 100%; padding: 12px 14px; min-height: 52px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #bae6fd; }
.ajuda-campo { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.aviso-zona { color: var(--warn-fg); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.opcionais { margin: 12px 0; border: 2px dashed var(--border); border-radius: 12px; padding: 10px 12px; }
.opcionais summary { cursor: pointer; font-weight: 700; color: var(--primary); min-height: 32px; }
.fotos { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.foto { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.foto img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 2px solid var(--border); }
.escondido { display: none; }

.sucesso { width: 72px; height: 72px; margin: 4px auto 6px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 2.4rem; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.referencia { font-size: 1.7rem; font-weight: 900; letter-spacing: 1px; color: var(--navy); background: #e0f2fe; border-radius: 12px; padding: 10px; margin: 4px 0 12px; }

.dialogo { width: min(560px, calc(100vw - 24px)); max-height: 85vh; border: 0; border-radius: var(--radius); padding: 16px; color: var(--text); }
.dialogo::backdrop { background: rgba(15,23,42,.5); }
.dialogo-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.dialogo ol { padding-left: 1.2rem; } .dialogo li { margin-bottom: .5rem; }
.texto-privacidade { white-space: pre-wrap; }

@media (min-width: 700px) {
    .respostas.com-desenhos { display: grid; grid-template-columns: 1fr 1fr; }
    .com-desenhos .btn-resposta { flex-direction: column; text-align: center; justify-content: center; }
    .resposta-desenho { width: 140px; max-width: 140px; }
}
