/*
 * Estilos del reproductor Smart TV.
 *
 * Los navegadores de muchos televisores son versiones antiguas que ignoran por
 * completo el sistema de estilos moderno del portal (capas, colores oklch,
 * propiedades lógicas). Por eso el reproductor usa esta hoja independiente,
 * escrita solo con CSS clásico y colores fijos de la paleta Komatsu, que se
 * sirve tal cual sin ningún procesamiento.
 */

.tv-root,
.tv-root * {
  box-sizing: border-box;
}

.tv-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  background-color: #16365f;
  color: #fcfcfd;
  font-family: "Barlow", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.tv-root p,
.tv-root h1,
.tv-root h2,
.tv-root span {
  margin: 0;
}

.tv-display {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
}

/* ---------- Cabecera ---------- */
.tv-header {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 1.2vh 2vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tv-brand {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.tv-logo {
  display: block;
  height: 5vh;
  min-height: 32px;
  width: auto;
  padding: 4px 8px;
  margin-right: 1.2vw;
  border-radius: 4px;
  background-color: #ffffff;
}

.tv-company {
  font-size: 2.8vh;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
}

.tv-sub {
  font-size: 1.9vh;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.7);
}

.tv-clock {
  text-align: right;
}

.tv-time {
  font-size: 4.2vh;
  font-weight: 600;
  line-height: 1;
}

.tv-date {
  font-size: 1.9vh;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Zona de contenido ---------- */
.tv-stage {
  position: relative;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.tv-media {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background-color: #16365f;
}

.tv-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0 6vw;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
}

.tv-eyebrow {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 2.6vh;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6fa8e8;
}

.tv-headline {
  margin-top: 2vh !important;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 8vh;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.tv-headline--small {
  font-size: 6.5vh;
}

.tv-text {
  max-width: 42em;
  margin: 4vh auto 0 auto !important;
  font-size: 3.6vh;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  white-space: pre-line;
}

.tv-text--muted {
  margin-top: 3vh !important;
  font-size: 2.8vh;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Pie ---------- */
.tv-footer {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 1vh 2vw;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1.9vh;
  color: rgba(255, 255, 255, 0.6);
}

.tv-footer-status {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.tv-offline-icon {
  width: 2.2vh;
  height: 2.2vh;
  min-width: 12px;
  min-height: 12px;
  margin-right: 8px;
  color: #e8a33d;
}

/* ---------- Barra de progreso ---------- */
.tv-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.6vh;
  min-height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
}

.tv-progress-fill {
  height: 100%;
  width: 0;
  background-color: #2b74c9;
}

@-webkit-keyframes tv-progress-fill {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes tv-progress-fill {
  from { width: 0%; }
  to { width: 100%; }
}

/* ---------- Aviso de pantalla completa ---------- */
.tv-hint {
  position: absolute;
  bottom: 8vh;
  left: 50%;
  z-index: 50;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  padding: 1.2vh 2.4vw;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 2.2vh;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* =================================================================
 * Lámina del índice UV
 * ================================================================= */
.uv-root {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 4vh 4vw;
  background-color: #16365f;
  color: #fcfcfd;
}

.uv-inner {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.uv-header {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding-bottom: 2.5vh;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.uv-logo {
  display: block;
  height: 5vh;
  width: auto;
  margin-bottom: 1.8vh;
  padding: 0.7vh 0.8vw;
  border-radius: 4px;
  background-color: #ffffff;
}

.uv-title {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 6.6vh;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.uv-title-dot {
  color: rgba(255, 255, 255, 0.4);
}

.uv-date-box {
  padding-bottom: 0.4vh;
  text-align: right;
}

.uv-date {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 2.7vh;
  font-weight: 700;
}

.uv-date::first-letter {
  text-transform: uppercase;
}

.uv-date-sub {
  margin-top: 0.5vh !important;
  font-size: 1.7vh;
  color: rgba(255, 255, 255, 0.65);
}

.uv-body {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  margin: 3vh 0;
  display: -webkit-flex;
  display: flex;
}

.uv-risk {
  position: relative;
  width: 40%;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3vw;
  border-radius: 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.5);
}

.uv-risk--low { background: #2b7336; background-image: linear-gradient(135deg, #3fa64b, #2b7336); }
.uv-risk--moderate { background: #d99a1f; background-image: linear-gradient(135deg, #f2c230, #d99a1f); }
.uv-risk--high { background: #dd5f1c; background-image: linear-gradient(135deg, #ef8127, #dd5f1c); }
.uv-risk--very-high { background: #a83320; background-image: linear-gradient(135deg, #d94f34, #a83320); }
.uv-risk--extreme { background: #6a34a3; background-image: linear-gradient(135deg, #8e4bc9, #6a34a3); }

.uv-risk-caption {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 2.4vh;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.uv-risk-value {
  margin-top: 0.5vh !important;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 7vh;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.uv-number-row {
  position: relative;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  margin-bottom: 1.8vh;
}

.uv-number {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 19vh;
  font-weight: 700;
  line-height: 0.8;
}

.uv-number-caption {
  margin-left: 1vw !important;
  padding-bottom: 0.5vh;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 2.5vh;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.uv-scale-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.8vh;
  display: -webkit-flex;
  display: flex;
}

.uv-scale-bar > div {
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
}

.uv-c-low { background-color: #3fa64b; }
.uv-c-moderate { background-color: #f2c230; }
.uv-c-high { background-color: #ef8127; }
.uv-c-very-high { background-color: #d94f34; }
.uv-c-extreme { background-color: #8e4bc9; }

.uv-side {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin-left: 2vw;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.uv-card {
  padding: 2vw;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.1);
}

.uv-card--epp {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 2vh;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
}

.uv-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.uv-inline {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.uv-icon-box {
  display: -webkit-flex;
  display: flex;
  margin-right: 1vw;
  padding: 1vw;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.15);
}

.uv-label {
  font-size: 1.4vh;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.uv-label--right {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.uv-big {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 3.5vh;
  font-weight: 700;
}

.uv-critical {
  color: #ef8127;
}

.uv-advice {
  margin-top: 2vh !important;
  padding: 1.5vh 1.4vw;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.08);
  font-size: 2.1vh;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

.uv-epp-title {
  margin-bottom: 1.8vh !important;
}

.uv-epp-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.uv-epp-item {
  width: 48.8%;
  min-height: 7vh;
  margin-bottom: 1.4vh;
  padding: 1vh 1vw;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.uv-epp-icon {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  width: 4.5vh;
  height: 4.5vh;
  margin-right: 1vw;
  border-radius: 8px;
  background-color: rgba(43, 116, 201, 0.35);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.uv-epp-text {
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 2vh;
  font-weight: 600;
  line-height: 1.2;
}

.uv-footer {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  font-size: 1.3vh;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.uv-chip {
  display: inline-block;
  margin: 0 0.18vw;
  padding: 0.35vh 0.6vw;
  border-radius: 4px;
  color: #ffffff;
  opacity: 0.35;
}

.uv-chip--active {
  opacity: 1;
}

/* Sin barras de desplazamiento en modo TV. */
html.tv-mode,
html.tv-mode body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #16365f;
}

/* =================================================================
 * Pantalla de vinculación y arranque
 * ================================================================= */
.tv-code {
  margin-top: 6vh !important;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 20vh;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  color: #6fa8e8;
}

.tv-code--waiting {
  font-size: 9vh;
}

.tv-note {
  max-width: 44em;
  margin: 4vh auto 0 auto !important;
  font-size: 2.6vh;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.tv-url {
  display: inline-block;
  margin-top: 1.5vh;
  padding: 0.6vh 1.2vw;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 3vh;
  font-weight: 600;
  color: #ffffff;
}

.tv-splash-logo {
  display: block;
  height: 8vh;
  width: auto;
  margin: 0 auto;
  padding: 1.4vh 1.6vw;
  border-radius: 8px;
  background-color: #ffffff;
}
