@import url('fonts.css');

/* =============================================
  GLOBALES
============================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #000;
  --font-stack: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #000, #6b1d5e, #c84b31);
  font-family: var(--font-stack);
}

body {
  display: flex;
  flex-direction: column;
}

/* =============================================
  Reportes (reportes.html)
============================================= */

.reportes-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.25rem;
}

.reportes-logo {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  margin-bottom: 0.25rem;
}

.categoria-bloque {
  margin-bottom: 0.25rem;
}

.categoria-bloque:last-child {
  margin-bottom: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.categoria-contenido {
  height: 350px;
}

.categoria-mitad {
  flex: 1;
  min-width: 0;
}

.reportes-titulo {
  font-size: 2.35rem;
  font-family: 'BebasNeue', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.05em;
}

.reportes-logo-img {
  height: 70px;
}

.reportes-categoria-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b1d5e;
  border-bottom: 1px solid #dee2e6;
  background: #fff;
}

.minh-0 {
  min-height: 0;
}

.alerta-flotante {
  z-index: 9999;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preloader-logo {
  width: 80px;
  height: 80px;
  animation: pulso 1.5s infinite;
}

@keyframes pulso {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* =============================================
  TV pública (turno.html)
============================================= */

/* ─── Header / Logos ─────────────────────── */

.tv-logos {
  gap: 6vw;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.tv-logos img {
  height: 80px;
  object-fit: contain;
}

/* ─── Imagen / Spinner ───────────────────── */

.tv-main-row .col-6:first-child > div {
  border-bottom-left-radius: 16px;
}

#imgActual {
  opacity: 0;
  transition: opacity 0.3s;
  object-fit: contain;
  border-radius: inherit;
}

#spinnerImg {
  color: #6b1d5e;
}

/* ─── Panel de texto ─────────────────────── */

.tv-panel-texto {
  background-image: url('../img/fnd_col.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  overflow-y: auto;
  border-bottom-right-radius: 16px;
}

#txtTurno {
  width: 100%;
  font-size: clamp(1.2rem, 1.6vw, 1.938rem);
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--text);
}

#txtTurno .titulo {
  line-height: 1;
  font-size: clamp(1.938rem, 2.6vw, 2.5rem);
  font-weight: 700;
}

#txtTurno .subtitulo {
  line-height: 1.1;
  font-size: clamp(1.938rem, 2.3vw, 2.2rem);
  padding: 20px 0;
  font-weight: 700;
}

#txtTurno .descripcion {
  line-height: 0.95;
  text-align: left;
}

#txtTurno .campo-label {
  font-weight: 700;
}

#txtTurno .campo-valor {
  font-weight: 400;
}

.resaltado {
  font-weight: 700;
  text-transform: uppercase;
}

/* =============================================
  RESPONSIVE
============================================= */

@media (width <= 768px) {
  html, body {
    overflow-y: auto;
  }

  body {
    display: block;
  }

  .tv-logos {
    flex-wrap: wrap;
  }

  .tv-logos img {
    height: 50px;
  }

  .container-fluid.flex-grow-1 {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .tv-main-row {
    flex-direction: column;
  }

  .tv-main-row>.col-6 {
    width: 100%;
    height: auto;
  }

  #txtTurno {
    font-size: 1.25rem;
  }

  /* ─── Reportes ─────────────────────────────── */

  .reportes-page {
    min-height: 100vh;
    flex: none;
  }

  .reportes-page>.categoria-bloque {
    height: auto !important;
  }

  .categoria-contenido {
    height: auto !important;
  }

  /* ─── Quitar redondeos en responsive ─────── */

  .tv-logos,
  .tv-main-row .col-6:first-child > div,
  .tv-panel-texto,
  .reportes-logo {
    border-radius: 0 !important;
  }
}
