/* tv.css - Painel Fila ao Vivo Responsivo Sem Sombreamento */

/* Tablet container - centralizado, sem sombra */
.tv-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tv-section {
    padding: 2rem 1rem;
  }
}

.tv-tablet {
  width: min(100%, 473px);
  max-width: 100%;
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Título dentro do tablet */
.tv-tablet .slogan {
  font-size: clamp(16px, 4vw, 18px);
  color: var(--gold);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}

/* Indicador LIVE inspirado no YouTube */
.live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FF0000;
  color: #FFFFFF;
  border-radius: 12px;
  padding: 0.3rem 0.6rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 0.5rem;
  min-width: 40px;
  height: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* pequeno círculo branco à esquerda do LIVE */
.live-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #FFFFFF;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
}

/* Grid de cards - 3 em cima, 2 centralizados embaixo para 5 barbeiros (flexbox) */
#painel-tv .tv-tablet-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0;
}

#painel-tv .tv-tablet-cartao {
  flex: 0 0 calc((100% - 2 * 1rem) / 3);
  background: var(--surface);
  border-radius: 50%;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: none;
}

#painel-tv .tv-tablet-cartao:hover {
  transform: none;
}

/* Imagem do barbeiro - sem scale, object-position center center, sem cortar rosto */
.tv-tablet-cartao img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center center;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin-bottom: 0.5rem;
  background: var(--surface);
}

/* Nome do barbeiro */
.tv-tablet-cartao .nome {
  font-size: clamp(10px, 2.5vw, 12px);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.2rem;
  line-height: 1.2;
  width: 100%;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Contador da fila */
.tv-tablet-cartao .contador {
  font-size: clamp(18px, 5vw, 24px);
  font-family: var(--font-display);
  color: var(--gold);
  line-height: 1;
  font-weight: 700;
  width: 100%;
  text-align: center;
}

/* Responsivo: #painel-tv diminui proporcionalmente - flexbox 3 > 2 colunas */
@media (max-width: 480px) {
  #painel-tv .tv-tablet {
    padding: 0.5rem;
  }

  #painel-tv .tv-tablet-grid {
    gap: 0.8rem;
    max-width: 380px;
  }

  #painel-tv .tv-tablet-cartao {
    flex: 0 0 calc((100% - 1 * 0.8rem) / 2);
    padding: 0.3rem;
  }

  #painel-tv .tv-tablet-cartao img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    object-position: center center;
  }

  #painel-tv .tv-tablet-cartao .nome {
    font-size: clamp(9px, 2vw, 10px);
  }

  #painel-tv .tv-tablet-cartao .contador {
    font-size: clamp(16px, 4.5vw, 20px);
  }
}

/* ==========================================
   Ajustes específicos da seção "Fila ao Vivo" no site (index.html)
   Escopados com #painel-tv para NÃO afetar o painel de TV real (fila/tv.html)
   ========================================== */

#painel-tv .slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

#painel-tv .live-badge {
  animation: piscar-live-painel-tv 1.2s ease-in-out infinite;
}

@keyframes piscar-live-painel-tv {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

/* ==========================================
   PAINEL DE TV REAL (fila/tv.html) — restaurado
   Estas classes NÃO têm relação com .tv-tablet / #painel-tv acima
   (usadas só pela seção embutida no index.html). Servem exclusivamente
   à página fila/tv.html, feita para ficar em exibição contínua numa TV.
   ========================================== */

.tv-container {
  min-height: 100vh;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tv-logo {
  height: 100px;
  width: auto;
  margin-bottom: 24px;
}

.tv-titulo {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--gold-light);
  letter-spacing: 2px;
  margin-bottom: 48px;
  text-align: center;
}

.tv-grade {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 1600px;
}

.tv-cartao {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tv-cartao img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 4px solid var(--gold);
  margin-bottom: 20px;
}

.tv-nome {
  font-family: var(--font-body);
  font-size: 28px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 16px;
}

.tv-numero {
  font-family: var(--font-display);
  font-size: 96px;
  color: var(--gold);
  line-height: 1;
}

.tv-legenda {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.tv-rodape {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--muted);
  margin-top: 48px;
  text-align: center;
}

.tv-qrcode {
  width: 180px;
  height: 180px;
  margin-top: 24px;
  border-radius: 12px;
  border: 3px solid var(--gold);
  background: #fff;
  padding: 8px;
}

/* Ajuste para telas menores que 4K/TV, caso a mesma página seja aberta em outro dispositivo */
@media (max-width: 1100px) {
  .tv-grade {
    grid-template-columns: repeat(3, 1fr);
  }

  .tv-titulo {
    font-size: 42px;
  }

  .tv-numero {
    font-size: 64px;
  }
}

@media (max-width: 700px) {
  .tv-grade {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================
   Overlay de ativação de som (fila/tv.html)
   Cobre a tela até o usuário tocar no botão.
   ========================================== */
.tv-som-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.tv-som-overlay-conteudo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tv-som-overlay .tv-logo {
  height: 80px;
  margin-bottom: 16px;
}

.tv-som-titulo {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--gold-light);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.tv-som-descricao {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 28px;
}

.tv-som-ativar {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--bg);
  background: var(--gold);
  border: none;
  border-radius: 16px;
  padding: 20px 40px;
  cursor: pointer;
  animation: piscar-tv-som 1.4s ease-in-out infinite;
}

@keyframes piscar-tv-som {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.tv-som-ativar:hover,
.tv-som-ativar:focus-visible {
  background: var(--gold-light);
  outline: none;
}

@media (max-width: 1100px) {
  .tv-som-titulo {
    font-size: 30px;
  }

  .tv-som-descricao {
    font-size: 16px;
  }

  .tv-som-ativar {
    font-size: 22px;
    padding: 16px 30px;
  }
}