/* =========================================================
   TABELA-PRECOS-PRACA.CSS
   Páginas /tabela-precos/<praça>/ e blocos dinâmicos do hub.
   Todos os preços ficam no HTML; este CSS só organiza a leitura.
   ========================================================= */

/* ---------- AVISO "pode mudar sem aviso prévio" ---------- */
.tpp-aviso {
  background: #FFF8E1;
  border-left: 4px solid var(--su-yellow);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 24px;
  color: #5B4A00;
  font-size: 0.95rem;
  line-height: 1.6;
}
.tpp-aviso strong { color: #7A5C00; }
.tpp-aviso a { color: var(--su-blue); font-weight: 600; }

/* ---------- ano no H1 ---------- */
.page-header h1 .tpp-ano { color: var(--su-yellow); }

/* ---------- ponte região → rede credenciada ---------- */
.tpp-rede-link {
  font-size: 0.92rem;
  color: var(--su-text);
  background: var(--su-white);
  border: 1px solid var(--su-border);
  border-left: 4px solid var(--su-blue);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 0 0 24px;
}
.tpp-rede-link a { color: var(--su-blue); font-weight: 700; }

/* ---------- passos de leitura ---------- */
.tpp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
@media (max-width: 760px) { .tpp-steps { grid-template-columns: 1fr; } }
.tpp-step {
  background: var(--su-white);
  border: 1px solid var(--su-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tpp-step .n { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; color: var(--su-blue); }
.tpp-step .t { font-weight: 700; font-size: 0.95rem; color: var(--su-blue-dark); }
.tpp-step .d { font-size: 0.83rem; color: var(--su-text-muted); line-height: 1.45; }

/* ---------- seletor de faixa etária (progressive enhancement) ---------- */
.tpp-agebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #EEF4FB 0%, #E7EFF8 100%);
  border: 1px solid #B9CCE0;
  border-top: 3px solid var(--su-yellow);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 24px;
  box-shadow: 0 6px 16px rgba(0, 60, 113, 0.12);
}
.tpp-agebar .lbl { font-size: 0.85rem; font-weight: 800; color: var(--su-blue-dark); margin-right: 4px; }
.tpp-agebar button {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--su-white);
  color: var(--su-blue-dark);
  border: 2px solid #8FA9C4;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 60, 113, 0.08);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tpp-agebar button:hover { border-color: var(--su-blue); color: var(--su-blue); }
.tpp-agebar button[aria-pressed="true"] {
  background: var(--su-blue-dark);
  border-color: var(--su-blue-dark);
  color: #fff;
  font-weight: 700;
}
.tpp-agebar button:focus-visible { outline: 2px solid var(--su-yellow); outline-offset: 2px; }

/* ---------- índice de planos ---------- */
.tpp-toc { margin: 0 0 8px; }
.tpp-toc-title { font-size: 1.05rem; margin: 0 0 10px; color: var(--su-blue-dark); }
.tpp-toc-title small, .tpp-sec-title small {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--su-text-muted);
  margin-top: 2px;
}
.tpp-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tpp-toc li { margin: 0; }
.tpp-toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--su-blue-dark);
  background: var(--su-white);
  border: 2px solid #A9BED4;
  border-radius: 999px;
  padding: 7px 13px;
  box-shadow: 0 1px 3px rgba(0, 60, 113, 0.08);
  text-decoration: none !important;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.tpp-toc a small { font-weight: 600; color: var(--su-text-muted); font-size: 0.78rem; }
.tpp-toc a:hover { border-color: var(--su-blue); background: var(--su-blue-dark); color: #fff; }
.tpp-toc a:hover small { color: rgba(255, 255, 255, 0.85); }

/* ---------- títulos de seção ---------- */
.tpp-sec-title {
  font-size: 1.35rem;
  color: var(--su-blue-dark);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--su-yellow);
}

/* ---------- bloco de plano ---------- */
.tpp-block {
  background: var(--su-white);
  border: 1px solid var(--su-border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 60, 113, 0.06);
  margin: 0 0 22px;
  overflow: hidden;
  scroll-margin-top: 84px;              /* âncora não fica atrás da agebar sticky */
  content-visibility: auto;             /* CWV: layout adiado até chegar perto da viewport */
  contain-intrinsic-size: auto 420px;
}
.tpp-block-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--su-bg);
  border-bottom: 1px solid var(--su-border);
}
.tpp-block-head h3 { font-size: 1.1rem; color: var(--su-blue-dark); margin: 0; line-height: 1.3; }
.tpp-block-head h3 small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--su-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}
.tpp-from {
  margin: 0;
  font-size: 0.8rem;
  color: var(--su-text-muted);
  text-align: right;
}
.tpp-from b {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--su-red);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.tpp-from span { font-size: 0.72rem; }

/* ---------- a tabela de preços ---------- */
.tpp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tpp-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 880px;
  font-size: 0.82rem;
}
.tpp-table caption {
  caption-side: bottom;
  text-align: left;
  padding: 10px 16px 14px;
  font-size: 0.75rem;
  color: var(--su-text-muted);
  line-height: 1.5;
}
.tpp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--su-blue-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 10px;
  text-align: right;
  white-space: nowrap;
}
.tpp-table thead th.tpp-th-cond { text-align: left; }
.tpp-table td,
.tpp-table tbody th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--su-border);
  text-align: right;
  white-space: nowrap;
}
.tpp-table tbody tr:last-child td,
.tpp-table tbody tr:last-child th { border-bottom: 0; }
.tpp-table tbody th[scope="row"] {
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--su-blue-dark);
  white-space: normal;
  min-width: 200px;
  line-height: 1.35;
}
.tpp-table tbody th[scope="row"] span {
  display: block;
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--su-text-muted);
}
.tpp-table td {
  font-variant-numeric: tabular-nums;
  color: var(--su-text);
}
.tpp-table tbody tr:nth-child(even) td,
.tpp-table tbody tr:nth-child(even) th { background: var(--su-bg); }
.tpp-table tbody tr:hover td,
.tpp-table tbody tr:hover th { background: var(--su-bg-alt); }

/* coluna da idade selecionada */
.tpp-table td.on { background: #FFF3CC !important; font-weight: 700; color: var(--su-blue-dark); }
.tpp-table thead th.on { background: var(--su-yellow); color: var(--su-blue-dark); }

/* ---------- ranking / tabelas do hub ---------- */
.tpp-ranking { min-width: 720px; font-size: 0.86rem; }
.tpp-ranking thead th { text-align: right; }
.tpp-ranking thead th:first-child,
.tpp-ranking thead th[style*="text-align:left"] { text-align: left; }
.tpp-ranking tbody th[scope="row"] { min-width: 150px; }
.tpp-ranking tbody th[scope="row"] small { color: var(--su-text-muted); font-weight: 600; }
.tpp-ranking td { text-align: left; }
.tpp-rk { color: var(--su-text-muted); font-size: 0.78rem; width: 34px; }
.tpp-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.tpp-num b { color: var(--su-red); }
.tpp-med { background: #FFF8E1; font-weight: 700; }
.tpp-verlink { font-weight: 700; font-size: 0.8rem; white-space: nowrap; }

/* ---------- outras praças ---------- */
.tpp-outras { margin: 8px 0 32px; }
.tpp-outras ul { list-style: none; padding: 0; margin: 0 0 14px; }
.tpp-outras li {
  font-size: 0.88rem;
  padding: 7px 0;
  border-bottom: 1px dashed var(--su-border);
  line-height: 1.7;
}
.tpp-outras li strong { color: var(--su-blue-dark); margin-right: 6px; }
.tpp-outras a { color: var(--su-blue); font-weight: 600; text-decoration: none; }
.tpp-outras a:hover { text-decoration: underline; }

/* ---------- FAQ (a praça não carrega home.css) ---------- */
.faq-section { max-width: 860px; margin: 0 auto; }

/* ---------- CTA ---------- */
.tpp-cta {
  background:
    radial-gradient(ellipse at top left, rgba(255, 184, 28, 0.2), transparent 50%),
    linear-gradient(135deg, var(--su-blue-dark), var(--su-blue));
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  color: #fff;
}
.tpp-cta h2 { color: #fff; font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 0 0 10px; }
.tpp-cta p { margin: 0 auto 20px; max-width: 640px; opacity: 0.95; }
.tpp-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 0 !important; }

/* ---------- impressão: a tabela é o documento ---------- */
@media print {
  .tpp-agebar, .tpp-steps, .tpp-cta, .site-header, .site-footer, .top-strip { display: none !important; }
  .tpp-block { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tpp-agebar button, .tpp-toc a { transition: none; }
}
