/* web/solicitud/styles.css — formulário de solicitação EfectPay.
   Pensado primeiro para celular.

   Identidade (manual de marca 2024): a cor PRINCIPAL é o navy #1B2132;
   lima #E8FF00, cinza #DFE2E7 e branco são de apoio. A página é
   navy/branco/cinza e o lima é só ACENTO: botão principal, avanço da barra
   de progresso e detalhes (faixa do topo, check da confirmação).
   REGRA: o lima nunca é cor de texto nem de traço sobre branco ou cinza
   (contraste ~1,1:1). Só entra como fundo com navy por cima, ou sobre navy.
   Tipografia: Nekst (oficial, ver assets/fonts/nekst.css) → Montserrat. */

:root {
  --lima: #e8ff00;
  --lima-hover: #d9ef00;
  --lima-ativo: #c9de00;
  --navy: #1b2132;
  --navy-hover: #2b3247;
  --cinza: #dfe2e7;
  --fundo-suave: #eef0f3;
  --texto-suave: #4d5466;      /* 7,7:1 sobre branco, 5,9:1 sobre o cinza */
  --placeholder: #646b79;      /* 5,4:1 sobre branco, 4,8:1 sobre o fundo de erro */
  --borda: #878d99;            /* 3,3:1 sobre branco: contorno de campos e opções */
  --divisor: #d5d9e0;
  --erro: #b3261e;             /* 6,5:1 sobre branco */
  --erro-fundo: #fdf0ee;
  --raio: 14px;
  --fonte: "Nekst", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--cinza);
  color: var(--navy);
  font-family: var(--fonte);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

[hidden] { display: none !important; }

.so-leitor {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Topo ---------- */
/* Faixa navy com o logo negativo: é o que faz o navy ser a cor da página. */
.topo {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  padding-top: env(safe-area-inset-top, 0);
}
.topo-conteudo { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 18px 20px; }
.marca-logo { display: block; width: 147px; height: 26px; }
/* Faixa diagonal lima no canto (a do login de efectpay.net, ~20°), fina:
   é um detalhe, não uma área de cor. Decorativa. */
.topo::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 200px;
  background: var(--lima);
  clip-path: polygon(0 0, 22% 0, 100% 100%, 78% 100%);
  pointer-events: none;
}

.conteudo { max-width: 480px; margin: 0 auto; padding: 16px 16px 32px; }

/* ---------- Progresso ---------- */
.progresso { margin: 4px 4px 14px; }
.progresso-texto { margin: 0 0 6px; color: var(--texto-suave); font-size: 0.8125rem; font-weight: 600; }
/* Trilho navy: lima sobre o fundo cinza não se distinguiria. */
.progresso-barra { height: 8px; border-radius: 8px; background: var(--navy); overflow: hidden; }
.progresso-barra span { display: block; height: 100%; width: 25%; background: var(--lima); transition: width 0.25s ease; }

/* ---------- Cartão ---------- */
.cartao {
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 6px 20px rgba(27, 33, 50, 0.10);
}
h1 { margin: 0 0 6px; font-size: 1.375rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
h1:focus { outline: none; }
.apoio { margin: 0 0 20px; color: var(--texto-suave); font-size: 0.9375rem; }
.subtitulo { margin: 22px 0 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-suave); }
.subtitulo:first-of-type { margin-top: 0; }

/* ---------- Valores sugeridos ---------- */
.valores { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.carregando { grid-column: 1 / -1; margin: 0; color: var(--texto-suave); }
.chip { position: relative; margin: 0; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 8px;
  border: 1.5px solid var(--borda); border-radius: var(--raio);
  font-weight: 700; font-size: 1rem; text-align: center;
  background: #fff; color: var(--navy);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.chip-outro { grid-column: 1 / -1; }
.chip-outro span { font-weight: 600; font-size: 0.9375rem; }

/* ---------- Campos ---------- */
.campo { margin: 0 0 16px; }
label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 0.875rem; }
input[type="text"], input[type="tel"], input[type="email"], select {
  display: block; width: 100%; min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--borda); border-radius: var(--raio);
  background: #fff; color: var(--navy);
  font: inherit; font-size: 1rem;   /* 16px: o Safari do iPhone não dá zoom ao focar */
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--placeholder); opacity: 1; }
input:focus-visible, select:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-color: var(--navy); }
/* Seta do seletor desenhada em navy (a nativa some com appearance: none). */
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231b2132' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
select[aria-invalid="true"] { border-color: var(--erro); background-color: var(--erro-fundo); }
/* O erro é vermelho, mas só no campo e na sua mensagem: nunca encostado em
   uma superfície lima. */
input[aria-invalid="true"] { border-color: var(--erro); background: var(--erro-fundo); }
.dica { margin: 6px 0 0; font-size: 0.8125rem; color: var(--texto-suave); }
.erro { margin: 6px 0 0; font-size: 0.8125rem; font-weight: 600; color: var(--erro); }
.erro::before { content: "⚠ "; }
#erro-valor { margin: -6px 0 16px; }
.linha-valor { display: flex; gap: 10px; }
.linha-valor input { flex: 1 1 auto; min-width: 0; }
.linha-valor .botao { flex: 0 0 auto; width: auto; margin: 0; padding: 0 18px; }

/* Agência, conta e dígito na mesma linha (o dígito é curto). */

/* ---------- Código de verificação ---------- */
.codigo { border: 0; margin: 0; padding: 0; min-width: 0; }
.casas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.casas .casa {
  min-height: 58px; padding: 0;
  text-align: center; font-size: 1.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#erro-codigo { margin-top: 10px; }
#reenviar { margin-top: 10px; }
.bloco-turnstile { margin: 14px 0 0; display: flex; flex-direction: column; align-items: center; }

/* ---------- Extrato bancário (passo 5) ---------- */
.caixa-extrato {
  margin: 0 0 14px; padding: 22px 16px;
  border: 2px dashed var(--borda); border-radius: var(--raio);
  text-align: center; color: var(--texto-suave); font-size: 0.9375rem;
}
.caixa-extrato-texto { margin: 12px 0 0; }
.botao-extrato { margin: 0; }
.lista-extratos { list-style: none; margin: 0 0 14px; padding: 0; }
.lista-extratos:empty { margin: 0; }
.lista-extratos li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 8px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; font-size: 0.9375rem; }
.lista-extratos .arquivo-nome { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lista-extratos .arquivo-info { flex: 0 0 auto; color: var(--texto-suave); font-size: 0.8125rem; }
.lista-extratos .arquivo-erro { flex: 1 1 100%; margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--erro); }
.lista-extratos li.com-erro { border-color: var(--erro); background: var(--erro-fundo); flex-wrap: wrap; }
.lista-extratos li.enviando { color: var(--texto-suave); }
.lista-extratos .arquivo-remover { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--navy); border-radius: var(--raio); background: #fff; color: var(--navy); font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.lista-extratos .arquivo-remover:hover { background: var(--fundo-suave); }
.lista-extratos .arquivo-remover:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.botao-em-breve { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 6px; }
.botao-em-breve:disabled { background: #fff; color: var(--placeholder); border-color: var(--borda); cursor: not-allowed; }
.etiqueta-breve { white-space: nowrap; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--fundo-suave); color: var(--texto-suave); }

/* ---------- Botões ---------- */
/* Principal: fundo lima, texto navy. */
.botao {
  display: block; width: 100%; min-height: 54px;
  margin: 4px 0 0; padding: 12px 18px;
  border: 0; border-radius: var(--raio);
  background: var(--lima); color: var(--navy);
  font: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.botao:hover { background: var(--lima-hover); }
.botao:active { background: var(--lima-ativo); }
.botao:focus-visible, .botao-voltar:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.botao:disabled { background: #eceef1; color: var(--placeholder); cursor: not-allowed; }
/* Secundário: borda navy. */
.botao-secundario { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.botao-secundario:hover { background: var(--fundo-suave); }
.botao-secundario:active { background: var(--cinza); }
.botao-secundario:disabled { background: #fff; color: var(--placeholder); border-color: var(--borda); }
.botao-voltar {
  display: block; width: 100%; min-height: 48px; margin: 6px 0 0;
  border: 0; border-radius: var(--raio); background: none; color: var(--navy);
  font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; touch-action: manipulation;
  text-decoration: underline; text-underline-offset: 3px;
}
.acoes { margin-top: 22px; }

/* ---------- Resumo (simulação e revisão) ---------- */
.simulacao { margin: 4px 0 18px; }
.simulacao.calculando { opacity: 0.45; }

/* ---------- Prazo ---------- */
.prazos { margin-top: 4px; }
.rotulo-prazo { padding: 0; margin: 0 0 8px; font-weight: 600; font-size: 0.875rem; }
.chips-prazo .chip span { min-height: 46px; font-size: 0.9375rem; }

/* ---------- Destaque da simulação ---------- */
.destaque-simulacao { padding: 18px 16px 6px; border-radius: var(--raio); background: var(--fundo-suave); }
.valor-grande { margin: 0; font-size: 2.125rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--navy); }
.parcela-destaque { margin: 10px 0 0; font-size: 1.125rem; font-weight: 700; line-height: 1.3; color: var(--navy); }
.inclui-iof { margin: 2px 0 0; font-size: 0.8125rem; color: var(--texto-suave); }
.total-estimado { margin: 12px 0 0; font-size: 0.9375rem; font-weight: 600; }
.resumo-datas { margin: 10px -16px -6px; padding: 0 16px; background: transparent; border-top: 1px solid var(--divisor); border-radius: 0 0 var(--raio) var(--raio); }

/* ---------- Custos e condições (dobrável) ---------- */
.custos { margin: 12px 0 0; }
.custos summary {
  list-style: none; cursor: pointer; padding: 10px 2px;
  font-size: 0.875rem; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 3px;
}
.custos summary::-webkit-details-marker { display: none; }
.custos summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.custos summary span { display: inline-block; margin-left: 4px; font-size: 1.125rem; transition: transform 0.15s; }
.custos[open] summary span { transform: rotate(90deg); }
.custos .resumo { margin-top: 4px; }
.resumo { margin: 0; padding: 4px 14px; border-radius: var(--raio); background: var(--fundo-suave); }
.resumo > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divisor); }
.resumo > div:last-child { border-bottom: 0; }
/* O rótulo cede espaço e quebra; o valor só quebra se não couber inteiro
   (um e-mail longo), nunca uma data ou um telefone pela metade. */
.resumo dt { color: var(--texto-suave); font-size: 0.875rem; flex: 1 1 0; min-width: 0; }
.resumo dd { margin: 0; font-size: 0.9375rem; font-weight: 700; text-align: right; flex: 0 1 auto; max-width: 70%; overflow-wrap: anywhere; }
.resumo dd small { display: block; margin-top: 2px; font-weight: 400; font-size: 0.8125rem; color: var(--texto-suave); }
/* A parcela é o número que a pessoa procura: maior, em navy. */
.resumo .marcado { font-size: 1.25rem; }
.estimativa { margin: 10px 2px 0; font-size: 0.8125rem; color: var(--texto-suave); }

/* ---------- Consentimento ---------- */
.campo-consentimento { margin-top: 22px; }
.consentimento { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-weight: 400; font-size: 0.875rem; cursor: pointer; }
.consentimento input { flex: 0 0 auto; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy); }
.consentimento input:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.consentimento a { color: var(--navy); font-weight: 600; }
.versao-termos { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--texto-suave); }

/* ---------- Avisos ---------- */
/* Neutro (branco com navy): um amarelo de alerta ao lado do lima se
   confundiria com a marca. */
.aviso {
  margin: 0 0 14px; padding: 14px 16px;
  border: 1.5px solid var(--navy); border-left-width: 6px; border-radius: var(--raio);
  background: #fff; color: var(--navy);
}
.aviso p { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 600; }
.aviso .botao { min-height: 46px; margin: 0; }

.antifraude {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 18px 8px 0; color: var(--texto-suave); font-size: 0.8125rem; font-weight: 600; text-align: left;
}
.antifraude svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linejoin: round; }

.eslogan { margin: 22px 8px 0; text-align: center; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--texto-suave); }

/* ---------- Confirmação ---------- */
.cartao-confirmacao { text-align: center; }
.cartao-confirmacao .resumo { text-align: left; }
.icone-ok { width: 64px; height: 64px; margin: 4px auto 12px; display: block; }
.icone-ok circle { fill: var(--navy); }
.icone-ok path { fill: none; stroke: var(--lima); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

.sem-js { max-width: 480px; margin: 16px auto; padding: 16px; border-radius: var(--raio); background: #fff; }

@media (min-width: 520px) {
  .topo-conteudo { padding: 22px 20px; }
  .conteudo { padding-top: 24px; }
  .cartao { padding: 32px 28px 26px; }
}

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