/*
 * Conte a sua história — estilos do formulário em etapas.
 * Tudo está sob a classe .csh (o próprio #conte-sua-historia recebe essa classe),
 * então não interfere no resto da página onde for colado.
 * Para trocar as cores, mude só as variáveis logo abaixo.
 */
.csh {
  --csh-navy: #003366;
  --csh-orange: #f04f23;
  --csh-text: #1f2a37;
  --csh-muted: #5b6776;
  --csh-line: #d5dce6;
  --csh-bg: #ffffff;
  --csh-soft: #f3f6fa;
  --csh-error: #b42318;
  --csh-radius: 12px;

  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--csh-text);
}
.csh *, .csh *::before, .csh *::after { box-sizing: border-box; }
.csh [hidden] { display: none !important; }

.csh .csh-card {
  background: var(--csh-bg);
  border: 1px solid var(--csh-line);
  border-top: 6px solid var(--csh-navy);
  border-radius: var(--csh-radius);
  padding: 28px;
  box-shadow: 0 6px 24px rgba(0, 51, 102, .08);
}

/* Progresso */
.csh .csh-progress-text { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--csh-muted); }
.csh .csh-progress { height: 8px; background: var(--csh-soft); border-radius: 99px; overflow: hidden; margin-bottom: 24px; }
.csh .csh-progress-fill { height: 100%; width: 0; background: var(--csh-orange); border-radius: 99px; transition: width .3s ease; }

/* Títulos */
.csh .csh-title { margin: 0 0 8px; font-size: 26px; line-height: 1.25; color: var(--csh-navy); font-weight: 700; }
.csh .csh-intro { margin: 0 0 24px; color: var(--csh-muted); }

/* Campos */
.csh .csh-field { margin: 0 0 24px; }
.csh .csh-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.csh .csh-label { display: block; padding: 0; margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--csh-text); }

.csh .csh-input {
  display: block; width: 100%;
  padding: 12px 14px;
  font: inherit; color: var(--csh-text);
  background: #fff;
  border: 1.5px solid var(--csh-line);
  border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.csh select.csh-input { appearance: auto; }
.csh .csh-input:disabled { background: var(--csh-soft); color: var(--csh-muted); cursor: not-allowed; }
.csh .csh-input:focus { outline: none; border-color: var(--csh-navy); box-shadow: 0 0 0 3px rgba(0, 51, 102, .18); }
.csh .csh-textarea { resize: vertical; min-height: 96px; }
.csh .csh-field--big .csh-textarea { min-height: 220px; }

/* Menu suspenso (sempre abre para baixo) */
.csh .csh-dd { position: relative; }
.csh .csh-dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; cursor: pointer;
}
.csh .csh-dd-btn::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-right: 2px;
  border-right: 2px solid var(--csh-muted); border-bottom: 2px solid var(--csh-muted);
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.csh .csh-dd-btn[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.csh .csh-dd-btn--empty .csh-dd-text { color: var(--csh-muted); }
.csh .csh-dd-btn:disabled { cursor: not-allowed; }
.csh .csh-dd-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  max-height: 280px; overflow-y: auto;
  margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1.5px solid var(--csh-navy); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 51, 102, .18);
}
.csh .csh-dd-opt { padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.csh .csh-dd-opt--active { background: var(--csh-soft); }
.csh .csh-dd-opt[aria-selected="true"] { font-weight: 700; color: var(--csh-navy); }
.csh .csh-field--invalid .csh-dd-btn { border-color: var(--csh-error); }

/* Opções (radio) */
.csh .csh-options { display: grid; gap: 8px; }
.csh .csh-option { position: relative; }
.csh .csh-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.csh .csh-option label {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1.5px solid var(--csh-line); border-radius: 8px;
  cursor: pointer; background: #fff;
  transition: border-color .15s, background .15s;
}
.csh .csh-option label::before {
  content: ""; flex: none; width: 18px; height: 18px;
  border: 2px solid var(--csh-line); border-radius: 50%; background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.csh .csh-option label:hover { border-color: var(--csh-navy); }
.csh .csh-radio:checked + label { border-color: var(--csh-navy); background: var(--csh-soft); }
.csh .csh-radio:checked + label::before { border-color: var(--csh-navy); background: var(--csh-navy); box-shadow: inset 0 0 0 3px #fff; }
.csh .csh-radio:focus-visible + label { box-shadow: 0 0 0 3px rgba(0, 51, 102, .25); }

/* Nota de 0 a 10 */
.csh .csh-nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.csh .csh-nps-item { position: relative; }
.csh .csh-nps-item label {
  display: flex; align-items: center; justify-content: center;
  height: 44px;
  border: 1.5px solid var(--csh-line); border-radius: 8px;
  font-weight: 600; cursor: pointer; background: #fff;
  transition: border-color .15s, background .15s, color .15s;
}
.csh .csh-nps-item label:hover { border-color: var(--csh-navy); }
.csh .csh-radio:checked + label.csh-x,
.csh .csh-nps-item .csh-radio:checked + label { background: var(--csh-navy); border-color: var(--csh-navy); color: #fff; }
.csh .csh-nps-item .csh-radio:focus-visible + label { box-shadow: 0 0 0 3px rgba(0, 51, 102, .25); }
.csh .csh-nps-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 13px; color: var(--csh-muted); }

/* Tabela de itens */
.csh .csh-matrix { display: grid; gap: 4px; }
.csh .csh-matrix-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.4fr) repeat(6, minmax(0, 1fr));
  align-items: center; gap: 4px;
  padding: 8px 10px; border-radius: 8px;
}
.csh .csh-matrix-row:nth-child(even) { background: var(--csh-soft); }
.csh .csh-matrix-head { background: none !important; font-size: 12px; font-weight: 600; color: var(--csh-muted); text-align: center; }
.csh .csh-matrix-name { font-weight: 600; font-size: 15px; }
.csh .csh-matrix-cell { position: relative; display: flex; justify-content: center; }
.csh .csh-matrix-cell label {
  display: block; width: 22px; height: 22px; font-size: 0; /* rótulo só para leitores de tela */
  border: 2px solid var(--csh-line); border-radius: 50%; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.csh .csh-matrix-cell label:hover { border-color: var(--csh-navy); }
.csh .csh-matrix-cell .csh-radio:checked + label { border-color: var(--csh-navy); background: var(--csh-navy); box-shadow: inset 0 0 0 4px #fff; }
.csh .csh-matrix-cell .csh-radio:focus-visible + label { box-shadow: 0 0 0 3px rgba(0, 51, 102, .25); }

/* Erros e status */
.csh .csh-error { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--csh-error); }
.csh .csh-field--invalid .csh-input,
.csh .csh-field--invalid .csh-option label,
.csh .csh-field--invalid .csh-nps-item label { border-color: var(--csh-error); }
.csh .csh-status {
  margin: 0 0 16px; padding: 12px 14px;
  background: #fef3f2; border: 1px solid #fda29b; border-radius: 8px;
  color: var(--csh-error); font-weight: 600;
}

/* Botões */
.csh .csh-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.csh .csh-btn {
  font: inherit; font-weight: 700;
  padding: 12px 28px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, border-color .15s, opacity .15s;
}
.csh .csh-btn--primary { margin-left: auto; background: var(--csh-orange); color: #fff; }
.csh .csh-btn--primary:hover { background: #d9431a; }
.csh .csh-btn--ghost { background: #fff; color: var(--csh-navy); border-color: var(--csh-line); }
.csh .csh-btn--ghost:hover { border-color: var(--csh-navy); }
.csh .csh-btn:disabled { opacity: .6; cursor: not-allowed; }
.csh .csh-btn:focus-visible { outline: 3px solid rgba(0, 51, 102, .35); outline-offset: 2px; }

/* Tela de agradecimento */
.csh .csh-thanks { text-align: center; padding: 24px 8px; }
.csh .csh-thanks-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--csh-navy); color: #fff; font-size: 38px; line-height: 1;
}
.csh .csh-thanks .csh-intro { margin-bottom: 0; }

/* Celular */
@media (max-width: 640px) {
  .csh .csh-card { padding: 20px 16px; }
  .csh .csh-title { font-size: 22px; }
  .csh .csh-nps { grid-template-columns: repeat(6, 1fr); }

  /* Tabela vira lista: cada item mostra suas opções como botões */
  .csh .csh-matrix-head { display: none; }
  .csh .csh-matrix-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .csh .csh-matrix-cell { justify-content: flex-start; }
  .csh .csh-matrix-cell label {
    width: auto; height: auto; font-size: 14px; border-radius: 8px; padding: 9px 12px;
    background: #fff;
  }
  .csh .csh-matrix-row { display: flex; flex-wrap: wrap; }
  .csh .csh-matrix-name { flex: 0 0 100%; }
  .csh .csh-matrix-cell .csh-radio:checked + label { background: var(--csh-navy); color: #fff; box-shadow: none; }
  .csh .csh-btn { padding: 12px 20px; }
}

/* ====================================================================== */
/* Tema da LP (formulário dentro do modal): azul, amarelo e Inter          */
/* ====================================================================== */
.modal .csh {
  --csh-navy: #021949;
  --csh-text: #fff;
  --csh-muted: rgba(255, 255, 255, .8);
  --csh-line: rgba(255, 255, 255, .45);
  --csh-soft: rgba(255, 255, 255, .12);
  --csh-error: #ffd0d0;
  --csh-yellow: #fbfb33;
  max-width: none; padding: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
}
.modal .csh .csh-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }

.modal .csh .csh-progress-text { color: #fff; font-size: .85rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.modal .csh .csh-progress { height: 6px; background: rgba(255, 255, 255, .2); }
.modal .csh .csh-progress-fill { background: var(--csh-yellow); }

.modal .csh .csh-title { color: #fff; font-size: clamp(1.5rem, 6vw, 2.25rem); font-weight: 900; line-height: 1.1; text-transform: uppercase; padding-right: 2.5rem; }
.modal .csh .csh-intro { color: #fff; font-size: 1rem; line-height: 1.3; opacity: .9; }

.modal .csh .csh-label { color: #fff; font-size: .95rem; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }

.modal .csh .csh-input {
  padding: .75rem 1rem; border: 1.5px solid transparent; border-radius: 1rem;
  background: rgba(255, 255, 255, .95); color: #021949; font-weight: 700; line-height: 1.3;
}
.modal .csh .csh-input::placeholder { color: rgba(2, 25, 73, .45); font-weight: 700; }
.modal .csh .csh-input:focus { border-color: var(--csh-yellow); box-shadow: 0 0 0 3px rgba(251, 251, 51, .35); }
.modal .csh .csh-input:disabled { background: rgba(255, 255, 255, .5); color: rgba(2, 25, 73, .55); }
.modal .csh .csh-dd-btn--empty .csh-dd-text { color: rgba(2, 25, 73, .55); }
.modal .csh .csh-dd-btn::after { border-color: #021949; }
.modal .csh .csh-dd-list { background: #fff; border: 1.5px solid var(--csh-yellow); border-radius: 1rem; box-shadow: 0 1rem 2rem -.5rem rgba(2, 25, 73, .6); }
.modal .csh .csh-dd-opt { color: #021949; border-radius: .6rem; }
.modal .csh .csh-dd-opt--active { background: #e8ecfb; }
.modal .csh .csh-dd-opt[aria-selected="true"] { color: #121fa2; font-weight: 900; }

/* Opções: cartões translucidos; o escolhido ganha borda e texto amarelos */
.modal .csh .csh-option label,
.modal .csh .csh-nps-item label {
  background: rgba(2, 25, 73, .55); color: #fff; border: 1.5px solid transparent; border-radius: 1rem;
  font-weight: 900; text-transform: uppercase; letter-spacing: .02em; font-size: .9rem;
}
.modal .csh .csh-option label::before { border-color: #fff; background: transparent; }
.modal .csh .csh-option label:hover,
.modal .csh .csh-nps-item label:hover { border-color: rgba(251, 251, 51, .6); }
.modal .csh .csh-radio:checked + label { border-color: var(--csh-yellow); background: rgba(2, 25, 73, .75); color: var(--csh-yellow); }
.modal .csh .csh-radio:checked + label::before { border-color: var(--csh-yellow); background: var(--csh-yellow); box-shadow: inset 0 0 0 3px #021949; }
.modal .csh .csh-nps-item .csh-radio:checked + label { background: var(--csh-yellow); border-color: var(--csh-yellow); color: #021949; }
.modal .csh .csh-radio:focus-visible + label { box-shadow: none; outline: 3px solid var(--csh-yellow); outline-offset: 2px; }
.modal .csh .csh-nps-legend { color: #fff; font-size: .8rem; opacity: .85; }

.modal .csh .csh-matrix-row:nth-child(even) { background: rgba(255, 255, 255, .08); }
.modal .csh .csh-matrix-head { color: #fff; font-weight: 900; }
.modal .csh .csh-matrix-name { font-weight: 900; }
.modal .csh .csh-matrix-cell label { background: transparent; border-color: #fff; }
.modal .csh .csh-matrix-cell label:hover { border-color: var(--csh-yellow); }
.modal .csh .csh-matrix-cell .csh-radio:checked + label { border-color: var(--csh-yellow); background: var(--csh-yellow); box-shadow: inset 0 0 0 4px #121fa2; }

.modal .csh .csh-error { color: var(--csh-error); font-size: .85rem; font-weight: 700; }
.modal .csh .csh-field--invalid .csh-input,
.modal .csh .csh-field--invalid .csh-dd-btn,
.modal .csh .csh-field--invalid .csh-option label,
.modal .csh .csh-field--invalid .csh-nps-item label { border-color: #ff8a8a; }
.modal .csh .csh-status { background: rgba(180, 20, 20, .45); border: 0; border-radius: .75rem; color: #ffd0d0; }

/* Botões em pílula, como os da LP */
.modal .csh .csh-btn {
  min-width: 9rem; padding: .9rem 2rem; border: 1.5px solid var(--csh-yellow); border-radius: 999px;
  font-size: 1.05rem; font-weight: 900; text-transform: uppercase;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), filter .5s cubic-bezier(.22, 1, .36, 1), background .2s;
}
.modal .csh .csh-btn--primary { background: var(--csh-yellow); color: #121fa2; }
.modal .csh .csh-btn--primary:hover:not(:disabled) { background: var(--csh-yellow); filter: brightness(1.08); transform: translateY(-2px); }
.modal .csh .csh-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.modal .csh .csh-btn--ghost:hover:not(:disabled) { border-color: var(--csh-yellow); color: var(--csh-yellow); }
.modal .csh .csh-btn:focus-visible { outline: 3px solid var(--csh-yellow); outline-offset: 2px; }
.modal .csh .csh-btn:disabled { opacity: .6; }

.modal .csh .csh-thanks-icon { background: var(--csh-yellow); color: #121fa2; font-weight: 900; }

@media (max-width: 640px) {
  .modal .csh .csh-btn { min-width: 0; padding: .85rem 1.25rem; }
  .modal .csh .csh-matrix-cell label { background: rgba(2, 25, 73, .55); border: 1.5px solid transparent; border-radius: 1rem; font-size: .8rem; font-weight: 900; color: #fff; }
  .modal .csh .csh-matrix-cell .csh-radio:checked + label { background: rgba(2, 25, 73, .75); border-color: var(--csh-yellow); color: var(--csh-yellow); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .csh * { transition: none !important; }
}
