/*
 * Player de TV. Lido de longe, do outro lado do salão: textos grandes e contraste alto.
 * Cores fixas e flexbox (sem variáveis CSS nem grid), porque o build de compatibilidade roda em TVs com Chrome 38.
 * Telas de espera em azul-poste, com a faixa do poste girando devagar na borda esquerda.
 */
html, body { margin: 0; height: 100%; background: #000; color: #fff; font-family: 'Atkinson Hyperlegible Next Variable', 'Segoe UI', Roboto, Arial, sans-serif; overflow: hidden; cursor: none; }
#palco { position: fixed; top: 0; left: 0; right: 0; bottom: 0; }
.cb-palco img, .cb-palco video { display: block; }

#sobreposicao {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  display: none; align-items: center;
  background: #1e3765;
  padding: 14vh 8vw 8vh 14vh;
  box-sizing: border-box;
  overflow: hidden;
  cursor: default;
}
#sobreposicao.visivel { display: flex; }

/* O poste: listras vermelho, branco e azul-marinho, descendo como um poste girando. */
#sobreposicao::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 5vh;
  background-image: linear-gradient(45deg,
    #c42330 0%, #c42330 12.5%, #fff 12.5%, #fff 25%, #0d1b36 25%, #0d1b36 37.5%, #fff 37.5%, #fff 50%,
    #c42330 50%, #c42330 62.5%, #fff 62.5%, #fff 75%, #0d1b36 75%, #0d1b36 87.5%, #fff 87.5%, #fff 100%);
  background-size: 10vh 10vh;
  animation: cb-poste 9s linear infinite;
}
@keyframes cb-poste { from { background-position: 0 0; } to { background-position: 0 10vh; } }

.marca-tv {
  position: absolute; top: 6vh; left: 14vh;
  font-family: 'Big Shoulders Display Variable', 'Arial Narrow', sans-serif;
  font-weight: 800; font-size: 4.2vh; line-height: 1; color: #fff;
}

.cartao { max-width: 120vh; }
.dica { font-size: 3.8vh; line-height: 1.3; max-width: 34ch; margin: 0 0 1vh; }
.pequeno { font-size: 2.9vh; line-height: 1.35; color: #c9d4e6; margin-top: 1.5vh; max-width: 48ch; }

/* Pareamento: código à esquerda, QR à direita. */
.cartao-pareamento { display: flex; align-items: center; max-width: none; width: 100%; }
.cartao-texto { flex: 1 1 auto; min-width: 0; }
.codigo {
  font-family: 'Big Shoulders Display Variable', 'Arial Narrow', sans-serif;
  font-weight: 900; font-size: 25vh; line-height: 0.9;
  margin: 2.5vh 0 1vh; white-space: nowrap;
}
.letra { display: inline-block; min-width: 0.56em; text-align: center; }
.letra:nth-child(4) { margin-left: 0.3em; }
.qr-bloco { flex: none; margin-left: 9vh; text-align: center; }
.qr { width: 34vh; height: 34vh; background: #fff; padding: 2vh; display: inline-block; border-radius: 1.2vh; }
.qr svg { width: 100%; height: 100%; display: block; }

.botao {
  font: inherit; font-size: 3.4vh; font-weight: 700;
  padding: 2vh 4.5vh; margin-top: 3vh;
  border: 0; border-radius: 0.8vh;
  background: #fff; color: #1e3765; cursor: pointer;
}
.botao:focus { outline: 0.6vh solid #c42330; outline-offset: 0.6vh; }

.progresso { width: 90vh; max-width: 100%; height: 1.6vh; background: rgba(255, 255, 255, 0.2); border-radius: 0.8vh; overflow: hidden; margin: 3vh 0; }
.progresso span { display: block; height: 100%; background: #fff; width: 0; transition: width 0.4s ease-out; }

/* TV em pé (comum em barbearias): código em cima, QR embaixo. */
@media (orientation: portrait) {
  #sobreposicao { padding: 12vh 7vw 6vh 12vw; }
  #sobreposicao::before { width: 5vw; background-size: 10vw 10vw; animation-name: cb-poste-retrato; }
  .marca-tv { left: 12vw; font-size: 5vw; }
  .dica { font-size: 4.6vw; }
  .pequeno { font-size: 3.2vw; }
  .cartao-pareamento { flex-direction: column; align-items: flex-start; }
  .codigo { font-size: 21vw; }
  .qr-bloco { margin: 6vh 0 0; text-align: left; }
  .qr { width: 44vw; height: 44vw; }
  .botao { font-size: 4.4vw; }
}
@keyframes cb-poste-retrato { from { background-position: 0 0; } to { background-position: 0 10vw; } }

@media (prefers-reduced-motion: reduce) {
  #sobreposicao::before { animation: none; }
  .progresso span { transition: none; }
}
