/* ==========================================================
   Ingresso Agora — Componentes (direção visual v2)
   Bootstrap 5 dá o grid e os utilitários; este arquivo dá a identidade.
   Elemento memorável: o BILHETE (picote, furos e canhoto). O resto fica quieto.
   ========================================================== */

/* ---------- Base e superfícies do navegador (seleção, cursor, rolagem) ---------- */
body {
  font-family: var(--ia-font);
  color: var(--ia-ink);
  background: var(--ia-bg);
  font-size: var(--ia-fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--ia-primary);
  accent-color: var(--ia-primary);                 /* radios e checkboxes no índigo da marca */
  scrollbar-color: #B9BCCB var(--ia-bg);
}
::selection { background: var(--ia-primary-line); color: var(--ia-night); }
h1, h2, h3, .h4, .h5, .h6 { color: var(--ia-night); letter-spacing: var(--ia-tracking-titulo); }
.preco, .valor { font-variant-numeric: tabular-nums; }
.texto-secundario { color: var(--ia-muted); font-size: var(--ia-fs-sm); }
a, .link { color: var(--ia-primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ia-primary-hover); }
:focus-visible { outline: none; box-shadow: var(--ia-focus); border-radius: var(--ia-radius-sm); }

/* ---------- Cabeçalho ---------- */
.ia-header { background: var(--ia-surface); border-bottom: 1px solid var(--ia-border); }
.ia-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem; color: var(--ia-night); letter-spacing: var(--ia-tracking-titulo); }
.ia-logo img { width: 28px; height: 28px; }
.ia-selo { color: var(--ia-accent); font-size: var(--ia-fs-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Botões ---------- */
.btn-ia {
  min-height: var(--ia-touch); padding: 0 var(--ia-s4); border-radius: var(--ia-radius);
  font-weight: 600; font-size: var(--ia-fs-base); display: inline-flex; align-items: center; justify-content: center; gap: var(--ia-s2);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s var(--ia-ease), box-shadow .15s;
}
.btn-ia:active:not(:disabled) { transform: scale(.98); }          /* resposta ao toque */
.btn-ia-primario { background: var(--ia-primary); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px rgba(67, 56, 202, .6); }
.btn-ia-primario:hover { background: var(--ia-primary-hover); color: #fff; }
.btn-ia-secundario { background: var(--ia-surface); color: var(--ia-primary); border-color: var(--ia-primary-line); }
.btn-ia-secundario:hover { background: var(--ia-primary-soft); border-color: var(--ia-primary); color: var(--ia-primary-hover); }
.btn-ia-link { background: none; border: 0; color: var(--ia-primary); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; padding: 0 var(--ia-s2); min-height: 44px; }
.btn-ia-link:hover { color: var(--ia-primary-hover); }
.btn-ia:disabled, .btn-ia.is-disabled { background: #E5E7EB; color: var(--ia-muted); border-color: transparent; box-shadow: none; cursor: not-allowed; }
.btn-ia.is-carregando { pointer-events: none; opacity: .85; }

/* ---------- Superfície simples (sem "kit de cards": só onde agrupa de fato) ---------- */
.ia-card { background: var(--ia-surface); border: 1px solid var(--ia-border); border-radius: var(--ia-radius); box-shadow: var(--ia-shadow-1); }

/* ======================================================
   BILHETE — o elemento memorável
   Picote tracejado + dois "furos" (meios-círculos da cor do fundo).
   ====================================================== */
.ia-bilhete {
  --furo: 20px; --furo-fundo: var(--ia-bg);
  position: relative; display: grid; grid-template-columns: 104px 1fr;
  background: var(--ia-surface); border: 1px solid var(--ia-border); border-radius: var(--ia-radius-lg);
  box-shadow: var(--ia-shadow-2);
}
.ia-bilhete-arte { border-radius: calc(var(--ia-radius-lg) - 1px) 0 0 calc(var(--ia-radius-lg) - 1px); overflow: hidden; }
.ia-bilhete-arte img { width: 100%; height: 100%; min-height: 120px; object-fit: cover; display: block; }
.ia-bilhete-info { position: relative; padding: var(--ia-s3) var(--ia-s3) var(--ia-s3) 20px; border-left: 2px dashed var(--ia-border); }
.ia-bilhete-info::before, .ia-bilhete-info::after {      /* os dois furos do picote */
  content: ''; position: absolute; left: calc(var(--furo) / -2 - 1px); width: var(--furo); height: var(--furo);
  border-radius: 50%; background: var(--furo-fundo); border: 1px solid var(--ia-border);
}
.ia-bilhete-info::before { top: calc(var(--furo) / -2 - 1px); clip-path: inset(50% 0 0 0); }
.ia-bilhete-info::after { bottom: calc(var(--furo) / -2 - 1px); clip-path: inset(0 0 50% 0); }
.ia-bilhete-nome { font-size: 1.125rem; font-weight: 700; line-height: 1.25; color: var(--ia-night); letter-spacing: var(--ia-tracking-titulo); margin: 0 0 var(--ia-s2); }
.ia-bilhete-dados { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--ia-muted); font-size: var(--ia-fs-sm); }
.ia-bilhete-dados i { color: var(--ia-primary); margin-right: 6px; }
@media (min-width: 576px) {
  .ia-bilhete { grid-template-columns: 148px 1fr; }
  .ia-bilhete-info { padding: 20px 24px 20px 28px; }
  .ia-bilhete-nome { font-size: 1.3125rem; }
}

/* ---------- Opção de ingresso: furos laterais de bilhete ---------- */
.ia-tipo {
  --furo: 18px; --furo-fundo: var(--ia-bg);
  position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--ia-s3);
  padding: 18px 20px; height: 100%;
  background: var(--ia-surface); border: 1px solid var(--ia-border); border-radius: var(--ia-radius);
  box-shadow: var(--ia-shadow-1); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.ia-tipo::before, .ia-tipo::after {
  content: ''; position: absolute; top: 50%; width: var(--furo); height: var(--furo); margin-top: calc(var(--furo) / -2);
  border-radius: 50%; background: var(--furo-fundo); border: 1px solid var(--ia-border); transition: border-color .2s;
}
.ia-tipo::before { left: calc(var(--furo) / -2 - 1px); clip-path: inset(0 0 0 50%); }
.ia-tipo::after { right: calc(var(--furo) / -2 - 1px); clip-path: inset(0 50% 0 0); }
.ia-tipo.tem-qtd { border-color: var(--ia-primary); box-shadow: 0 0 0 1px var(--ia-primary), var(--ia-shadow-2); }
.ia-tipo.tem-qtd::before, .ia-tipo.tem-qtd::after { border-color: var(--ia-primary); }
.ia-tipo-nome { font-size: var(--ia-fs-base); font-weight: 700; color: var(--ia-night); margin: 0 0 2px; }
.ia-tipo-preco { font-size: 1.25rem; font-weight: 700; color: var(--ia-ink); font-variant-numeric: tabular-nums; margin: 0; letter-spacing: var(--ia-tracking-titulo); }
.ia-tipo-taxa { color: var(--ia-muted); font-size: var(--ia-fs-sm); margin: 0; }

/* Seletor de quantidade */
.ia-qtd { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-top: 4px; }
.ia-qtd button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ia-border-strong);
  background: var(--ia-surface); color: var(--ia-ink); font-size: 1.125rem; display: grid; place-items: center; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s var(--ia-ease);
}
.ia-qtd button:hover:not(:disabled) { border-color: var(--ia-primary); color: var(--ia-primary); background: var(--ia-primary-soft); }
.ia-qtd button:active:not(:disabled) { transform: scale(.92); }
.ia-qtd button:focus-visible { border-radius: 50%; }
.ia-qtd output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; color: var(--ia-night); }
.ia-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--ia-primary-soft); color: var(--ia-primary-hover); font-size: var(--ia-fs-xs); font-weight: 600; white-space: nowrap; }

/* ---------- Opção (radio em card) — aceitar/recusar com o mesmo peso ---------- */
.ia-opcao { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 18px; min-height: 72px;
  border: 1px solid var(--ia-border); border-radius: var(--ia-radius); background: var(--ia-surface); cursor: pointer;
  box-shadow: var(--ia-shadow-1); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.ia-opcao input { width: 20px; height: 20px; flex: none; margin: 0; }
.ia-opcao:hover { border-color: var(--ia-border-strong); }
.ia-opcao:has(input:checked) { border-color: var(--ia-primary); background: var(--ia-primary-soft); box-shadow: 0 0 0 1px var(--ia-primary); }
.ia-opcao:has(input:focus-visible) { box-shadow: var(--ia-focus); }
.ia-opcao strong { display: block; color: var(--ia-night); }

/* ---------- Campos ---------- */
.ia-campo label { font-weight: 600; font-size: var(--ia-fs-sm); margin-bottom: 6px; display: block; color: var(--ia-ink); }
.ia-campo input, .ia-campo select {
  width: 100%; min-height: var(--ia-touch); padding: 0 var(--ia-s3); font-size: var(--ia-fs-base); font-family: inherit;
  border: 1.5px solid var(--ia-border-strong); border-radius: var(--ia-radius-sm); background: var(--ia-surface); color: var(--ia-ink);
  transition: border-color .15s, box-shadow .15s;
}
.ia-campo input::placeholder { color: #6B7280; }
.ia-campo input:focus, .ia-campo select:focus { outline: none; border-color: var(--ia-primary); box-shadow: 0 0 0 4px var(--ia-primary-soft); }
.ia-campo .ajuda { font-size: var(--ia-fs-xs); color: var(--ia-muted); margin-top: 6px; }
.ia-campo.is-erro input, .ia-campo.is-erro select { border-color: var(--ia-danger); border-width: 2px; }
.ia-campo .erro { display: flex; gap: 6px; align-items: flex-start; color: var(--ia-danger); font-size: var(--ia-fs-sm); font-weight: 600; margin-top: 6px; }
.ia-campo.is-ok input { border-color: var(--ia-success); }
.ia-campo .erro[hidden] { display: none; }
.ia-campo .erro i { margin-top: 2px; }

/* Lista do resumo de erros: cada item leva ao campo */
.lista-erros { margin: 6px 0 0; padding-left: 18px; color: var(--ia-ink); font-size: var(--ia-fs-sm); }
.lista-erros li + li { margin-top: 4px; }
.lista-erros a { color: var(--ia-danger); font-weight: 600; }

/* Caixa de seleção em card (mesmo vocabulário das opções) */
.ia-check { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--ia-border); border-radius: var(--ia-radius);
  background: var(--ia-surface); cursor: pointer; box-shadow: var(--ia-shadow-1); transition: border-color .2s, background-color .2s; }
.ia-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.ia-check:hover { border-color: var(--ia-border-strong); }
.ia-check:has(input:checked) { border-color: var(--ia-primary); background: var(--ia-primary-soft); }
.ia-check:has(input:focus-visible) { box-shadow: var(--ia-focus); }
.ia-check strong { color: var(--ia-night); }

/* ---------- Avisos (sem borda lateral colorida: fundo suave + contorno de 1 px + ícone) ---------- */
.ia-aviso { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--ia-radius); background: var(--ia-primary-soft); border: 1px solid var(--ia-primary-line); }
.ia-aviso > i { color: var(--ia-primary); font-size: 1.125rem; line-height: 1.35; flex: none; }
.ia-aviso strong { color: var(--ia-night); }
.ia-aviso.erro { background: var(--ia-danger-soft); border-color: var(--ia-danger-line); }
.ia-aviso.erro > i { color: var(--ia-danger); }
.ia-aviso.sucesso { background: var(--ia-success-soft); border-color: var(--ia-success-line); }
.ia-aviso.sucesso > i { color: var(--ia-success); }

/* ======================================================
   CANHOTO — resumo do pedido com picote antes do total
   ====================================================== */
.ia-canhoto { --furo: 20px; --furo-fundo: var(--ia-bg); background: var(--ia-surface); border: 1px solid var(--ia-border); border-radius: var(--ia-radius-lg); box-shadow: var(--ia-shadow-2); }
.ia-canhoto-corpo { padding: 20px 22px; }
.ia-canhoto-titulo { font-size: 1.125rem; font-weight: 700; color: var(--ia-night); margin: 0 0 4px; }
.ia-picote { position: relative; border-top: 2px dashed var(--ia-border); margin: 0; }
.ia-picote::before, .ia-picote::after {
  content: ''; position: absolute; top: calc(var(--furo) / -2 - 1px); width: var(--furo); height: var(--furo);
  border-radius: 50%; background: var(--furo-fundo); border: 1px solid var(--ia-border);
}
.ia-picote::before { left: calc(var(--furo) / -2 - 1px); clip-path: inset(0 0 0 50%); }
.ia-picote::after { right: calc(var(--furo) / -2 - 1px); clip-path: inset(0 50% 0 0); }
.ia-resumo dl { display: grid; grid-template-columns: 1fr auto; gap: 10px var(--ia-s3); margin: 0; }
.ia-resumo dt { font-weight: 400; color: var(--ia-muted); }
.ia-resumo dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--ia-ink); }
.ia-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 22px 4px; }
.ia-total span { font-weight: 600; color: var(--ia-ink); }
.ia-total strong { font-size: 1.75rem; font-weight: 700; color: var(--ia-night); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.ia-total-nota { padding: 0 22px 18px; margin: 0; color: var(--ia-muted); font-size: var(--ia-fs-sm); display: flex; gap: 6px; align-items: baseline; }
.ia-total-nota i { color: var(--ia-success); }

/* ---------- Progresso ---------- */
.ia-progresso-barras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ia-progresso-barras span { height: 4px; border-radius: 2px; background: #DADDE8; transition: background-color .25s; }
.ia-progresso-barras span.feito { background: var(--ia-primary); }
.ia-stepper { list-style: none; display: flex; margin: 0; padding: 0; counter-reset: etapa; }
.ia-stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; color: var(--ia-muted); font-size: var(--ia-fs-sm); font-weight: 600; }
.ia-stepper li::before {
  counter-increment: etapa; content: counter(etapa);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--ia-fs-sm);
  background: var(--ia-surface); border: 1.5px solid #C5C9D6; color: var(--ia-muted); position: relative; z-index: 1;
}
.ia-stepper li + li::after { content: ''; position: absolute; top: 16px; right: calc(50% + 22px); width: calc(100% - 44px); height: 2px; background: #DADDE8; border-radius: 1px; }
.ia-stepper li.feito + li::after, .ia-stepper li.feito + li.feito::after { background: var(--ia-primary); }
.ia-stepper li[aria-current="step"] { color: var(--ia-night); }
.ia-stepper li[aria-current="step"]::before { background: var(--ia-primary); border-color: var(--ia-primary); color: #fff; box-shadow: 0 0 0 5px var(--ia-primary-soft); }
.ia-stepper li.feito { color: var(--ia-ink); }
.ia-stepper li.feito::before { content: '✓'; background: var(--ia-primary-soft); border-color: var(--ia-primary); color: var(--ia-primary); }

/* Barra fixa do total (mobile) */
.ia-barra-total { position: fixed; inset: auto 0 0 0; z-index: 1030; background: var(--ia-surface); border-top: 1px solid var(--ia-border);
  box-shadow: 0 -10px 28px -16px rgba(30, 27, 75, .35); padding: 10px var(--ia-s3); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.ia-barra-total strong, .ia-barra-total .btn-ia { white-space: nowrap; }
.ia-barra-total .rotulo { color: var(--ia-muted); font-size: var(--ia-fs-xs); display: block; }
.ia-barra-total .valor-total { font-size: 1.375rem; font-weight: 700; color: var(--ia-night); letter-spacing: -0.02em; }
.com-barra { padding-bottom: 96px; }
@media (min-width: 992px) { .com-barra { padding-bottom: 0; } }

/* Botão principal: largura total no mobile, natural no desktop */
.acao-principal { width: 100%; }
@media (min-width: 992px) { .acao-principal { width: auto; min-width: 240px; } }
