.map {
  width: 100%;
  height: 100%;
  background: #dde7df;
}

body.theme-night .station-sheet,
body.theme-night .map-action-button,
body.theme-night .modal {
  background: rgba(25, 30, 34, 0.84);
  color: #eef4f0;
  border-color: rgba(255, 255, 255, 0.18);
}

body.theme-night .muted,
body.theme-night .eyebrow,
body.theme-night .fuel-meta,
body.theme-night .report-meta {
  color: #b8c4bf;
}

.gas-pin {
  --pin: #64748b;
  --pin-glow: rgba(100, 116, 139, 0.5);
  position: relative;
  width: 42px;
  height: 52px;
  display: grid;
  place-items: start center;
  filter: drop-shadow(0 0 16px var(--pin-glow));
}

.gas-pin::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 5px;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50% 50% 50% 0;
  background: var(--pin);
  transform: rotate(-45deg);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--pin) 18%, transparent);
}

.gas-pin::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -5px;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.gas-pin-icon {
  position: relative;
  z-index: 2;
  width: 25px;
  height: 25px;
  margin-top: 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 16, 24, 0.72);
  color: #ffffff;
}

.gas-pin-icon svg {
  width: 17px;
  height: 17px;
}

.user-location-marker {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.user-location-marker::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  animation: user-location-pulse 1.8s ease-out infinite;
}

.user-location-marker span {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.25),
    0 0 20px rgba(59, 130, 246, 0.72);
}

.gas-pin.is-active {
  width: 54px;
  height: 66px;
  filter: drop-shadow(0 0 24px var(--pin-glow));
  animation: selected-pin-bounce 420ms ease-out;
}

.gas-pin.is-active::before {
  left: 6px;
  width: 42px;
  height: 42px;
  border-width: 3px;
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--pin) 18%, transparent),
    0 0 0 18px color-mix(in srgb, var(--pin) 10%, transparent),
    0 0 34px var(--pin-glow);
}

.gas-pin.is-active::after {
  top: -7px;
  left: -3px;
  width: 60px;
  height: 60px;
  border: 2px solid color-mix(in srgb, var(--pin) 72%, #ffffff);
  background: radial-gradient(circle, color-mix(in srgb, var(--pin) 26%, transparent) 0 42%, transparent 68%);
  box-shadow: 0 0 30px var(--pin-glow);
  animation: selected-pin-pulse 1.35s ease-out infinite;
}

.gas-pin.is-active .gas-pin-icon {
  width: 32px;
  height: 32px;
  margin-top: 7px;
}

.gas-pin.is-active .gas-pin-icon svg {
  width: 20px;
  height: 20px;
}

.gas-pin.available {
  --pin: #22c55e;
  --pin-glow: rgba(34, 197, 94, 0.72);
}

.gas-pin.queue {
  --pin: #f97316;
  --pin-glow: rgba(249, 115, 22, 0.72);
}

.gas-pin.low {
  --pin: #facc15;
  --pin-glow: rgba(250, 204, 21, 0.62);
}

.gas-pin.unavailable {
  --pin: #f43f5e;
  --pin-glow: rgba(244, 63, 94, 0.72);
}

.gas-pin.unknown {
  --pin: #64748b;
  --pin-glow: rgba(100, 116, 139, 0.48);
}

.station-cluster {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cluster-ring, #334155);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
}

.station-cluster-icon {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  pointer-events: auto;
}

.station-cluster::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.station-cluster b {
  position: relative;
  z-index: 1;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1;
}

.map-status-filter {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 700;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: none;
}

.map-status-filter__toggle,
.map-profile-button,
.map-favorites-button {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.36);
  color: #e2e8f0;
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.18);
  pointer-events: auto;
}

.map-status-filter__toggle:hover,
.map-profile-button:hover,
.map-favorites-button:hover {
  border-color: rgba(34, 197, 94, 0.58);
  background: rgba(15, 23, 42, 0.52);
  color: #f8fafc;
}

.map-profile-button,
.map-favorites-button {
  position: absolute;
  right: 16px;
  z-index: 700;
}

.map-profile-button {
  top: 64px;
}

.map-favorites-button {
  top: 116px;
}

.map-status-filter__toggle svg,
.map-profile-button svg,
.map-favorites-button svg {
  width: 21px;
  height: 21px;
}

.map-status-filter__panel {
  position: absolute;
  top: 0;
  right: 54px;
  width: 238px;
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.34);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(22px) scale(0.94);
  transform-origin: right center;
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(16px) saturate(1.18);
}

.map-status-filter.is-open .map-status-filter__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scaleX(1);
}

.map-status-filter__statuses,
.map-status-filter__fuels {
  display: grid;
  gap: 7px;
}

.map-status-filter__statuses {
  grid-template-columns: repeat(4, 38px);
  justify-content: space-between;
}

.map-status-filter__fuels {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.map-status-filter__button {
  --filter-color: #64748b;
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--filter-color) 72%, transparent));
}

.map-status-filter__button::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: var(--filter-color);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--filter-color) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--filter-color) 72%, transparent),
    inset 0 -8px 14px rgba(15, 23, 42, 0.24);
}

.map-status-filter__button svg {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: rgba(12, 16, 24, 0.72);
  color: #f8fafc;
}

.map-status-filter__button.available {
  --filter-color: #22c55e;
}

.map-status-filter__button.queue {
  --filter-color: #f97316;
}

.map-status-filter__button.low {
  --filter-color: #facc15;
}

.map-status-filter__button.unavailable {
  --filter-color: #f43f5e;
}

.map-status-filter__button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  z-index: 2;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: #f8fafc;
  opacity: 0;
  transform: rotate(-38deg) scaleX(0.72);
  transition: opacity 150ms ease, transform 150ms ease;
}

.map-fuel-filter__button {
  min-width: 0;
  height: 32px;
  border: 2px solid rgba(34, 197, 94, 0.78);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 950;
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.map-status-filter__button.is-off,
.map-fuel-filter__button.is-off {
  opacity: 0.44;
  filter: saturate(0.35);
}

.map-fuel-filter__button.is-off {
  border-color: rgba(148, 163, 184, 0.26);
}

.map-status-filter__button.is-off::after {
  opacity: 1;
  transform: rotate(-38deg) scaleX(1);
}

.map-fuel-filter__button.is-off {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.map-status-filter__advanced {
  justify-self: start;
  min-height: 0;
  display: inline-grid;
  grid-template-columns: auto 14px;
  gap: 5px;
  align-items: center;
  margin-top: 1px;
  padding: 2px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
  box-shadow: none;
}

.map-status-filter__advanced:hover {
  color: #cbd5e1;
}

.map-status-filter__advanced svg {
  width: 14px;
  height: 14px;
  color: #64748b;
}

.map-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 700;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.map-action-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.36);
  color: #e2e8f0;
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.18);
}

.map-action-button:hover {
  border-color: rgba(34, 197, 94, 0.58);
  background: rgba(15, 23, 42, 0.52);
  color: #f8fafc;
}

.map-zoom-actions {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.36);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.18);
}

.map-zoom-actions .map-action-button {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.map-zoom-actions .map-action-button + .map-action-button {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.map-action-button svg {
  width: 20px;
  height: 20px;
}

.theme-icon--sun,
.map-action-button.is-night .theme-icon--moon {
  display: none;
}

.map-action-button.is-night .theme-icon--sun {
  display: block;
}

.leaflet-control-container .leaflet-control-zoom {
  display: none;
}

.leaflet-popup-content {
  margin: 10px 12px;
  min-width: 180px;
}

.toast {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 760;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: calc(100vw - 32px);
  min-height: 32px;
  padding: 7px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.32);
  color: #e5e7eb;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-success {
  border-color: rgba(22, 163, 74, 0.92);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04)),
    rgba(6, 78, 59, 0.34);
  color: #4ade80;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), 0 0 16px rgba(34, 197, 94, 0.14);
}

.toast.is-warning {
  border-color: rgba(250, 204, 21, 0.7);
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(250, 204, 21, 0.04)),
    rgba(113, 63, 18, 0.32);
  color: #facc15;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), 0 0 16px rgba(250, 204, 21, 0.14);
}

.toast.is-error {
  border-color: rgba(248, 113, 113, 0.72);
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0.04)),
    rgba(127, 29, 29, 0.32);
  color: #fb7185;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24), 0 0 16px rgba(248, 113, 113, 0.14);
}

.toast.is-info {
  border-color: rgba(96, 165, 250, 0.56);
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0.04)),
    rgba(30, 58, 138, 0.28);
  color: #60a5fa;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .gas-pin.is-active {
    animation: none;
  }

  .gas-pin.is-active::after {
    opacity: 0.42;
    animation: none;
  }

  .user-location-marker::before {
    animation: none;
  }

  .toast {
    transition: none;
  }
}

@keyframes user-location-pulse {
  from {
    opacity: 0.85;
    transform: scale(0.45);
  }

  to {
    opacity: 0;
    transform: scale(1.25);
  }
}

@keyframes selected-pin-bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  38% {
    transform: translateY(-8px) scale(1.08);
  }
  72% {
    transform: translateY(2px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes selected-pin-pulse {
  0% {
    opacity: 0.72;
    transform: scale(0.78);
  }

  72% {
    opacity: 0.18;
  }

  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}
