/* SECTION: Climate Page */
body.clima-page {
  font-size: 14px;
}

/* ==========================================================================
   TREMOR-STYLE DESIGN TOKENS — Panel "Estación en vivo" (WeatherLink)
   Inspirado en el sistema de componentes Tremor (tarjetas planas,
   etiquetas en mayúsculas, métricas grandes y badges de estado),
   reconstruido con clases utilitarias de Tailwind + variables de marca
   SEDIR (verde primario / naranja institucional), sin dependencias nuevas.
   ========================================================================== */
.tremor-card {
  background: #fff;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 0.75rem; /* rounded-xl */
  padding: 1.25rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.tremor-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  border-color: #d1d5db;
}
.tremor-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280; /* gray-500 */
}
.tremor-metric {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 700;
  color: #111827; /* gray-900 */
  font-variant-numeric: tabular-nums;
}
.tremor-label {
  font-size: 0.75rem;
  color: #6b7280;
}
.tremor-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  background: rgba(0, 148, 74, 0.1);
  color: #00944a;
  flex-shrink: 0;
}
.tremor-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.tremor-badge-neutral {
  background: #f3f4f6;
  color: #4b5563;
}
.tremor-badge-station {
  background: #eef2ff;
  color: #4338ca;
}
.tremor-badge-up {
  background: #fee2e2;
  color: #b91c1c;
}
.tremor-badge-down {
  background: #dbeafe;
  color: #1d4ed8;
}
.tremor-badge-live {
  background: #dcfce7;
  color: #15803d;
}
.tremor-badge-offline {
  background: #fee2e2;
  color: #b91c1c;
}
.tremor-badge-loading {
  background: #f3f4f6;
  color: #6b7280;
}
.tremor-badge-warning {
  background: #fef3c7;
  color: #92400e;
}
/* ==========================================================================
   LIGHTBOX — Histórico de la estación meteorológica (doble clic para ampliar)
   ========================================================================== */
.estacion-img {
  cursor: zoom-in;
}

.estacion-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  background: rgba(0, 3, 6, 0.86);
  cursor: zoom-out;
  animation: estacion-lightbox-fade 0.18s ease;
}

.estacion-lightbox.hidden {
  display: none;
}

.estacion-lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.estacion-lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.estacion-lightbox__caption {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.9;
}

.estacion-lightbox__hint {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  text-align: center;
  padding: 0 1rem;
}

.estacion-lightbox__cerrar {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.estacion-lightbox__cerrar:hover,
.estacion-lightbox__cerrar:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.estacion-lightbox__cerrar .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}

body.estacion-lightbox-open {
  overflow: hidden;
}

@keyframes estacion-lightbox-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Pulso sutil del punto de estado "en línea" ya definido en el badge live/offline */
.tremor-badge-live .clima-live-dot,
#wl-estado .w-2 {
  animation: clima-pulse 1.8s ease-in-out infinite;
}

@keyframes clima-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}


.clima-page-hero {
  position: center;
  min-height: 379px;
  overflow: hidden;
  background: #006b34;
  color: #ffffff;
}

.clima-page-hero__pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 32px 32px;
}

.clima-page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(to right, #006b34, #008643);
  opacity: 0.9;
}

.clima-page-hero__inner {
  position: relative;
  z-index: 20;
  max-width: 1521px;
}

/* content spacing handled by container padding in component */

.clima-station-label {
  font-family: "Hanken Grotesk", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  fill: #0f172a;
}

.clima-page-section {
  width: 100%;
}

.clima-page-section--spaced {
  padding-top: 3rem;
}

.clima-page-card {
  border-radius: 0.75rem;
}

/* Histórico Estación Meteorológica: chips de variables */
.estacion-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 107, 52, 0.25);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.estacion-chip:has(.estacion-chip__input:checked) {
  background: #006b34;
  border-color: #006b34;
  color: #fff;
}

.estacion-chip__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* ============================================================================
   Dashboard de Clima — Tooltip flotante "Corriente / Baja / Alta"
   Aparece al pasar el cursor sobre cualquiera de los gráficos del dashboard.
   ============================================================================ */
.wl-chart-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  min-width: 148px;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  background: #20302B;
  color: #F5F3EC;
  box-shadow: 0 8px 24px rgba(32, 48, 43, 0.28);
  font-size: 0.75rem;
  line-height: 1.35;
}

.wl-chart-tooltip-title {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #A9C4B8;
  margin-bottom: 0.35rem;
}

.wl-chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.wl-chart-tooltip-row span {
  color: #C7D3CC;
}

.wl-chart-tooltip-row b {
  font-weight: 700;
  color: #FFFFFF;
}

.wl-chart-tooltip-low b {
  color: #9FC7FF;
}

.wl-chart-tooltip-high b {
  color: #FFC98C;
}

/* Hero content max width */
.clima-hero-content {
  max-width: 1296px;
  width: 100%;
}