.weather-probe-marker {
  background: transparent;
  border: 0;
}

.weather-probe-marker-pin {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: #099fc6;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 0 0 3px rgb(9 159 198 / 22%), 0 8px 20px rgb(2 8 23 / 45%);
  transform: rotate(-45deg);
}

.weather-probe-marker-pin svg {
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
}

.weather-probe-mode-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 12px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: #bfc7e6;
  background: #151936;
  border: 1px solid rgb(130 141 196 / 24%);
  border-radius: 6px;
}

.weather-probe-mode-button svg {
  width: 18px;
  height: 18px;
}

.weather-probe-mode-button.active {
  color: #07111f;
  background: #44d5ef;
  border-color: #44d5ef;
}

#map.weather-probe-targeting {
  cursor: crosshair;
}

#map {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.weather-probe-panel {
  position: absolute;
  z-index: 1220;
  top: var(--weather-probe-top, 92px);
  left: var(--weather-probe-left, 12px);
  display: none;
  width: min(340px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 150px));
  overflow: auto;
  color: #f7f8ff;
  background: rgb(8 11 29 / 96%);
  border: 1px solid rgb(120 130 190 / 26%);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgb(2 5 20 / 52%);
  backdrop-filter: blur(10px);
}

.weather-probe-panel.open {
  display: block;
}

.weather-probe-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 13px 13px 11px;
  border-bottom: 1px solid rgb(120 130 190 / 18%);
}

.weather-probe-heading-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #091020;
  background: #44d5ef;
  border-radius: 6px;
}

.weather-probe-heading-icon svg {
  width: 20px;
  height: 20px;
}

.weather-probe-header strong,
.weather-probe-header small {
  display: block;
  overflow-wrap: anywhere;
}

.weather-probe-header strong {
  font-size: 15px;
}

.weather-probe-header small {
  margin-top: 3px;
  color: #9ba4ca;
  font-size: 12px;
}

.weather-probe-header button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: #c8cee8;
  background: #171b38;
  border: 1px solid rgb(140 150 205 / 24%);
  border-radius: 50%;
}

.weather-probe-header button svg {
  width: 18px;
  height: 18px;
}

.weather-probe-summary {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 11px 13px 5px;
}

.weather-probe-summary p {
  margin: 0;
  color: #dce2f8;
  font-size: 13px;
  line-height: 1.4;
}

.weather-probe-loader {
  display: none;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid rgb(68 213 239 / 24%);
  border-top-color: #44d5ef;
  border-radius: 50%;
  animation: weather-probe-spin 0.8s linear infinite;
}

.weather-probe-panel.loading .weather-probe-loader {
  display: block;
}

.weather-probe-panel.error .weather-probe-summary p {
  color: #ffb6a1;
}

.weather-probe-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 7px 13px 12px;
  overflow: hidden;
  background: rgb(120 130 190 / 15%);
  border: 1px solid rgb(120 130 190 / 16%);
  border-radius: 6px;
}

.weather-probe-metrics[hidden] {
  display: none;
}

.weather-probe-metrics > div {
  min-width: 0;
  padding: 9px 10px;
  background: #11152e;
}

.weather-probe-metrics dt,
.weather-probe-metrics dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.weather-probe-metrics dt {
  color: #858fb8;
  font-size: 10px;
  text-transform: uppercase;
}

.weather-probe-metrics dd {
  margin-top: 3px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.weather-probe-retry {
  display: inline-flex;
  min-height: 40px;
  margin: 5px 13px 12px;
  padding: 0 13px;
  gap: 7px;
  align-items: center;
  color: #08101e;
  background: #44d5ef;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.weather-probe-retry[hidden] {
  display: none;
}

.weather-probe-retry svg {
  width: 16px;
  height: 16px;
}

.weather-probe-panel footer {
  display: flex;
  justify-content: space-between;
  padding: 9px 13px;
  color: #737da8;
  border-top: 1px solid rgb(120 130 190 / 15%);
  font-size: 10px;
}

@keyframes weather-probe-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .weather-probe-panel {
    position: fixed;
    top: auto;
    right: max(16px, var(--safe-area-right, 0px));
    bottom: calc(var(--mobile-bottom-nav-height, 78px) + var(--safe-area-bottom, 0px) + 12px);
    left: auto;
    width: min(270px, calc(100vw - 32px - var(--safe-area-left, 0px) - var(--safe-area-right, 0px)));
    max-height: min(
      320px,
      calc(
        100dvh - var(--topbar-height, 54px) - var(--mobile-bottom-nav-height, 78px) -
          var(--safe-area-top, 0px) - var(--safe-area-bottom, 0px) - 36px
      )
    );
    overscroll-behavior: contain;
    background: #11152d;
    border-color: rgb(120 130 190 / 22%);
    border-radius: 8px;
    box-shadow: var(--shadow, 0 12px 32px rgb(2 5 20 / 45%));
    backdrop-filter: none;
  }

  .weather-probe-panel.weather-probe-mobile-top {
    top: calc(var(--topbar-height, 54px) + var(--safe-area-top, 0px) + 12px);
    bottom: auto;
  }

  .weather-probe-header {
    grid-template-columns: 28px minmax(0, 1fr) 44px;
    gap: 7px;
    padding: 8px 9px 7px;
  }

  .weather-probe-heading-icon {
    width: 28px;
    height: 28px;
  }

  .weather-probe-heading-icon svg {
    width: 17px;
    height: 17px;
  }

  .weather-probe-header strong {
    font-size: 14px;
  }

  .weather-probe-summary {
    min-height: 34px;
    padding: 7px 9px 3px;
  }

  .weather-probe-metrics {
    margin: 5px 9px 8px;
  }

  .weather-probe-metrics > div {
    padding: 6px 7px;
  }

  .weather-probe-metrics dd {
    font-size: 12px;
  }

  .weather-probe-panel footer {
    padding: 6px 9px;
  }

  .weather-probe-header button {
    width: 44px;
    height: 44px;
  }

  .weather-probe-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-probe-loader {
    animation-duration: 1.8s;
  }
}

