/* briefing.css — página pública do briefing pré-consulta
   Mobile-first, paleta OnPedCare */

.briefing-root {
  --teal: #3F9497;
  --teal-dark: #1F574E;
  --berry: #B46594;
  --terra: #DD8252;
  --gold: #BF9D34;
  --bg: #faf6f0;
  --ink: #1F574E;
  --muted: #5a6863;
  --line: #e8e4dd;
  --white: #ffffff;

  background: var(--bg);
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Poppins', 'Helvetica Neue', system-ui, sans-serif;
}

.briefing-shell {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.briefing-header {
  background: var(--teal);
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.briefing-header .meta {
  font-size: 11px;
  opacity: 0.85;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.briefing-header .nome {
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
}
.briefing-header .pill {
  font-size: 11px;
  background: rgba(255,255,255,0.18);
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.progress-bar {
  height: 3px;
  background: rgba(63,148,151,0.15);
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  transition: width 0.3s ease;
}

/* BODY */
.briefing-body {
  flex: 1;
  padding: 24px 18px 100px;
  background: var(--bg);
}
.briefing-eyebrow {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-bottom: 8px;
}
.briefing-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 6px;
}
.briefing-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
}

/* PERGUNTAS */
.q-block { margin-bottom: 26px; }
.q-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 4px;
}
.q-help {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

/* OPÇÕES (checkbox visual) */
.opt {
  display: flex; border-radius: 12px !important;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  background: var(--white);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  min-height: 50px;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.opt:active { background: #f5f1e8; }
.opt.selected {
  border-color: var(--teal);
  background: rgba(63,148,151,0.06);
}
.opt input { display: none; }
.opt-check {
  width: 22px;
  height: 22px;
  border: 2px solid #cdc9c0;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.opt.selected .opt-check {
  border-color: var(--teal);
  background: var(--teal);
}
.opt-check svg {
  width: 14px;
  height: 14px;
  color: white;
  display: none;
}
.opt.selected .opt-check svg { display: block; }
.opt-label {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
}





/* SUB-INPUT (revelado quando opção tem sub) */
.opt-sub {
  margin: -4px 0 8px;
  padding: 10px 14px;
  background: rgba(63,148,151,0.05);
  border: 0.5px dashed var(--teal);
  border-radius: 10px;
}
.opt-sub label {
  font-size: 12px;
  color: var(--teal-dark);
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}
.opt-sub input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 4px 0;
  color: var(--ink);
  outline: none;
}

/* "OUTROS" — sempre visível para multi com permite_outro */
.outro-card {
  margin-top: 8px;
  padding: 12px 14px;
  background: white;
  border: 0.5px dashed var(--terra);
  border-radius: 12px;
}
.outro-card label {
  font-size: 13px;
  color: var(--terra);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}
.outro-card input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

/* TEXTAREA / TEXTO */
.q-textarea {
  width: 100%;
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: white;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.15s;
}
.q-textarea:focus { border-color: var(--teal); }

.q-input-text {
  width: 100%;
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 0.15s;
}
.q-input-text:focus { border-color: var(--teal); }

/* FOOTER fixo */
.briefing-footer {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 0.5px solid var(--line);
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  z-index: 5;
}
.btn-back {
  padding: 14px 18px;
  background: transparent;
  border: 0.5px solid var(--teal-dark);
  color: var(--teal-dark);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex: 0 0 auto;
  min-height: 50px;
}
.btn-back:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-next {
  flex: 1;
  padding: 14px;
  background: var(--teal);
  border: none;
  color: white;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-next:active { transform: scale(0.98); }
.btn-next.btn-finalizar { background: var(--terra); }

.save-status {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px 18px 0;
  background: white;
}

/* TELA DE BOAS-VINDAS / CONCLUSÃO / ERRO */
.briefing-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 24px;
  text-align: center;
}
.briefing-center .emoji { font-size: 56px; margin-bottom: 16px; }
.briefing-center h1 {
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 12px;
}
.briefing-center p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 320px;
}

/* SAIR (link discreto no header) */
.btn-sair {
  background: none;
  border: none;
  color: white;
  opacity: 0.7;
  font-size: 13px;
  cursor: pointer;
}

/* Desktop: card centrado */
@media (min-width: 640px) {
  .briefing-shell {
    margin: 24px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(31,87,78,0.08);
    min-height: calc(100vh - 48px);
  }
  .briefing-header {
    border-radius: 16px 16px 0 0;
  }
}

[x-cloak] { display: none !important; }

/* RADIO (single choice) — círculo, não elipse */
.opt-radio .opt-check {
  border-radius: 50%;
  width: 22px;
  height: 22px;
}
.opt-radio .opt-check svg { display: none !important; }
.opt-radio.selected .opt-check {
  border-color: var(--teal);
  background: white;
  position: relative;
}
.opt-radio.selected .opt-check::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--teal);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
