/* =========================================================
   LIVE COOLING MAP - FULL UPDATED CSS
   ========================================================= */

.section-map {
  position: relative;
  background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 62%),
    radial-gradient(circle at 12% 14%, rgba(11, 95, 255, 0.1), transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(0, 184, 148, 0.1), transparent 34%);
}

#cooling-map-title {
  margin: 0.5rem 0;
}

.map-section-card {
  position: relative;
  padding: 1.3rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 15% 20%,
      rgba(11, 95, 255, 0.18),
      transparent 40%),
    radial-gradient(circle at 85% 80%,
      rgba(0, 184, 148, 0.14),
      transparent 38%),
    linear-gradient(180deg, #0b1f3f 0%, #07142a 100%);
}

.map-section-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background-size: 200% 100%;
  animation: mapGradientFlow 7s linear infinite;
}

.map-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.map-section-meta {
  flex: 1 1 560px;
  min-width: 0;
}

.map-section-meta h2 {
  margin: 0.55rem 0 0.35rem;
  color: #f5f9ff;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.map-section-meta p {
  margin: 0;
  /*max-width: 80ch;*/
  color: rgba(210, 225, 255, 0.72);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.map-safety-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;

  margin-top: 0.85rem;
  padding: 0.5rem 0.75rem;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);

  color: rgba(220, 232, 255, 0.82);

  font-size: 0.78rem;
  line-height: 1.35;

  backdrop-filter: blur(8px);
}

.map-safety-note i {
  color: #7dd3fc;
  font-size: 0.78rem;
}

.map-safety-note strong {
  color: #ffffff;
  font-weight: 700;
}

.map-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 34px;
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(11, 95, 255, 0.22), rgba(0, 184, 148, 0.18)),
    rgba(10, 25, 55, 0.65);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0, 10, 30, 0.45),
    0 0 12px rgba(11, 95, 255, 0.25);
  color: #eaf2ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.map-badge i {
  color: #4facfe;
  text-shadow: 0 0 6px rgba(79, 172, 254, 0.6),
    0 0 12px rgba(11, 95, 255, 0.35);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.live-map-box {
  min-height: 580px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: radial-gradient(circle at 12% 18%,
      rgba(79, 172, 254, 0.1),
      transparent 40%),
    radial-gradient(circle at 88% 82%,
      rgba(0, 184, 148, 0.08),
      transparent 38%),
    rgba(8, 20, 44, 0.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 45px rgba(0, 8, 24, 0.45),
    0 0 20px rgba(79, 172, 254, 0.1);
  position: relative;
  overflow: hidden;
}

.leaflet-map {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 580px;
  min-height: 580px;
  border-radius: inherit;
}

.live-map-box::before,
.live-map-box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}

.live-map-box::before {
  background: radial-gradient(circle at 20% 10%,
      rgba(255, 255, 255, 0.06),
      transparent 30%),
    radial-gradient(circle at 80% 90%, rgba(0, 0, 0, 0.18), transparent 40%);
}

.live-map-box::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 12px 30px rgba(255, 255, 255, 0.04),
    inset 0 -12px 30px rgba(0, 0, 0, 0.25);
}

.leaflet-popup {
  z-index: 1000;
  animation: mapPopupFade 0.2s ease;
}

.leaflet-popup-content-wrapper {
  position: relative;
  isolation: isolate;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: visible;
  background: radial-gradient(circle at top left,
      rgba(79, 172, 254, 0.18),
      transparent 42%),
    radial-gradient(circle at bottom right,
      rgba(0, 184, 148, 0.14),
      transparent 40%),
    linear-gradient(180deg, #0e2a4d 0%, #081a33 100%);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(79, 172, 254, 0.18);
}

.leaflet-popup-content-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -10px 20px rgba(0, 0, 0, 0.18);
}

.leaflet-popup-content {
  position: relative;
  z-index: 1;
  margin: 0;
  min-width: 240px;
  max-width: min(90vw, 360px);
}

.leaflet-popup-tip-container {
  margin-top: -1px;
}

.leaflet-popup-tip {
  background: #081a33;
  box-shadow: none;
}

.map-popup {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0.2rem 0.2rem;
}

.map-popup::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 3px;
  opacity: 0.9;
}

.map-popup>* {
  position: relative;
  z-index: 1;
}

.map-popup__title {
  margin: 0 0 0.35rem;
  color: #13223a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.map-popup__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  padding: 0.24rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  width: fit-content;
}

.map-popup__badge--fan {
  background: linear-gradient(135deg,
      rgba(11, 95, 255, 0.95),
      rgba(0, 60, 180, 0.95));
}

.map-popup__badge--Venue {
  background: linear-gradient(135deg,
      rgba(0, 120, 100, 0.9),
      rgba(0, 150, 120, 0.95));
}

.map-popup__badge--transit {
  background: linear-gradient(135deg,
      rgba(180, 110, 0, 0.95),
      rgba(217, 149, 0, 0.98));
}

.map-popup__badge--shuttle {
  background: linear-gradient(135deg,
      rgba(142, 68, 173, 0.95),
      rgba(111, 44, 145, 0.98));
}

.map-popup__badge--parking {
  background: linear-gradient(135deg,
      rgba(251, 133, 0, 0.95),
      rgba(214, 110, 0, 0.98));
}

.map-popup__badge--healthstation {
  background: linear-gradient(135deg,
      rgba(211, 47, 47, 0.95),
      rgba(183, 28, 28, 0.98));
}

.map-popup__badge--hydrationstation {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.24);
}

.map-popup__address {
  margin: 0.35rem 0 0.45rem !important;
  color: #13223a;
  font-size: 0.8rem;
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.map-popup__address i {
  margin-right: 0.35rem;
  color: #0862b2;
}

.map-popup__text {
  margin: 0.35rem 0 0;
  color: #24364f;
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.map-popup__list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.map-popup__list li {
  position: relative;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  color: #24364f;
  font-size: 0.84rem;
  line-height: 1.45;
}

.map-popup a {
  color: #fff !important;
}

.map-popup__list li:last-child {
  margin-bottom: 0;
}

.map-popup__list li::before {
  content: "";
  position: absolute;
  top: 0.52rem;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00b894);
  box-shadow: 0 0 8px rgba(79, 172, 254, 0.35);
}

.map-popup__list strong {
  color: #13223a;
  font-weight: 750;
}

.map-popup__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(8, 28, 56, 0.78);
  box-shadow: 0 6px 14px rgba(0, 10, 30, 0.28);
  color: #f3f8ff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.map-popup__link:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 172, 254, 0.35);
  background: rgba(11, 37, 72, 0.92);
  box-shadow: 0 8px 18px rgba(0, 10, 30, 0.38),
    0 0 10px rgba(79, 172, 254, 0.16);
}

.map-popup--help .map-popup__eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(11, 95, 255, 0.1);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.map-popup--help .map-popup__title {
  margin-bottom: 0.45rem;
  font-size: 1.02rem;
  line-height: 1.2;
}

.map-popup--help .map-popup__text--intro {
  margin-bottom: 0.7rem;
}

.leaflet-popup.map-popup--fan .leaflet-popup-content-wrapper {
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(11, 95, 255, 0.24);
}

.leaflet-popup.map-popup--Venue .leaflet-popup-content-wrapper {
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(0, 184, 148, 0.22);
}

.leaflet-popup.map-popup--transit .leaflet-popup-content-wrapper {
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(255, 183, 3, 0.22);
}

.leaflet-popup.map-popup--hospital .leaflet-popup-content-wrapper {
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(214, 40, 40, 0.22);
}

.leaflet-popup.map-popup--urgentcare .leaflet-popup-content-wrapper {
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(247, 127, 0, 0.22);
}

.leaflet-popup.map-popup--pharmacy .leaflet-popup-content-wrapper {
  box-shadow: 0 22px 48px rgba(0, 6, 20, 0.65),
    0 0 24px rgba(58, 134, 255, 0.22);
}

.leaflet-container a.leaflet-popup-close-button {
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #757575 !important;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  background: rgba(79, 172, 254, 0.18);
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.22);
  color: #ffffff;
  transform: scale(1.04);
}

.custom-map-marker-wrap {
  border: 0;
  background: transparent;
}

.custom-map-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: scale(1);
  opacity: 1;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.2s ease,
    opacity 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22),
    0 0 0 6px rgba(255, 255, 255, 0.16);
}

.custom-map-marker i {
  pointer-events: none;
  font-size: 12px;
  line-height: 1;
}

.custom-map-marker::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
}

.custom-map-marker--fan {
  background: #0b5fff;
  --pulse-color: rgba(11, 95, 255, 0.38);
}

.custom-map-marker--Venue {
  background: #00b894;
  --pulse-color: rgba(0, 184, 148, 0.38);
}

.custom-map-marker--transit {
  background: #d99500;
  --pulse-color: rgba(217, 149, 0, 0.38);
}

.map-popup__badge--hospital {
  background: linear-gradient(135deg,
      rgba(214, 40, 40, 0.95),
      rgba(160, 20, 20, 0.98));
}

.map-popup__badge--urgentcare {
  background: linear-gradient(135deg,
      rgba(247, 127, 0, 0.95),
      rgba(210, 95, 0, 0.98));
}

.map-popup__badge--pharmacy {
  background: linear-gradient(135deg,
      rgba(58, 134, 255, 0.95),
      rgba(11, 95, 255, 0.98));
}

.custom-map-marker--healthstation {
  background: #d32f2f;
  --pulse-color: rgba(211, 47, 47, 0.38);
}

.custom-map-marker--hydrationstation {
  background: linear-gradient(
    135deg,
    #06b6d4,
    #0ea5e9
  ) !important;

  box-shadow:
    0 10px 22px rgba(6, 182, 212, 0.35),
    0 0 0 4px rgba(6, 182, 212, 0.14);
}

.custom-map-marker--venue {
  width: 30px;
  height: 30px;
  color: #0b5fff;
  font-size: 14px;
  background: linear-gradient(135deg, #ffffff, #cfe6ff);
  border-color: #0b5fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
    0 0 0 8px rgba(11, 95, 255, 0.14);
}

.custom-map-marker--venue i {
  font-size: 14px;
}

.custom-map-marker.is-dimmed {
  opacity: 0.45;
  transform: scale(0.92);
  filter: saturate(0.8);
}

.custom-map-marker.is-selected {
  transform: scale(1.14);
  opacity: 1;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28),
    0 0 0 8px rgba(255, 255, 255, 0.2);
}

.custom-map-marker.is-selected::after {
  animation: mapMarkerPulse 1.6s ease-out infinite;
}

.custom-map-marker--venue::after {
  width: 30px;
  height: 30px;
  animation: mapMarkerPulse 1.8s ease-out infinite;
}

.custom-map-marker:hover {
  transform: scale(1.06);
}

.map-reset-control {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  cursor: pointer;
}

.map-reset-control:hover {
  background: #f4f6f9;
}

.map-reset-control i {
  color: var(--primary);
  font-size: 0.9rem;
}

.map-help-leaflet-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.1rem 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.map-help-leaflet-control:hover {
  background: #f4f6f9;
}

.map-help-leaflet-control i {
  color: var(--primary);
  font-size: 0.88rem;
  flex: 0 0 auto;
}

.leaflet-touch .leaflet-bar a {
  color: #1162fc !important;
}

.map-nav-control {
  position: relative;
  margin-bottom: 0;
}

.map-nav-control__toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  cursor: pointer;
}

.map-nav-control__toggle:hover {
  background: #f4f6f9;
}

.map-nav-control__toggle i {
  color: var(--primary);
  font-size: 0.9rem;
}

.map-nav-control__panel {
  position: absolute;
  top: -65px;
  left: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(8, 27, 70, 0.14);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(-6px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.map-nav-control__row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
}

.map-nav-control.is-open .map-nav-control__panel {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.map-nav-control__middle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.4rem;
}

.map-nav-control__zoom {
  display: grid;
  gap: 0.4rem;
}

.map-nav-control__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.map-nav-control__btn:hover {
  background: rgba(11, 95, 255, 0.04);
  border-color: rgba(11, 95, 255, 0.24);
  transform: translateY(-1px);
}

.map-nav-control__btn i {
  color: var(--primary);
  font-size: 0.82rem;
  line-height: 1;
}

.leaflet-bar.map-nav-control,
.leaflet-bar.map-nav-control a,
.leaflet-bar.map-nav-control button {
  box-shadow: none;
}

.leaflet-bar.map-nav-control {
  border-radius: 4px;
  overflow: visible;
  background: transparent;
}

.leaflet-bar.map-nav-control .map-nav-control__toggle {
  border-radius: 0;
}

.map-filter-control {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(calc(100% - 32px), 760px);
  pointer-events: auto;
}

.map-filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.map-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.4rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(8, 20, 44, 0.84);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px rgba(0, 8, 24, 0.3);
  cursor: grab;
}

.map-filter-chips::-webkit-scrollbar {
  display: none;
}

.map-filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 34px;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f9ff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.map-filter-chip i,
.map-filter-chip svg {
  flex: 0 0 auto;
  font-size: 0.78rem;
  line-height: 1;
}

.map-filter-chip__label {
  line-height: 1.1;
}

.map-filter-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.map-filter-chip.is-active,
.map-filter-chip[aria-pressed="true"] {
  background: rgba(79, 172, 254, 0.18);
  color: #f5f9ff;
  border-color: rgba(79, 172, 254, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.map-filter-chip:focus-visible {
  outline: 2px solid rgba(79, 172, 254, 0.45);
  outline-offset: 2px;
}

.map-filter-scroll-btn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 20, 44, 0.92);
  box-shadow: 0 8px 18px rgba(0, 8, 24, 0.28);
  color: #fff;
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  z-index: 5;
}

.map-filter-control.is-scrollable .map-filter-scroll-btn {
  opacity: 1;
  pointer-events: auto;
}

.map-filter-control.is-scrollable .map-filter-fade {
  opacity: 1;
}

.map-filter-control:not(.is-scrollable) .map-filter-scroll-btn,
.map-filter-control:not(.is-scrollable) .map-filter-fade {
  opacity: 0;
  pointer-events: none;
}

.map-filter-scroll-btn:hover:not(:disabled) {
  background: rgba(79, 172, 254, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
}

.map-filter-scroll-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.map-filter-scroll-btn.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.map-filter-scroll-btn--left {
  left: 6px;
}

.map-filter-scroll-btn--right {
  right: 6px;
}

.map-filter-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 46px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-filter-fade--left {
  padding-left: 36px;
  left: 0;
  background: linear-gradient(to right,
      rgba(8, 20, 44, 0.96) 0%,
      rgba(8, 20, 44, 0.72) 48%,
      rgba(8, 20, 44, 0) 100%);
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.map-filter-fade--right {
  padding-right: 36px;
  right: 0;
  background: linear-gradient(to left,
      rgba(8, 20, 44, 0.96) 0%,
      rgba(8, 20, 44, 0.72) 48%,
      rgba(8, 20, 44, 0) 100%);
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.map-filter-fade.is-visible {
  opacity: 1;
}

.map-filter-chips:active {
  cursor: grabbing;
}

/* =========================================================
   9. HELP OVERLAY
   Sized to the live map container to avoid viewport clipping.
   ========================================================= */

.map-help-overlay {
  position: absolute;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: auto;
}

.map-help-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 28, 0.38);
  backdrop-filter: blur(2px);
  pointer-events: auto;
  touch-action: pan-y;
  animation: mapFadeIn 0.2s ease;
}

.map-help-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  height: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 1rem 1rem 1.25rem;
  border-radius: 16px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.map-help-overlay__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.map-help-overlay__panel>* {
  position: relative;
  z-index: 1;
}

.map-help-overlay__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #0a1d3c;
  cursor: pointer;
  pointer-events: auto;
}

.map-help-overlay__close:hover {
  background: rgba(79, 172, 254, 0.25);
}

.map-help-overlay__close i {
  pointer-events: none;
}

.map-popup--help {
  min-height: auto;
  max-width: 100%;
  padding-bottom: 2rem;
}

.map-popup--help .map-popup__list {
  /*padding-bottom: 2rem;*/
}

.live-map-box,
.leaflet-map,
#coolingMap {
  overflow: hidden;
}

.map-hud {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 800;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: auto;
}

.map-hud__toggle,
.map-hud__panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 20, 44, 0.84);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px rgba(0, 8, 24, 0.3);
  color: #f5f9ff;
}

.map-hud__toggle {
  min-width: 96px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  margin-left: auto;
}

.map-hud__toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.map-hud__toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 800;
}

.map-hud__toggle-live {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.map-hud__toggle-live-text {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-hud__toggle-count,
.map-hud__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.map-hud__toggle-count {
  background: rgba(255, 255, 255, 0.08);
}

.map-hud__toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  animation: mapHudPulse 1.8s ease-in-out infinite;
}

.map-hud__toggle-dot--high {
  background: #d64545;
}

.map-hud__toggle-dot--medium {
  background: #f39c12;
}

.map-hud__toggle-dot--low {
  background: #0f9d58;
}

.map-hud__route-subtitle {
  margin-top: 0.2rem;
  color: rgba(220, 232, 255, 0.68);
  font-size: 0.74rem;
}

.map-hud__panel {
  width: min(460px, calc(100vw - 32px));
  margin-bottom: 0.6rem;
  padding: 0.9rem;
  border-radius: 16px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom right;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease,
    transform 220ms ease,
    visibility 220ms ease;
}

.map-hud.is-open .map-hud__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.map-hud__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.map-hud__head h4 {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  color: #fff;
}

.map-hud__eyebrow,
.map-hud__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 232, 255, 0.72);
}

.map-hud__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.map-hud__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
  color: rgba(220, 232, 255, 0.78);
  font-size: 0.78rem;
}

.map-hud__pill--high {
  background: rgba(214, 69, 69, 0.18);
  color: #ffd5d5;
}

.map-hud__pill--medium {
  background: rgba(243, 156, 18, 0.18);
  color: #ffe1a8;
}

.map-hud__pill--low {
  background: rgba(15, 157, 88, 0.18);
  color: #d5ffe9;
}

.map-hud__section {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-hud__text {
  margin-top: 0.35rem;
  color: rgba(220, 232, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.5;
}

.map-hud__routes {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.55rem;
  max-height: 220px;
  overflow: auto;
  padding-right: 0.2rem;
}

.map-hud__route-card {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.map-hud__route-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  color: #fff;
  font-size: 0.88rem;
}

.map-hud__route-delay {
  white-space: nowrap;
  font-weight: 800;
}

.map-hud__route-copy {
  margin-top: 0.45rem;
  color: rgba(220, 232, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.45;
}

.map-hud__progress {
  height: 8px;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.map-hud__progress>span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b894, #ffb703, #d64545);
}

.map-hud__route-link {
  display: inline-flex;
  margin-top: 0.6rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.map-hud__route-link:hover {
  text-decoration: underline;
}

.leaflet-interactive.route-line-active {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

.map-info-panel__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.map-info-panel__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #0b5fff;
  border-radius: 50%;
  animation: mapSpin 0.7s linear infinite;
}

.map-info-panel {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 850;
  width: min(360px, calc(100% - 32px));
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transform: translateX(18px);
  visibility: hidden;
  transition: opacity 220ms ease,
    transform 220ms ease,
    visibility 220ms ease;
}

.map-info-panel.is-visible {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.map-info-panel__text--address {
  margin-bottom: 1rem !important;
}

.map-info-panel__card {
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(8, 20, 44, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 8, 24, 0.38);
  color: #f5f9ff;
  display: flex;
  flex-direction: column;
  position: relative;
}

.map-info-panel__eyebrow {
  margin-bottom: 0.35rem;
  color: rgba(220, 232, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-info-panel__title {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.2;
}

.map-info-panel__address {
  margin: 0.6rem 0 0.65rem;
  color: rgba(220, 232, 255, 0.84);
  font-size: 0.85rem;
  line-height: 1.5;
}

.map-info-panel__address i {
  margin-right: 0.35rem;
  color: #4facfe;
}

.map-info-panel__text {
  margin: 0.35rem 0 0;
  color: rgba(220, 232, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.55;
}

.map-info-panel__section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-info-panel__section-title {
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.map-info-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
  color: rgba(220, 232, 255, 0.82);
  font-size: 0.8rem;
}

.map-info-panel__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.map-info-panel__pill--high {
  background: rgba(214, 69, 69, 0.18);
  color: #ffd5d5;
}

.map-info-panel__pill--medium {
  background: rgba(243, 156, 18, 0.18);
  color: #ffe1a8;
}

.map-info-panel__pill--low {
  background: rgba(15, 157, 88, 0.18);
  color: #d5ffe9;
}

.map-info-panel__progress {
  height: 8px;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.map-info-panel__progress>span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b894, #ffb703, #d64545);
}

.map-info-panel__actions {
  display: flex;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-info-panel__actions .map-info-panel__link {
  flex: 1;
  text-align: center;
}

.map-info-panel__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.map-info-panel__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(79, 172, 254, 0.35);
  transform: translateY(-1px);
}

.map-info-panel__link--secondary {
  background: rgba(11, 95, 255, 0.12);
}

.map-info-panel__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.map-info-panel__close:hover {
  background: rgba(79, 172, 254, 0.25);
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.25);
  transform: scale(1.05);
}

.location-limit-control {
  min-width: 210px;
  max-width: 240px;
  display: none;
  width: 230px;
  padding: 0.72rem;
  border: 1px solid rgba(11, 95, 255, 0.14) !important;
  border-radius: 16px !important;
  background: radial-gradient(circle at top left,
      rgba(79, 172, 254, 0.16),
      transparent 42%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.98),
      rgba(245, 249, 255, 0.96)) !important;
  box-shadow: 0 14px 32px rgba(8, 27, 70, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset !important;
  backdrop-filter: blur(12px);
}

.location-limit-control.is-visible {
  display: block;
}

.location-limit-control__top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.location-limit-control__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b5fff, #4facfe);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 95, 255, 0.25);
  flex: 0 0 auto;
}

.location-limit-control__title {
  color: #0b1f3f;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
}

.location-limit-control__label {
  margin-top: 0.18rem;
  color: #52657f;
  font-size: 0.65rem;
  font-weight: 700;
}

.location-limit-control__actions {
  flex-wrap: wrap;
  gap: 0.45rem;
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.location-limit-control__actions button {
  flex: 1 1 calc(50% - 0.45rem);
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(11, 95, 255, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #0b1f3f;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
  grid-column: auto !important;
}

.location-limit-control__actions button:last-child {
  grid-column: span 2;
}

.location-limit-control button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(11, 95, 255, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: #0b5fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.location-limit-control button:hover:not(:disabled) {
  background: #0b5fff;
  border-color: #0b5fff;
  color: #ffffff;
  transform: translateY(-1px);
}

.location-limit-control button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.location-limit-control__actions button:first-child {
  background: linear-gradient(135deg, #0b5fff, #4facfe);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(11, 95, 255, 0.22);
}

.location-limit-control__actions button:hover:not(:disabled) {
  background: linear-gradient(135deg, #0b5fff, #4facfe) !important;
  background-color: #0b5fff !important;
  border-color: transparent !important;
  color: #ffffff !important;

  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(8, 27, 70, 0.15);
}

.location-limit-control__actions button span {
  white-space: nowrap;
}

.location-limit-control:not(.is-health-station) [data-location-action="all"],
.location-limit-control:not(.is-health-station) [data-location-action="less"] {
  display: none !important;
}

.location-limit-control.is-health-station .location-limit-control__actions {
  grid-template-columns: 1fr 1fr;
}

.location-limit-control.is-health-station [data-location-action="more"] {
  grid-column: 1 / -1 !important;
}

.location-limit-control.is-health-station [data-location-action="all"] {
  grid-column: 1 !important;
}

.location-limit-control.is-health-station [data-location-action="less"] {
  grid-column: 2 !important;
}

.location-limit-control__actions [data-location-action="more"],
.location-limit-control__actions [data-location-action="all"] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.location-limit-control__mobile-icon {
  display: none;
}

.map-fullscreen-control {
  display: grid;
  place-items: center;

  width: 38px;
  height: 36px;

  padding: 0;

  border: 1px solid rgba(11, 95, 255, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);

  background: #ffffff !important;

  color: #0b1f3f;

  cursor: pointer;

  box-shadow:
    0 2px 6px rgba(8, 27, 70, 0.08);

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.map-fullscreen-control i {
  color: #0B5FFF;
  font-size: 0.9rem;
  line-height: 1;
}

.map-fullscreen-control:hover {
  background: #eef4ff !important;
  border-color: rgba(11, 95, 255, 0.35);

  box-shadow:
    0 4px 12px rgba(8, 27, 70, 0.12);
}

.map-fullscreen-control:focus-visible {
  outline: 3px solid rgba(11, 95, 255, 0.35);
  outline-offset: 2px;
}

.map-fullscreen-control:active {
  transform: scale(0.96);
}

.leaflet-top.leaflet-right .map-fullscreen-control {
  margin-bottom: 0 !important;
}

.leaflet-bar .map-fullscreen-control:last-child {
  border-bottom: 0;
}

.live-map-box:fullscreen {
  background: #08142c;
}

.live-map-box:fullscreen .leaflet-map,
.live-map-box:fullscreen #coolingMap {
  height: 100vh !important;
  border-radius: 0 !important;
}

.live-map-box:-webkit-full-screen {
  background: #08142c;
}

/* =========================================================
   14. HELP OVERLAY MEDIA / INLINE EXAMPLES
   ========================================================= */

.map-help-snapshot {
  max-width: 100%;
  margin-top: 0.75rem;
  overflow: hidden;
}

.map-help-snapshot__image {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;

  margin-left: auto;
  margin-right: auto;

  border-radius: 12px;
  border: 1px solid rgba(11, 95, 255, 0.12);
  box-shadow: 0 10px 24px rgba(8, 27, 70, 0.12);
}

.map-help-snapshot__image--small {
  max-width: 240px;
  margin: 0.75rem auto 0;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.map-help-snapshot__caption {
  display: block;
  margin-top: 0.45rem;
  color: #52647a;
  font-size: 0.55rem;
  line-height: 1.4;
  text-align: center;
}

.map-help-inline-location-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.35rem;
  vertical-align: middle;
}

.map-help-inline-location-control__label {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(8, 20, 44, 0.92);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
}

.map-help-inline-location-control__btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b5fff, #4facfe);
  color: #fff;
  box-shadow:
    0 8px 18px rgba(8, 27, 70, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.map-help-inline-location-control__btn i {
  font-size: 0.72rem;
  line-height: 1;
}

.map-info-panel__link.is-hidden {
  display: none !important;
}

@keyframes mapGradientFlow {
  0% {
    background-position: 0% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes mapPopupFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mapMarkerPulse {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 0 var(--pulse-color, rgba(255, 255, 255, 0.3));
  }

  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
    box-shadow: 0 0 0 12px rgba(0, 0, 0, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.35);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

@keyframes mapFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mapPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mapHudPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.18);
  }

  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
}

@keyframes mapSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {

  .live-map-box,
  .leaflet-map {
    height: 572px;
    min-height: 572px;
  }
}

@media (max-width: 940px) {
  .map-filter-control {
    top: 12px;
    left: 50%;
    width: min(calc(100% - 150px), 560px);
    transform: translateX(-50%);
  }

  .map-filter-chips {
    padding: 0.35rem 2.65rem;
    gap: 0.35rem;
  }

  .map-filter-chip {
    min-height: 30px;
    padding: 0.32rem 0.55rem;
    font-size: 0.62rem;
  }

  .map-filter-chip i,
  .map-filter-chip svg {
    font-size: 0.68rem;
  }

  .map-filter-scroll-btn {
    width: 26px;
    height: 26px;
  }

  .map-filter-scroll-btn--left {
    left: 5px;
  }

  .map-filter-scroll-btn--right {
    right: 5px;
  }
}

@media (max-width: 768px) {


  /* Help overlay */
  .map-help-overlay {
    padding: 12px;
  }

  .map-help-overlay__panel {
    width: 100%;
    max-width: 100%;
    height: calc(100% - 24px);
    max-height: calc(100% - 24px);
  }

  .map-filter-control {
    top: auto;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 20px);
  }

  .map-filter-chips {
    gap: 0.38rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.4rem 0.5rem;
    border-radius: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .map-filter-chip {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0.42rem 0.66rem;
    font-size: 0.68rem;
  }

  .map-filter-chip i,
  .map-filter-chip svg {
    font-size: 0.7rem;
  }

  .map-filter-fade--left {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
  }

  .map-filter-fade--right {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
  }

  .map-hud {
    right: 12px;
    bottom: 12px;
  }

  .map-hud__panel {
    width: min(320px, calc(100vw - 24px));
  }

  .map-info-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 16px;
    display: grid;
    place-items: center;
    transform: translateY(18px);
  }

  .map-info-panel.is-visible {
    transform: translateY(0);
  }

  .map-info-panel__card {
    width: min(100%, 420px);
    max-height: calc(100% - 8px);
    height: auto;
    overflow-y: auto;
    border-radius: 18px;
    padding: 1rem;
  }

  .map-fullscreen-control {
    width: 38px;
    height: 36px;
  }

  .map-fullscreen-control i {
    font-size: 0.82rem;
  }

  .section-map {
    padding-inline: 0;
  }

  .map-section-card {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .map-section-header {
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    flex-direction: column;
    align-items: stretch;
  }

  .map-section-meta h2 {
    font-size: clamp(1.2rem, 1rem + 1.4vw, 1.55rem);
    line-height: 1.15;
  }

  .map-section-meta p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .map-badge {
    padding: 0.34rem 0.72rem;
    font-size: 0.7rem;
    line-height: 1.15;
  }

  .map-layout {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .live-map-box,
  .leaflet-map {
    height: clamp(308px, 57vh, 528px);
    min-height: 308px;
    border-radius: 18px;
  }

  .leaflet-control-container .leaflet-bottom.leaflet-left .map-filter-control {
    left: 12px;
    bottom: 12px;
  }

  .map-filter-panel__actions {
    flex-direction: column;
  }

  .map-filter-option-btn {
    font-size: 0.8rem;
  }

  .map-filter-toggle__label,
  .map-filter-panel__header {
    font-size: 0.74rem;
  }

  .map-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .location-limit-control__mobile-icon {
    display: none !important;
  }

  .location-limit-control__top {
    display: none !important;
  }

  .location-limit-control {
    position: relative !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .location-limit-control__actions {
    position: relative;
    display: flex !important;
    flex-direction: column;
    gap: 0.4rem !important;
    margin: 0 !important;
    margin-top: 36px !important;
  }

  .location-limit-control__actions::before {
    content: "View More\A Locations";
    white-space: pre-line !important;

    width: 78px;
    /* increase width */
    min-width: 78px;

    text-align: center;
    line-height: 1.15;

    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);

    padding: 0.35rem 0.55rem;
    border-radius: 10px;

    background: rgba(8, 20, 44, 0.92);
    color: #fff;

    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.03em;

    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

    margin-left: 8px;
  }

  .location-limit-control__actions button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    box-shadow: 0 8px 18px rgba(8, 27, 70, 0.18),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }

  .location-limit-control__actions button span {
    display: none !important;
  }

  .location-limit-control__actions button i {
    font-size: 0.82rem !important;
    line-height: 1 !important;
  }

  .location-limit-control__actions [data-location-action="all"] {
    display: none !important;
  }
}

@media (max-width: 670px) {
  .map-filter-control {
    top: auto;
    bottom: 14px;
    width: 100%;
    max-width: calc(100% - 20px);
  }

  .map-filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }

  .map-filter-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.4rem 2.2rem;
    gap: 0.38rem;
    scrollbar-width: none;
  }

  .map-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .map-filter-chip {
    flex: 0 0 auto;
  }

  .map-filter-scroll-btn {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(8, 20, 44, 0.92);
    box-shadow: 0 8px 18px rgba(0, 8, 24, 0.28);
    color: #fff;
    transform: translateY(-50%);
    cursor: pointer;
    transition: opacity 0.2s ease,
      transform 0.2s ease,
      background 0.2s ease,
      border-color 0.2s ease;
  }

  .map-filter-scroll-btn:hover:not(:disabled) {
    background: rgba(79, 172, 254, 0.92);
    border-color: rgba(255, 255, 255, 0.22);
  }

  .map-filter-scroll-btn:disabled {
    opacity: 0.28;
    cursor: default;
  }

  .map-filter-scroll-btn.is-hidden {
    opacity: 0;
    pointer-events: none;
  }

  .map-filter-scroll-btn--left {
    left: 6px;
  }

  .map-filter-scroll-btn--right {
    right: 6px;
  }

  .map-filter-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 34px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .map-filter-fade.is-visible {
    opacity: 1;
  }

  .map-filter-fade--left {
    left: 0;
    background: linear-gradient(to right,
        rgba(8, 20, 44, 0.96) 0%,
        rgba(8, 20, 44, 0.72) 48%,
        rgba(8, 20, 44, 0) 100%);
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
  }

  .map-filter-fade--right {
    right: 0;
    background: linear-gradient(to left,
        rgba(8, 20, 44, 0.96) 0%,
        rgba(8, 20, 44, 0.72) 48%,
        rgba(8, 20, 44, 0) 100%);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
  }
}

@media (max-width: 640px) {
  .map-badge {
    padding: 0.34rem 0.72rem;
    font-size: 0.65rem;
  }

  .map-section-meta p {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .map-nav-control__panel {
    left: calc(100% + 8px);
    min-width: 104px;
    padding: 0.5rem;
  }

  .map-nav-control__btn {
    width: 32px;
    height: 32px;
  }

  .location-limit-control {
    min-width: 190px;
    max-width: 210px;
    padding: 0.62rem;
    width: 210px;
  }

  .location-limit-control__title {
    font-size: 0.74rem;
  }

  .location-limit-control__label,
  .location-limit-control button {
    font-size: 0.68rem;
  }

  .location-limit-control__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .leaflet-control-container .leaflet-bottom.leaflet-left .map-filter-control {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 2.6rem;
    width: auto;
    z-index: 1000;
  }

  .leaflet-control-container .leaflet-bottom.leaflet-right {
    bottom: 0.35rem;
    right: 0.35rem;
    width: 100%;
  }

  .leaflet-control-attribution {
    max-width: calc(100% - 1rem);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.9);
  }

  .map-filter-panel {
    max-height: min(46vh, 280px);
    overflow-y: auto !important;
  }

  .map-filter-toggle {
    margin-bottom: -20px;
  }
}