/* Custom Scrollbar para paneles laterales */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Transiciones para las tarjetas de mapas base */
.basemap-card {
  transition: all 0.2s ease-in-out;
}
.basemap-card:hover {
  transform: translateY(-1px);
}

/* InfoBox de Cesium con estilo adaptado */
.cesium-infoBox {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}
.cesium-infoBox-title {
  background: #1e293b !important;
  color: #f8fafc !important;
  font-family: inherit !important;
}




/* Forzar visibilidad y estilo del InfoBox de Cesium como Pop-Up Flotante 2D */
.cesium-viewer-infoBoxContainer {
  top: 80px !important;
  right: 20px !important;
  z-index: 9999 !important;
}

.cesium-infoBox {
  background: #ffffff !important;
  color: #1e293b !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid #cbd5e1 !important;
  width: 260px !important;
  max-height: 300px !important;
}

.cesium-infoBox-title {
  background: #f8fafc !important;
  color: #0f172a !important;
  font-weight: bold !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 8px 12px !important;
}

.cesium-infoBox-description {
  padding: 4px !important;
}

.cesium-infoBox-iframe {
  border: none !important;
  width: 100% !important;
  height: 120px !important;
}
/* Grilla climática: bordes nítidos al hacer zoom */
.climate-grid-overlay {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Etiquetas permanentes de activos en Leaflet */
.leaflet-tooltip.asset-label {
  background: rgba(13, 31, 45, 0.85);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.leaflet-tooltip.asset-label::before { display: none; }

/* =====================================================================
   TEMA CLARO — reasigna las clases Tailwind del tema oscuro
   (se activa con <html data-theme="light">)
   ===================================================================== */
html[data-theme="light"] :is([class^="bg-[#0f172a]"], [class*=" bg-[#0f172a]"]) { background-color: rgba(255,255,255,0.86) !important; }
html[data-theme="light"] :is([class^="bg-slate-950"], [class*=" bg-slate-950"]) { background-color: rgba(248,250,252,0.92) !important; }
html[data-theme="light"] :is([class^="bg-slate-900"], [class*=" bg-slate-900"]) { background-color: #f1f5f9 !important; }
html[data-theme="light"] :is([class^="bg-slate-800"], [class*=" bg-slate-800"]) { background-color: #e2e8f0 !important; }
html[data-theme="light"] input:is([class^="bg-slate-9"],[class*=" bg-slate-9"]), html[data-theme="light"] select:is([class^="bg-slate-9"],[class*=" bg-slate-9"]), html[data-theme="light"] select:is([class^="bg-[#0f172a]"],[class*=" bg-[#0f172a]"]) { background-color: #ffffff !important; color: #0f172a !important; }
html[data-theme="light"] [class*="from-slate-800"] { background-image: linear-gradient(to right, #e2e8f0, #f8fafc, #f1f5f9) !important; }
html[data-theme="light"] [class*="hover:bg-slate-8"]:hover, html[data-theme="light"] [class*="hover:bg-slate-9"]:hover, html[data-theme="light"] [class*="hover:bg-[#0f172a]"]:hover { background-color: #e2e8f0 !important; }
html[data-theme="light"] body { background-color: #f8fafc; }
html[data-theme="light"] :is([class^="border-slate-600"], [class*=" border-slate-600"]) { border-color: #cbd5e1 !important; }
html[data-theme="light"] :is([class^="border-slate-700"], [class*=" border-slate-700"]) { border-color: #cbd5e1 !important; }
html[data-theme="light"] :is([class^="border-slate-800"], [class*=" border-slate-800"]) { border-color: #e2e8f0 !important; }
html[data-theme="light"] [class*="divide-slate-800"] > * + * { border-color: #e2e8f0 !important; }
html[data-theme="light"] [class~="text-white"]:not([class*="bg-blue-6"]):not([class*="bg-blue-7"]):not([class*="bg-green-6"]):not([class*="bg-emerald-6"]):not([class*="bg-red-6"]) { color: #0f172a !important; }
html[data-theme="light"] [class~="text-slate-100"] { color: #0f172a !important; }
html[data-theme="light"] [class~="text-slate-200"] { color: #1e293b !important; }
html[data-theme="light"] [class~="text-slate-300"] { color: #334155 !important; }
html[data-theme="light"] [class~="text-slate-400"] { color: #475569 !important; }
html[data-theme="light"] [class~="text-slate-500"] { color: #64748b !important; }
html[data-theme="light"] [class~="text-slate-600"] { color: #94a3b8 !important; }
html[data-theme="light"] [class*="hover:text-white"]:not([class*="bg-blue-6"]):not([class*="bg-blue-7"]):not([class*="bg-green-6"]):not([class*="bg-emerald-6"]):not([class*="bg-red-6"]):hover { color: #0f172a !important; }
html[data-theme="light"] .group:hover [class*="group-hover:text-white"] { color: #0f172a !important; }
html[data-theme="light"] [class*="placeholder-slate"]::placeholder, html[data-theme="light"] [class*="placeholder:text-slate"]::placeholder { color: #94a3b8 !important; }
html[data-theme="light"] [class~="text-blue-300"] { color: #1d4ed8 !important; }
html[data-theme="light"] [class~="text-blue-400"] { color: #2563eb !important; }
html[data-theme="light"] [class~="text-green-400"] { color: #15803d !important; }
html[data-theme="light"] [class~="text-emerald-400"] { color: #047857 !important; }
html[data-theme="light"] [class~="text-amber-100"] { color: #78350f !important; }
html[data-theme="light"] [class~="text-amber-300"] { color: #b45309 !important; }
html[data-theme="light"] [class~="text-amber-400"] { color: #b45309 !important; }
html[data-theme="light"] [class~="text-rose-200"] { color: #9f1239 !important; }
html[data-theme="light"] [class~="text-rose-300"] { color: #be123c !important; }
html[data-theme="light"] [class~="text-rose-400"] { color: #be123c !important; }
html[data-theme="light"] [class~="text-red-400"] { color: #dc2626 !important; }
html[data-theme="light"] [class~="text-emerald-200"] { color: #065f46 !important; }
html[data-theme="light"] .custom-scrollbar::-webkit-scrollbar-track { background: #e2e8f0; }
html[data-theme="light"] .custom-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; }
html[data-theme="light"] #welcome-modal > div, html[data-theme="light"] #about-modal > div, html[data-theme="light"] #admin-welcome-modal > div { background-color: #ffffff !important; }
html[data-theme="light"] header { box-shadow: 0 10px 25px -10px rgba(15,23,42,0.25) !important; }
html[data-theme="light"] .leaflet-container { background: #e5e7eb; }
html[data-theme="light"] :is([class^="bg-sky-950"], [class*=" bg-sky-950"], [class^="bg-amber-950"], [class*=" bg-amber-950"], [class^="bg-emerald-950"], [class*=" bg-emerald-950"], [class^="bg-violet-950"], [class*=" bg-violet-950"]) { background-color: #f1f5f9 !important; }
html[data-theme="light"] [class~="text-sky-300"], html[data-theme="light"] [class~="text-sky-400"] { color: #0369a1 !important; }
html[data-theme="light"] [class~="text-violet-400"] { color: #6d28d9 !important; }
html[data-theme="light"] [class~="text-emerald-300"] { color: #047857 !important; }
html[data-theme="light"] pre[class*="text-emerald-300"] { color: #065f46 !important; }
