/* ClimaWise Radar Web Console */
.radar-console {
  isolation: isolate;
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, .2);
  background: #07111d;
  box-shadow: 0 28px 80px rgba(1, 8, 18, .38), inset 0 1px 0 rgba(255,255,255,.05);
}
.radar-console::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(1, 8, 18, .16);
}
.radar-statusbar {
  top: 18px;
  left: 18px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(6, 15, 27, .84);
  border-color: rgba(255,255,255,.1);
  color: #a9b7ca;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.radar-network-dot {
  order: -1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.14);
}
.radar-console[data-state='ready'] .radar-network-dot {
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52,211,153,.14);
}
.radar-console[data-state='error'] .radar-network-dot {
  background: #fb7185;
  box-shadow: 0 0 0 4px rgba(251,113,133,.14);
}
.radar-map-actions {
  position: absolute;
  z-index: 1000;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.radar-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: #eef9ff;
  background: rgba(6,15,27,.86);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font: 700 19px/1 Inter, sans-serif;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.radar-icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.radar-icon-btn:hover,
.radar-icon-btn:focus-visible {
  transform: translateY(-1px);
  background: #16304a;
  border-color: rgba(103,232,249,.45);
  outline: none;
}
.radar-icon-btn[aria-busy='true'] { animation: radar-button-spin .8s linear infinite; }
@keyframes radar-button-spin { to { transform: rotate(360deg); } }
.radar-legend {
  position: absolute;
  z-index: 900;
  left: 18px;
  bottom: 92px;
  display: grid;
  grid-template-columns: auto 116px auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px;
  color: #d8e3ef;
  background: rgba(6,15,27,.78);
  backdrop-filter: blur(12px);
  font: 700 9px/1 Inter, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.radar-legend i {
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg,#19bff2 0%,#35df70 28%,#f7e338 50%,#ff8a22 68%,#ef3340 84%,#cc2cf1 100%);
}
.radar-attribution {
  position: absolute;
  z-index: 850;
  right: 12px;
  bottom: 4px;
  color: rgba(225,235,245,.68);
  font: 500 8px/1.2 Inter, sans-serif;
}
.radar-attribution a { color: inherit; text-decoration: none; }
.radar-message {
  position: absolute;
  z-index: 1100;
  top: 50%;
  left: 50%;
  width: min(310px, calc(100% - 44px));
  transform: translate(-50%, -50%);
  padding: 18px;
  border: 1px solid rgba(251,113,133,.3);
  border-radius: 16px;
  color: #f8fafc;
  background: rgba(8,17,30,.94);
  box-shadow: 0 18px 50px rgba(0,0,0,.38);
  text-align: center;
}
.radar-message[hidden] { display: none; }
.radar-message strong,.radar-message span { display: block; }
.radar-message span { margin: 7px 0 13px; color: #9dadc1; font-size: 12px; line-height: 1.5; }
.radar-message button {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  color: #041018;
  background: #67e8f9;
  font-weight: 800;
  cursor: pointer;
}
.radar-console .rm-control-pill {
  width: calc(100% - 36px);
  max-width: 480px;
  padding: 9px 11px;
  border-radius: 16px;
  background: rgba(6,15,27,.9);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 14px 36px rgba(0,0,0,.32);
}
.radar-timeline-range {
  min-width: 90px;
  flex: 1;
  height: 20px;
  accent-color: #67e8f9;
  cursor: pointer;
}
.radar-opacity { display: flex; align-items: center; gap: 4px; color: #9fb0c4; }
.radar-opacity input { width: 48px; height: 18px; accent-color: #67e8f9; }
.radar-console .rm-pill-btn { width: 31px; height: 31px; background: rgba(255,255,255,.06); }
.radar-console .rm-play-btn { width: 37px; height: 37px; color: #041018; background: #67e8f9; border-color: #67e8f9; }
.radar-console:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.radar-console:fullscreen #rainviewerMap { height: 100%; }
.radar-console .leaflet-control-zoom a { color: #e8f5ff; background: rgba(6,15,27,.88); border-color: rgba(255,255,255,.1); }
.radar-console .leaflet-control-zoom { border: 0; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.radar-location-marker { width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 0 7px rgba(56,189,248,.2), 0 3px 12px rgba(0,0,0,.4); }
@media (max-width: 768px) {
  .radar-console { height: 430px !important; border-radius: 20px !important; }
  .radar-statusbar { top: 12px; left: 12px; max-width: calc(100% - 72px); padding: 6px 9px; }
  .radar-statusbar > span:first-child { display: none; }
  .radar-map-actions { top: 12px; right: 12px; }
  .radar-map-actions .radar-icon-btn:not(:first-child) { display: none; }
  .radar-legend { left: 12px; bottom: 78px; grid-template-columns: auto 80px auto; }
  .radar-console .rm-control-pill { left: 10px !important; right: 10px !important; bottom: 10px !important; width: auto !important; max-width: none !important; }
  .radar-console .rm-live-badge { padding: 3px 6px; }
  .radar-timeline-range { min-width: 55px; }
  .radar-opacity { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-icon-btn,.radar-network-dot { animation: none !important; transition: none !important; }
}

/* Mantem o mapa legivel no tema escuro sem depender de provedor pago. */
.radar-basemap--dark {
  filter: grayscale(.22) brightness(.58) contrast(1.16) saturate(.72);
}

.radar-basemap--light {
  filter: saturate(.82) contrast(1.04);
}
