/* Vitrine de Super Odds, cupom proprio e bilhete (tela.js).
   Linguagem: placa de substituicao do quarto arbitro (odd velha sai em vermelho, turbinada entra em verde)
   e bilhete impresso de casa de aposta. Nada de gradiente decorativo. */

.t-so { margin: 4px 0 14px; }
.t-so[hidden] { display: none !important; }
.t-so__topo {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 10px;
}
.t-so__tit strong {
  display: block;
  font: 700 17px/1.1 'Archivo', system-ui, sans-serif;
  font-stretch: 86%;
  color: #fff;
}
.t-so__tit span {
  display: block;
  margin-top: 3px;
  font: 500 12px/1.2 'Archivo', system-ui, sans-serif;
  color: var(--t-tx3, #6C7485);
}
.t-so__nav { display: flex; gap: 6px; }
.t-so__seta {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--t-line2, rgba(214, 224, 245, .12));
  color: var(--t-tx2, #A2AAB9);
  cursor: pointer;
  transition: color .15s, box-shadow .15s;
}
.t-so__seta svg { width: 16px; height: 16px; fill: currentColor; }
.t-so__seta:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .3); }
.t-so__seta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.t-so__trilho {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 1px 1px 4px;
  overscroll-behavior-x: contain;
}
.t-so__trilho::-webkit-scrollbar { display: none; }

.t-so-card {
  flex: 0 0 272px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 13px 12px;
  border: 0;
  border-radius: 14px;
  text-align: left;
  color: var(--t-tx, #EEF1F6);
  background: #12151C;
  box-shadow: inset 0 0 0 1px var(--t-line2, rgba(214, 224, 245, .12));
  scroll-snap-align: start;
  cursor: pointer;
  font-family: 'Archivo', system-ui, sans-serif;
  transition: box-shadow .15s, transform .12s;
}
.t-so-card:hover { box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .28); }
.t-so-card:active { transform: scale(.985); }
.t-so-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.t-so-card:disabled { cursor: default; }
.t-so-card.is-suspensa .t-placa { opacity: .35; }

.t-so-card__l1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--t-tx3, #6C7485);
}
.t-so-card__liga { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-so-card__prazo { flex: 0 0 auto; color: var(--t-tx2, #A2AAB9); font-weight: 600; }
.t-so-card__vivo {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--t-live, #FF3D55);
}
/* relogio de jogo: so o apostrofo do minuto pisca, como no placar do estadio */
.t-so-card__vivo i { font-style: normal; animation: t-apostrofo 1s steps(1) infinite; }
@keyframes t-apostrofo { 50% { opacity: 0; } }
.t-so-card__jogo {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 2px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.t-so-card__jogo span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; grid-column: 1; }
.t-so-card__jogo em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-size: 18px;
  font-weight: 800;
  font-stretch: 80%;
}
.t-so-card__palpite { display: flex; flex-direction: column; gap: 2px; min-height: 34px; }
.t-so-card__palpite strong { font-size: 13px; font-weight: 700; color: #fff; }
.t-so-card__palpite span { font-size: 12.5px; color: var(--t-tx2, #A2AAB9); }
.t-so-card__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.t-so-card__cta {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--t-on-acc, #0A0C10);
  background: var(--t-acc, #EEF2F8);
}
.t-so-card:disabled .t-so-card__cta { background: rgba(214, 224, 245, .08); color: var(--t-tx2, #A2AAB9); }

/* ---------- placa de substituicao (LED) ---------- */
.t-placa {
  --led-apagado: rgba(255, 255, 255, .055);
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px 6px;
  border-radius: 7px;
  background-color: #040506;
  background-image: radial-gradient(var(--led-apagado) .9px, transparent 1.1px);
  background-size: 4px 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 -8px 14px rgba(0, 0, 0, .6);
  font-family: 'Doto', 'Archivo', ui-monospace, monospace;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.t-placa__sai,
.t-placa__entra {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.t-placa__sai { font-size: 15px; color: #FF3B30; text-shadow: 0 0 6px rgba(255, 59, 48, .55); }
.t-placa__entra { font-size: 22px; color: #34F27A; text-shadow: 0 0 7px rgba(52, 242, 122, .55); }
/* setas da placa: vermelha pra baixo (sai), verde pra cima (entra) */
.t-placa__sai::before,
.t-placa__entra::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.t-placa__sai::before { border-top: 6px solid currentColor; }
.t-placa__entra::before { border-bottom: 7px solid currentColor; }
/* quando o cartao aparece, a placa acende o numero novo uma vez (LED ligando) */
.t-so-card.is-visto .t-placa__entra { animation: t-led-acende .9s steps(1, end) both; }
@keyframes t-led-acende {
  0%, 35% { opacity: .1; text-shadow: none; }
  45% { opacity: 1; }
  52% { opacity: .25; }
  62%, 100% { opacity: 1; }
}

@media (max-width: 767px) {
  .t-so { margin: 6px 0 12px; }
  .t-so-card { flex-basis: 84%; max-width: 310px; }
}

/* ---------- digito de placar: odd que muda rola ---------- */
.t-rola { animation: t-rola-desce .34s cubic-bezier(.2, .8, .2, 1); }
.up .t-rola, .t-rola.up { animation-name: t-rola-sobe; }
@keyframes t-rola-desce { from { transform: translateY(-60%); opacity: 0; } }
@keyframes t-rola-sobe { from { transform: translateY(60%); opacity: 0; } }

/* ---------- cupom ---------- */
.t-cupom-fundo {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 5, 8, .66);
  animation: t-cupom-fundo .18s ease both;
  font-family: 'Archivo', system-ui, sans-serif;
}
.t-cupom-fundo.is-saindo { animation: t-cupom-fundo .16s ease reverse both; }
@keyframes t-cupom-fundo { from { opacity: 0; } }
.t-cupom {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  max-height: calc(100% - 8px);
  overflow: hidden;
  border-radius: 16px;
  background: #12151C;
  box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .12), 0 30px 60px -30px rgba(0, 0, 0, .9);
  color: #EEF1F6;
  animation: t-cupom-sobe .26s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes t-cupom-sobe { from { transform: translateY(14px); opacity: 0; } }
@media (max-width: 767px) {
  .t-cupom-fundo { align-items: flex-end; padding: 0; }
  .t-cupom { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .t-cupom::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 4px;
    background: rgba(214, 224, 245, .18);
  }
}
.t-cupom__topo { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.t-cupom__topo strong { font-size: 16px; font-weight: 700; font-stretch: 86%; }
.t-cupom__fechar {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .12);
  cursor: pointer;
}
.t-cupom__fechar svg { width: 16px; height: 16px; fill: #A2AAB9; }
.t-cupom__fechar:hover svg { fill: #fff; }
/* so o miolo rola; o botao fica sempre preso no rodape, ate com o celular deitado */
.t-cupom__corpo,
.t-bilhete-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.t-cupom__topo,
.t-cupom__apostar { flex: 0 0 auto; }
.t-cupom__corpo { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 4px; }
.t-cupom__liga { font-size: 12px; color: #6C7485; }
.t-cupom__jogo { margin-top: -8px; font-size: 16px; font-weight: 700; color: #fff; }
.t-cupom__linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(214, 224, 245, .08);
  border-bottom: 1px solid rgba(214, 224, 245, .08);
}
.t-cupom__linha > div strong { display: block; font-size: 13.5px; }
.t-cupom__linha > div span { display: block; font-size: 13px; color: #A2AAB9; }
.t-cupom__campo span { display: block; margin-bottom: 6px; font-size: 12px; color: #A2AAB9; }
.t-cupom__valor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 12px;
  background: #0A0C10;
  box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .14);
  transition: box-shadow .15s;
}
.t-cupom__valor:focus-within { box-shadow: inset 0 0 0 1.5px #EEF2F8; }
.t-cupom__valor i { font-style: normal; font-weight: 700; color: #6C7485; }
.t-cupom__valor input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  font-stretch: 84%;
}
.t-cupom__fichas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.t-cupom__fichas button {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .12);
  color: #EEF1F6;
  font: 700 14px/1 'Archivo', system-ui, sans-serif;
  font-stretch: 86%;
  cursor: pointer;
  transition: box-shadow .12s, background .12s, transform .1s;
}
.t-cupom__fichas button:hover { box-shadow: inset 0 0 0 1px rgba(214, 224, 245, .3); }
.t-cupom__fichas button:active { transform: scale(.96); background: rgba(214, 224, 245, .06); }
.t-cupom__fichas button:focus-visible,
.t-cupom__apostar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.t-cupom__premio { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: #A2AAB9; }
.t-cupom__premio strong { font-size: 18px; font-stretch: 84%; color: #fff; }
.t-cupom__regra { margin: -4px 0 0; font-size: 11.5px; color: #6C7485; }
.t-cupom__aviso { margin: 0; font-size: 13px; line-height: 1.4; }
.t-cupom__aviso.is-erro {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 61, 85, .08);
  box-shadow: inset 3px 0 0 #FF3D55;
  color: #FFC2CA;
}
.t-cupom__apostar {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 16px;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: #EEF2F8;
  color: #0A0C10;
  font: 800 15px/1 'Archivo', system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s, opacity .15s, transform .1s;
}
.t-cupom__apostar:hover:not(:disabled) { background: #fff; }
.t-cupom__apostar:active:not(:disabled) { transform: scale(.985); }
.t-cupom__apostar:disabled { opacity: .4; cursor: default; }
/* confirmando: barra fina correndo por baixo do texto, sem brilho */
.t-cupom.is-enviando .t-cupom__apostar {
  position: relative;
  opacity: 1;
  overflow: hidden;
}
.t-cupom.is-enviando .t-cupom__apostar::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30%;
  height: 3px;
  background: #0A0C10;
  animation: t-corre 1s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes t-corre { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* ---------- bilhete impresso ---------- */
.t-cupom.is-ok { background: #0E1117; }
.t-bilhete-area { padding: 18px 16px 0; }
.t-bilhete {
  --papel: #EDEBE4;
  position: relative;
  padding: 18px 16px 16px;
  background: var(--papel);
  color: #15171B;
  font-family: 'Archivo', system-ui, sans-serif;
  /* picote em cima e embaixo */
  -webkit-mask:
    radial-gradient(circle 5px at 50% 0, transparent 98%, #000) top / 14px 51% repeat-x,
    radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) bottom / 14px 51% repeat-x;
  mask:
    radial-gradient(circle 5px at 50% 0, transparent 98%, #000) top / 14px 51% repeat-x,
    radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) bottom / 14px 51% repeat-x;
  animation: t-imprime 1.1s steps(14, end) both;
}
/* sai da impressora termica em passos, de cima pra baixo */
@keyframes t-imprime { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.t-bilhete__cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.t-bilhete__cab strong { font-size: 17px; font-weight: 800; font-stretch: 86%; }
.t-bilhete__cab span { font-size: 11px; color: #5B5F66; font-variant-numeric: tabular-nums; }
.t-bilhete__num { margin-top: 3px; font-size: 11px; letter-spacing: .04em; color: #5B5F66; font-variant-numeric: tabular-nums; }
.t-bilhete__jogo { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed #B9B6AC; font-size: 14px; font-weight: 700; }
.t-bilhete dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 16px;
  margin: 10px 0 0;
  font-size: 13px;
}
.t-bilhete dt { color: #5B5F66; }
.t-bilhete dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-bilhete__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #B9B6AC;
  font-size: 13px;
  color: #5B5F66;
}
.t-bilhete__total strong { font-size: 20px; font-weight: 800; font-stretch: 84%; color: #15171B; }
.t-bilhete__pe { margin: 10px 0 0; font-size: 11.5px; color: #5B5F66; }
.t-cupom.is-ok .t-cupom__apostar { margin-top: 16px; }

/* telas baixas (celular deitado): cupom compacto */
@media (max-height: 520px) {
  .t-cupom__topo { padding-top: 10px; }
  .t-cupom__corpo { gap: 8px; padding-top: 8px; }
  .t-cupom__valor input { height: 42px; font-size: 19px; }
  .t-cupom__fichas button { height: 34px; }
  .t-cupom__linha { padding: 8px 0; }
  .t-cupom__apostar { height: 44px; margin: 8px 16px 10px; }
  .t-cupom__regra { display: none; }
  .t-bilhete-area { padding-top: 10px; }
  .t-bilhete { padding: 14px 14px 12px; }
}
@media (max-width: 767px) and (max-height: 520px) {
  .t-cupom-fundo { align-items: center; padding: 6px; }
  .t-cupom { max-width: 460px; border-radius: 14px; max-height: calc(100% - 4px); }
  .t-cupom::before { display: none; }
}

/* casa em modo teste (sandbox): selo fixo, nao pega toque */
.t-teste {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 2147483001;
  transform: translateX(-50%);
  padding: 7px 12px 6px;
  border-radius: 8px;
  background: #FFB020;
  color: #0A0C10;
  font: 800 11.5px/1 'Archivo', system-ui, sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .7);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-so *, .t-cupom-fundo, .t-cupom, .t-cupom *, .t-rola, .t-bilhete { animation: none !important; transition: none !important; }
}
