/* Location button, radar loop control, and weather layer panel. */

/* Lift bottom controls above the mobile dock */
@media (max-width: 820px) {
  .map-page .leaflet-bottom { bottom: 100px; }
}

.wx-locate-wrap { position: relative; border: 0; background: none; box-shadow: none; }
.wx-locate-btn {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: #fff; color: #1c2420; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.wx-locate-btn:hover, .wx-locate-btn:focus { background: #f4efe4; color: #0b3d4a; }
.wx-locate-btn.is-on { background: #1a73e8; color: #fff; }
.wx-locate-btn.is-follow { background: #0b57d0; color: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,.45), 0 1px 6px rgba(0,0,0,.35); }
.wx-locate-toast {
  position: absolute; right: 60px; bottom: 0; width: max-content; max-width: 240px;
  background: rgba(12,22,18,.94); color: #fff; padding: 8px 10px; border-radius: 8px;
  font: 600 13px/1.35 "Segoe UI", system-ui, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
@media (max-width: 820px) {
  .wx-locate-btn { width: 56px; height: 56px; }
  .wx-locate-toast { right: auto; left: 0; bottom: 64px; max-width: 220px; }
}

.loc-divicon { background: none; border: 0; }
.loc-dot { position: relative; width: 44px; height: 44px; }
.loc-pulse {
  position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; background: rgba(26,115,232,.28); animation: loc-pulse 1.8s ease-out infinite;
}
.loc-core {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: #1a73e8; border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 1px 4px rgba(0,0,0,.4);
}
.loc-hd {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-bottom: 16px solid #1a73e8; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
  transform-origin: 50% 100%;
}
@keyframes loc-pulse { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.loc-mark-btn {
  font: 700 14px/1.2 "Segoe UI", system-ui, sans-serif; padding: 8px 12px; border-radius: 8px;
  border: 0; background: #b85a2a; color: #fff; cursor: pointer;
}
.loc-pop-body .fine { margin: 4px 0 8px; }

.wx-panel { margin: 4px 0 8px; }
.wx-panel h3 { margin: 0 0 4px; }
.wx-tog { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; cursor: pointer; padding: 3px 0; }
.wx-tog input { margin-top: 3px; }
.wx-radar-tools { margin: 2px 0 6px 22px; }
.wx-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 4px; }
.wx-play, .wx-refresh {
  font: 700 13px/1 "Segoe UI", system-ui, sans-serif; padding: 7px 12px; min-height: 36px; min-width: 64px;
  border-radius: 8px; border: 1px solid rgba(28,36,32,.25); background: #1b4f5e; color: #fff; cursor: pointer;
}
.wx-refresh { background: #fff; color: #1c2420; }
.wx-time { font: 700 13px/1.2 "Segoe UI", system-ui, sans-serif; color: #1c2420; }
.wx-op { display: flex; gap: 6px; align-items: center; font-size: 12px; margin: 2px 0 4px; }
.wx-op-range { width: 110px; }
.wx-legend {
  display: flex; align-items: center; gap: 4px; font-size: 10px; color: #3d4a44; margin: 2px 0 4px;
}
.wx-legend i {
  flex: 1; height: 10px; border-radius: 3px; border: 1px solid rgba(0,0,0,.25);
  background: linear-gradient(90deg, #00ecec 0%, #01a0f6 8%, #0000f6 16%, #00ff00 28%, #00c800 36%, #ffff00 48%, #ff9000 60%, #ff0000 72%, #c00000 80%, #ff00ff 90%, #ffffff 100%);
}
.wx-note { margin: 4px 0 0; }
.wx-cloud-time { margin: 0 0 4px 22px; }
.wx-alert-pop h3 { margin: 0 0 4px; font-size: 15px; }
.wx-alert-pop p { margin: 4px 0; }

.leaflet-control-attribution { max-width: min(72vw, 420px); }
.wx-radar-ctl { z-index: 1100;
  display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.94);
  border-radius: 10px; padding: 6px 10px 6px 6px; box-shadow: 0 1px 6px rgba(0,0,0,.3);
  font: 700 13px/1 "Segoe UI", system-ui, sans-serif;
}
.wx-radar-ctl .wx-play { min-width: 60px; }
.wx-radar-ctl .wx-time { color: #1c2420; }

#map.base-sat .wx-radar-ctl, #map.base-sat .wx-locate-btn:not(.is-on):not(.is-follow) {
  background: rgba(12,22,18,.92); color: #fff;
}
#map.base-sat .wx-radar-ctl .wx-time { color: #fff; }
#map.base-sat .wx-locate-btn:not(.is-on):not(.is-follow) { color: #fff; }
