/* Agenda própria da Trinity · usa /assets/css/tokens.css (cores, fontes, raios) */

body { background: var(--bg); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(245, 130, 32, 0.16), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, rgba(52, 88, 210, 0.10), transparent 60%);
}

.agenda {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: max(var(--space-4), env(safe-area-inset-top)) var(--space-4) max(var(--space-10), env(safe-area-inset-bottom));
}

.topo { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.voltar { font-size: var(--text-sm); font-weight: 600; color: var(--text-2); padding: 8px 4px; }
.marca { width: 120px; height: auto; }

.cartao {
  margin-top: var(--space-5);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-surface);
  background: var(--glass-shine), var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), var(--shadow-md);
}

.sobretitulo { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-orange); }
.titulo {
  margin: var(--space-2) 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  word-spacing: 0;
  text-wrap: balance;
}

.passos { display: flex; gap: var(--space-2); margin: var(--space-5) 0 var(--space-6); padding: 0; list-style: none; counter-reset: passo; }
.passos[hidden] { display: none; }
.passos li {
  flex: 1;
  padding-top: 8px;
  border-top: 3px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.passos li.ativo, .passos li.feito { border-color: var(--brand-orange); color: var(--text); }

.etapa { display: grid; gap: var(--space-4); }

/* Perguntas de escolha: botões em pílula */
#perguntas { display: grid; gap: var(--space-6); }
.pergunta { margin: 0; padding: 0; border: 0; min-width: 0; }
.pergunta legend { margin-bottom: var(--space-3); padding: 0; }
.pergunta legend, .campo { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.opcoes { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.opcao > span::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
@media (hover: hover) { .opcao > span:hover { border-color: rgba(245, 130, 32, 0.55); } }
.opcao input:checked + span { border-color: var(--brand-orange); background: var(--accent-soft); color: var(--brand-navy); font-weight: 600; }
.opcao input:checked + span::before { border-color: var(--brand-orange); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 8px var(--brand-orange); }
.opcao input:focus-visible + span { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
/* Várias respostas: caixinha com visto desenhado (mesmo tamanho da bolinha) */
.opcao--multi > span::before { content: none; }
.visto {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.visto svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: var(--surface);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 11;
  stroke-dashoffset: 11;
  transition: stroke-dashoffset 220ms var(--ease-out);
}
.opcao--multi input:checked + span .visto { border-color: var(--brand-orange); background: var(--brand-orange); }
.opcao--multi input:checked + span .visto svg { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .visto svg { transition: none; } }

.campo { display: grid; gap: 8px; }
.campo small, .pergunta legend small { margin-left: 2px; font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.campo small::before, .pergunta legend small::before { content: "· "; }
.pergunta legend small.dica { display: block; margin: 4px 0 0; }
.pergunta legend small.dica::before { content: none; }
.campo input, .campo textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-block);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* evita zoom no iPhone */
}
.campo textarea { min-height: 84px; resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--text-3); opacity: 1; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 4px var(--accent-soft); }
.dupla { display: grid; gap: var(--space-4); }
@media (min-width: 480px) { .dupla { grid-template-columns: 1fr 1fr; gap: var(--space-3); } }

.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Dias e horários */
.ajuda { margin: 0; font-size: var(--text-sm); color: var(--text-2); }
.calendario { display: grid; gap: var(--space-3); }
.mes { margin: 0; font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; letter-spacing: -0.01em; }
.dias { display: grid; grid-template-columns: repeat(var(--colunas, 5), minmax(0, 1fr)); gap: var(--space-2); }
.semana { padding-bottom: 2px; text-align: center; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.dia {
  position: relative;
  display: grid;
  place-items: center;
  height: 50px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-block);
  background: var(--surface);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.dia small { position: absolute; bottom: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.dia--off { border-color: transparent; background: none; font-weight: 500; color: var(--text-3); opacity: 0.6; cursor: default; }
@media (hover: hover) { button.dia:hover { border-color: rgba(245, 130, 32, 0.55); } }
.dia[aria-pressed="true"] { border-color: var(--brand-orange); background: var(--brand-orange); color: var(--brand-navy); }
.dia[aria-pressed="true"] small { color: var(--brand-navy); }
.dia:focus-visible, .hora:focus-visible, .trocar:focus-visible, .botao:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.rotulo-horas { margin: var(--space-2) 0 calc(-1 * var(--space-2)); font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.rotulo-horas:empty { display: none; }
@media (min-width: 560px) { .dia { height: 54px; } }
.horas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
@media (min-width: 480px) { .horas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hora {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-block);
  background: var(--surface);
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
@media (hover: hover) { .hora:hover { border-color: var(--brand-orange); background: var(--accent-soft); } }
.hora { font-variant-numeric: tabular-nums; transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out); }
.vazio { margin: 0; font-size: var(--text-sm); color: var(--text-2); }
.vazio a { color: var(--brand-navy); font-weight: 600; text-decoration: underline; }

.escolhido {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 6px 10px 14px;
  border: 1px solid rgba(245, 130, 32, 0.28);
  border-radius: var(--radius-block);
  background: var(--accent-soft);
  color: var(--brand-navy);
}
.escolhido svg { flex: none; color: var(--brand-orange); }
.passos[hidden] ~ .etapa { margin-top: var(--space-5); } /* sem as etapas no topo (WhatsApp), o respiro vem daqui */
.escolhido--whats { align-items: flex-start; padding: 14px 16px; }
.escolhido--whats svg { margin-top: 1px; }
.escolhido--whats p { font-weight: 500; line-height: 1.5; }
.escolhido p { flex: 1; margin: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.35; }
.trocar { flex: none; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--brand-navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.privacidade { margin: 0; font-size: 12.5px; color: var(--text-3); }
.turnstile:empty { display: none; }

.erro { margin: 0; font-size: 13px; font-weight: 600; color: var(--danger); }
.erro:empty { display: none; }

/* Botões */
.acoes { display: flex; flex-direction: column-reverse; gap: var(--space-2); }
@media (min-width: 560px) { .acoes { flex-direction: row; align-items: center; } .acoes .botao:not(.botao--texto) { flex: 1; } }
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.4), transparent 50%), var(--brand-orange);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: var(--brand-navy);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.botao:active { transform: scale(0.97); }
.botao[disabled] { opacity: 0.6; cursor: progress; }
.botao--leve { background: var(--surface-2); border-color: var(--line); color: var(--text); box-shadow: none; }
.botao--texto { min-height: 44px; padding: 0 var(--space-3); background: none; box-shadow: none; color: var(--text-2); font-size: var(--text-sm); font-weight: 600; }
@media (hover: hover) { .botao--texto:hover { color: var(--text); } }
/* Pixels vivos (pixels.js), como nos cards da página de links: a camada fica atrás do texto */
.botao[data-pixels] { position: relative; isolation: isolate; overflow: hidden; }
.botao > .px-layer { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

#etapa-2 .acoes { flex-direction: row; }
#etapa-2 .botao--texto { padding-inline: 0; }

/* Confirmação */
.selo {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: var(--space-1) 0 var(--space-1) 8px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 8px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: var(--brand-navy);
  animation: selo-entra 520ms var(--ease-out) both;
}
.selo path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: selo-risca 420ms 260ms var(--ease-out) forwards; }
@keyframes selo-entra { from { transform: scale(0.6); opacity: 0; } }
@keyframes selo-risca { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .selo, .selo path { animation: none; stroke-dashoffset: 0; } }
.confirmado { margin: 0; font-size: var(--text-lg); font-weight: 600; line-height: 1.4; }
