/* Créditos (30/11/2026, public/creditos.js). Só tokens do app (app.css :root): nada de cor nova. */

/* ---------- lateral escura (computador) ---------- */
.cred-lado { display: none; }
@media (min-width: 920px) {
  .cred-lado { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 14px 14px 12px; border-radius: var(--r); border: 1px solid var(--plum-3);
    background: var(--plum-2); color: var(--creme); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s var(--ease, ease); }
  .cred-lado:hover { border-color: var(--brand-lilas); }
  .cred-lado:focus-visible { outline: 2px solid var(--brand-lilas); outline-offset: 2px; }
  .cred-fila { display: flex; align-items: baseline; gap: 6px; }
  .cred-tit { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--plum-muted); margin-right: auto; }
  .cred-lado .cred-fila b { font-size: 22px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--creme); }
  .cred-lado .cred-fila small { font-size: 13px; color: var(--plum-muted); }
  .cred-sub { font-size: 13px; color: var(--plum-muted); }
  .cred-lado .cred-bar { background: var(--plum-3); border: 0; }
  .cred-lado .cred-bar i { background: var(--brand-lilas); }
  .cred-lado.cred-bajo .cred-bar i, .cred-lado.cred-agotado .cred-bar i { background: #E7BF7A; }
  .cred-lado.cred-agotado .cred-sub { color: #E7BF7A; font-weight: 600; }
  .cred-mini { display: none; }
  .lado-recogido .cred-lado { padding: 10px 0; align-items: center; }
  .lado-recogido .cred-lado > :not(.cred-mini) { display: none; }
  .lado-recogido .cred-mini { display: block; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
}

/* ---------- a barrinha ---------- */
.cred-bar { display: block; height: 6px; border-radius: 999px; overflow: hidden; }
.cred-bar i { display: block; height: 100%; border-radius: inherit; transform-origin: left; transition: transform .5s var(--ease, ease); }
.cred-bar-claro { background: var(--surface-2); border: 1px solid var(--line); }
.cred-bar-claro i { background: var(--brand); }
.cred-bajo .cred-bar-claro i, .cred-agotado .cred-bar-claro i { background: var(--warn); }

/* ---------- número no topo (celular) ---------- */
.cred-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-1); white-space: nowrap; }
.cred-chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cred-chip-txt { color: var(--muted); font-weight: 600; }
.cred-pto { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.cred-chip.cred-bajo { border-color: #E2B86F; background: var(--warn-soft); }
.cred-chip.cred-bajo .cred-pto, .cred-chip.cred-agotado .cred-pto { background: var(--warn); }
.cred-chip.cred-agotado { border-color: #E2B86F; background: var(--warn-soft); color: var(--warn); }
html.cred-on .topo-acc .chip-nicho { max-width: calc(100vw - 300px); }
@media (max-width: 430px) { .cred-chip-txt { display: none; } .cred-chip { padding: 0 11px; } }
@media (max-width: 360px) { html.cred-on .topo-acc .chip-nicho { display: none; } }

/* ---------- a linha no começo das telas onde ela gasta ---------- */
.cred-linea { margin: 0 0 18px; }
.cred-linea-btn { display: flex; flex-direction: column; gap: 8px; width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font: inherit; font-size: 14px; text-align: left; cursor: pointer; box-shadow: var(--shadow-1); }
.cred-linea-btn b { color: var(--ink); }
.cred-linea-btn:hover { border-color: var(--line-2); }
.cred-linea.cred-bajo, .cred-linea.cred-agotado { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px;
  border-radius: var(--r); border: 1px solid #E2B86F; background: var(--warn-soft); color: var(--warn); font-size: 15px; line-height: 1.45; }
.cred-linea.cred-bajo b, .cred-linea.cred-agotado b { color: var(--ink); }
.cred-linea > div { flex: 1 1 260px; }
.cred-btn { min-height: 44px; white-space: nowrap; }
@media (min-width: 920px) { .cred-linea { max-width: 760px; } }

/* ---------- o detalhe ---------- */
.cred-veu { position: fixed; inset: 0; z-index: var(--z-sheet, 30); display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--veu); opacity: 0; transition: opacity .18s var(--ease, ease); }
.cred-veu.cred-on-v { opacity: 1; }
.cred-modal { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 10px 40px oklch(0.20 0.06 320 / .22); padding: 28px 24px 18px;
  transform: translateY(8px); transition: transform .2s var(--ease, ease); }
.cred-on-v .cred-modal { transform: none; }
.cred-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; border-radius: 50%; }
.cred-x:hover { background: var(--surface-2); color: var(--ink); }
.cred-modal h2 { font-family: var(--f-display); font-weight: 500; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 36px 10px 0; }
.cred-msg { margin: 0 0 14px; color: var(--ink-2); }
.cred-grande { margin: 6px 0 0; display: flex; align-items: baseline; gap: 8px; }
.cred-grande b { font-size: 44px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.cred-grande span { font-size: 17px; color: var(--ink-2); font-weight: 600; }
.cred-de { margin: 6px 0 12px; color: var(--muted); font-size: 15px; }
.cred-bar-grande { height: 8px; }
.cred-ritmo { margin: 12px 0 0; color: var(--ink-2); font-size: 15px; }
.cred-modal h3 { margin: 22px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cred-precios { list-style: none; margin: 0; padding: 0; }
.cred-precios li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cred-precios li b { font-weight: 600; white-space: nowrap; color: var(--ink); }
.cred-nota { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.cred-acc { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.cred-acc .btn { min-height: 46px; }
@media (max-width: 480px) { .cred-veu { align-items: flex-end; padding: 0; } .cred-modal { max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .cred-acc { flex-direction: column-reverse; } .cred-acc .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .cred-veu, .cred-modal, .cred-bar i { transition: none; } }

.cred-pronto { flex-basis: 100%; margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--brand-ink); text-align: right; }
.cred-linea .cred-pronto { text-align: left; margin: 0; }
@media (max-width: 480px) { .cred-pronto { text-align: center; } }
