@font-face {
  font-family: "Conthrax";
  src: url("{{ url_for('static', filename='css/Conthrax-SemiBold.otf') }}")
    format("opentype");
  font-weight: normal;
  font-style: normal;
}

body,
button,
div,
span {
  font-family: "Conthrax", sans-serif;
}

#infoPanel {
  box-shadow: inset 0px 0px 15px 15px red;
}

#infoPanel.fade {
  box-shadow: none;
}

.contenedor {
  padding: 20px;
  color: #ffff;
  height: 566px;
  width: 350px;
  background-color: rgba(0, 0, 0, 0.65);
  border-radius: 15px;
  font-family: sans-serif;
}

button:active {
  transform: scale(
    0.95
  ); /* Hace que el botón se haga más pequeño al presionar */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Agrega una sombra para dar la sensación de profundidad */
}

.contenedor-Aspersor {
  display: flex;
}
.colDiv {
  width: 50%;
}

.styleContent {
  float: right;
  width: 79%;
}

#heightTipoRiego {
  height: 22%;
}

.styleFila {
  font-size: 25px;
  margin-top: 10px;
}

.style-reg {
  padding-top: 45px;
  font-size: 29px;
}

#regadoContinuo {
  padding-top: 10px;
  padding-left: 37px;
}

.video-marco-outer {
  position: relative;
  width: 900px; /* tamaño del PNG marco */
  height: 700px; /* tamaño del PNG marco */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  /* Opcional: para que nunca se pase de la pantalla */
  max-width: 90vw;
  max-height: 90vh;
}

.sat-base img.leaflet-tile {
  filter: saturate(0.35) contrast(1) brightness(1.2);
}

.marco-png-absolute {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* Panel de botones */
.panel-botones-overlay {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(30, 30, 30, 0.85);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 12px #000a;
  z-index: 2;
}

.panel-botones-overlay button {
  padding: 18px 26px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  font-family: "Conthrax", sans-serif;
  font-weight: bold;
  background: #0984e3;
  color: white;
  transition: 0.2s;
  width: 220px;
  box-shadow: 0 0 8px #000a;
}

.panel-botones-overlay button#btn-detener {
  background: #e74c3c;
}
.panel-botones-overlay button:last-child {
  background: #95a5a6;
  color: black;
}

#contenedorAspersor {
  margin-top: 23px;
  padding-bottom: 64px;
}

#marginTopAsp {
  margin-top: 10px;
}

.styleZona {
  font-size: 26px;
  text-align: center;
  padding-left: 49px;
  margin-top: 15px;
  margin-left: 70px;
  margin-bottom: 12px;
}

#contenedorTipoRiegoSeg {
  margin-top: -37px;
}
#contenedorTipoRiego {
  margin-top: -19px;
}

.contenedor1 {
  border-top: solid 1px #fff;
  width: 100%;
  height: 23%;
}

#aspersorContainer {
  padding-top: 17px;
}
.contenedor-Aspersor2 {
  display: flex;
  justify-content: center;
  padding: 5px;
}

.aspersor {
  font-size: 17px;
  text-align: center;
  width: 20%;
  height: 60px;
  margin: 2px;
  border-radius: 5px;
  border-style: ridge;
}

.img-asp {
  padding-top: 3px;
}

#marginTipoRiego {
  margin-left: -15px;
}

.contenedor-flecha {
  margin-left: 8px;
  width: 100%;
  height: 50px;
}

.styleTipo {
  text-align: center;
  padding: 8px;
  font-size: 30px;
}
.contenedorTitulo {
  margin-top: -10px;
  text-align: center;
}

.styleTitulo {
  background: #504f4ff2;
  padding-left: 5px;
  padding-right: 5px;
  text-transform: uppercase;
  font-size: 15px;
}

.style-zona {
  padding: 4px;
  font-size: 25px;
}
#contenedorVelMax {
  margin-bottom: 11px;
  margin-top: 10px;
}

.contenidoZona {
  display: flex;
  padding-top: 20px;
  justify-content: center;
}

.aspersorVacio {
  height: 30px;
  width: 55px;
}

.aspContenido {
  width: 60%;
  display: flex;
}

.styleTituloAspe {
  width: 40%;
  display: flex;
  flex-direction: column;
  padding-top: 14px;
}

.styleMax {
  font-size: 30px;
}

#modalCamara {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background-color: #000;
  overflow: hidden;
}

header#header-operacion {
  height: 36px;
  background: #2d3436;
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.33rem;
  font-weight: bold;
  z-index: 2;
}

.camara-flex-contenedor {
  display: flex;
  flex-direction: row;
  flex: 1;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.sidebar-botones {
  background: linear-gradient(
    to bottom,
    #1e1e1e,
    #2e2e2e
  ); /* gris oscuro a menos oscuro */
  border-radius: 16px;
  padding: 24px 12px;
  box-shadow: 0 0 16px #000a;
  min-height: 500px;
}

.sidebar-botones button {
  background: #111;
  color: white;
  padding: 14px 20px;
  border: 2px solid #333;
  border-radius: 8px;
  font-size: 16px;
  width: 190px;
  font-family: "Conthrax", sans-serif;
  font-weight: bold;
  transition: 0.2s ease;
  box-shadow: 0 0 6px #0006;
}

.sidebar-botones button#btn-agua {
  background: #f39c12; /* naranja minería */
  border-color: #e67e22;
  color: #111;
}

.sidebar-botones button#btn-sulf,
.sidebar-botones button#btn-llenado-agua-ia,
.sidebar-botones button#btn-llenado-ia {
  background: #3498db;
  color: white;
}

.sidebar-botones button#btn-detener {
  background: #e74c3c;
  color: white;
}

.sidebar-botones button:last-child {
  background: #95a5a6;
  color: #111;
  font-size: 18px;
}

.video-flex-right {
  /* ya no pongas height: 100vh */
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 1vw;
}

#videoHLS {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
  background: black;
}
.video-fullscreen-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
  background: black;
}

.marco-png-absolute {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  object-fit: contain;
}

#footer-operacion {
  position: static;
  margin-top: -20px;
}

#modo-operacion-indicador {
  font-size: 1.33rem;
  font-weight: bold;
  padding: 0 32px;
}

.logo-superior {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 100px;
  height: auto;
  z-index: 10002;
  pointer-events: none;
}

.nomargin {
  margin: 0px;
  width: 32px;
  height: 32px;
}
.nopadding {
  padding: 0px;
  width: 32px;
  height: 32px;
}
.legend {
  opacity: 0.75;
}
.legend-top5 {
  background: #00000099;
  padding: 10px;
  color: #ffffff;
  font-size: 150%;
}
.legend-top5 table th {
  color: #ffffff;
  padding-left: 4px;
  padding-right: 4px;
  padding-bottom: 0px;
}
.legend-top5 table td button {
  font-size: 125%;
  font-weight: bold;
}

button:disabled,
button[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  filter: grayscale(0.6) !important;
  background: #cccccc !important;
  color: #888 !important;
  pointer-events: none !important; /* ESTO EVITA CLICS FÍSICOS O TOQUES */
  transition: none !important;
}

button:disabled:active,
button[disabled]:active,
button:disabled:focus,
button[disabled]:hover {
  background: #cccccc !important;
  box-shadow: none !important;
  outline: none !important;
  filter: grayscale(0.6) !important;
}

.modo-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  font-size: 1.35rem;
  font-weight: bold;
  color: #fff;
  background: #636e72;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  box-shadow: 0 2px 8px #0004;
  outline: none;
}
.modo-btn.selected,
.modo-btn:active {
  background: #0984e3 !important;
  color: #fff;
  box-shadow: 0 4px 14px #00cfff80;
}

#footer-operacion {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  background: rgba(38, 51, 63, 0.97); /* o tu color corporativo */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20005; /* sobre el modal pero bajo otros popups */
  box-shadow: 0 -2px 12px #0007;
  font-family: "Conthrax", sans-serif;
  letter-spacing: 0.5px;
}

#modo-operacion-indicador {
  font-size: 1.33rem;
  font-weight: bold;
  padding: 0 32px;
}

#feedback-operacion-container {
  background-color: #2d3436;
  color: white;
  padding: 12px;
  text-align: center;
  font-size: 16px;
  width: 100%;
  position: relative;
  z-index: 9999;
}

#estado-feedback {
  position: absolute;
  top: 12px;
  right: 20px;
  background-color: #2d3436;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10;
}

/* Estado flotante */
#estado-camion-overlay {
  position: absolute;
  top: 12px;
  right: 20px;
  background-color: rgba(255, 192, 203, 0.85);
  color: #2d3436;
  border-radius: 12px;
  padding: 12px 16px;
  z-index: 2;
  font-size: 24px;
  font-family: "Conthrax", sans-serif;
  line-height: 1.4;
  box-shadow: 0 0 8px #0005;
}

#estado-camion-overlay .linea-estado {
  font-weight: bold;
}

#estado-operacion-inferior {
  position: fixed;
  bottom: 32px;
  right: 24px;
  background-color: #2d3436;
  color: white;
  font-weight: bold;
  font-size: 30px;
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 99999;
}

.camara-superior {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.camara-inferior {
  height: 40px;
  background: #26333f;
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Conthrax", sans-serif;
  z-index: 2;
}

:root {
  --hud-bg: rgba(20, 20, 20, 0.85);
  --hud-border: rgba(255, 255, 255, 0.08);
  --hud-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.hud {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10010;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
  pointer-events: none; /* no bloquea clics al mapa/video */
}
.hud-card {
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--hud-shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans";
  pointer-events: auto; /* permite seleccionar texto si quieres */
}
.hud-card .label {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.4px;
}
.hud-speed {
  font-weight: 600;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

#hud-speed-card .label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #ffffff;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.25);
}

.hud-speed .value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.hud-speed .unit {
  font-size: 14px;
  opacity: 0.8;
  margin-left: 2px;
}
.hud-stamp {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 6px;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d7d7d;
}
.dot.fresh {
  background: #29d86f;
}
.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.hud-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

#hud-polvo-card .hud-major {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#hud-polvo-card .unit {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
}
#hud-polvo-card .hud-sub {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#hud-polvo-card .sep {
  opacity: 0.5;
}

#hud-riego-card .hud-major {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#hud-riego-card .unit {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
}
#hud-riego-card .hud-sub {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#hud-riego-card .sep {
  opacity: 0.5;
}

/* === HUD Nivel del Estanque === */
#hud-nivel-card .label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #ffffff;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.25);
}

/* Valor principal (porcentaje) */
.hud-nivel-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 4px;
}

.hud-nivel-value {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.hud-bar-container {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
}

.hud-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5b300, #ffcc33, #ffe680);
  transition: width 0.6s ease;
}

/* Subtexto volumen */
#hud-nivel-card .hud-sub {
  font-size: 12px;
  text-align: center;
  opacity: 0.9;
  color: #dcdcdc;
}

/* === HUD Volumen Acumulado === */
#hud-volumen-card .label {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.hud-volumen {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 2px;
}

#hud-volumen-card .value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

#hud-volumen-card .unit {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
  color: #ffffff;
}

#hud-volumen-card .hud-sub {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.8;
  text-align: center;
  color: #e0e0e0;
}

.hud-title {
  font-size: 32px; /* Un poco más equilibrado visualmente */
  font-weight: 800;
  letter-spacing: 1.5px;
  margin: 0 0 10px 0;
  padding: 8px 18px;
  color: #fff;
  text-transform: uppercase;
  background: linear-gradient(180deg, #3a3a3a 0%, #1b1b1b 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

/* === Responsive (tablet vertical) === */
@media (max-width: 1024px) {
  .hud-card {
    width: 200px;
    padding: 10px 12px;
  }
  .hud-nivel-value {
    font-size: 32px;
  }
}

/* Responsive: reduce un poco en pantallas angostas */
@media (max-width: 640px) {
  .hud {
    right: 12px;
    top: 12px;
    width: 160px;
  }
  .hud-speed .value {
    font-size: 36px;
  }
}

.popup-mensaje {
  position: fixed;
  top: 30px;
  left: -400px;
  background: #1e1e1e; /* Gris oscuro carbón */
  color: #ffffff; /* Texto blanco */
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.5s ease;
  z-index: 9999;
  opacity: 0;
}

.popup-mensaje.visible {
  left: 30px;
  opacity: 1;
}

.popup-mensaje.error {
  background: #e74c3c;
}

