/**
 * Morton Locations Map Block
 *
 * Map canvas, lavender circular markers (legacy About-page look), and a branded
 * details panel that slides in over the map on click.
 */

/* ── Map stage + canvas ─────────────────────────────────────────────────── */
.ms-locations-map__stage {
  /* Match the legacy About-page map proportion (~490/1160). */
  box-shadow: 0 1px 3px rgba(0, 5, 62, 0.06), 0 8px 24px rgba(0, 5, 62, 0.05);
}

.ms-locations-map__canvas {
  aspect-ratio: 1160 / 490;
  min-height: 360px;
  background-color: #efefef;
}

@media (max-width: 800px) {
  .ms-locations-map__canvas {
    aspect-ratio: 4 / 5;
  }
}

/* ── Markers — lavender circle + centered glyph ─────────────────────────── */
/* The OverlayView anchor centers this element on the coordinate, so the circle
   handles only its own visual state (hover/active scale). */
.ms-locations-marker {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background-color: #c9c2f0; /* lavender */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 2px 5px rgba(0, 5, 62, 0.25);
}

.ms-locations-marker:hover,
.ms-locations-marker:focus-visible,
.ms-locations-marker.is-active {
  background-color: #fcc80b; /* sundress-yellow */
  transform: scale(1.12);
  outline: none;
  z-index: 2;
}

/* Mining-type icons are 2-up sprite sheets (navy variant | yellow variant).
   Show only the navy (left) half: scale the image to 200% width so each half
   fills the square, then pin it to the left edge. */
.ms-locations-marker__icon {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 200% 100%;
}

/* ── Details panel — new branding ───────────────────────────────────────── */
.ms-locations-map__panel {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: min(380px, calc(100% - 3rem));
  background-color: #00053e; /* morton-blue */
  color: #ffffff;
  padding: 2.25rem 2rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 5, 62, 0.35);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: none;
  z-index: 3;
}

.ms-locations-map__panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ms-locations-map__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: #c9c2f0; /* lavender */
  color: #00053e;
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease;
}

.ms-locations-map__close:hover {
  filter: brightness(1.05);
  transform: scale(1.06);
}

.ms-locations-map__eyebrow {
  margin: 0 0 0.5rem;
  font-family: fatfrank, sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fcc80b; /* sundress-yellow */
}

.ms-locations-map__name {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-family: fatfrank, sans-serif;
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.1;
}

.ms-locations-map__desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.ms-locations-map__desc :first-child {
  margin-top: 0;
}

.ms-locations-map__desc :last-child {
  margin-bottom: 0;
}

.ms-locations-map__desc p {
  margin: 0 0 0.75rem;
}

.ms-locations-map__desc a {
  color: #fcc80b;
  text-decoration: underline;
}

/* Mobile: panel becomes a bottom sheet spanning the map width. */
@media (max-width: 640px) {
  .ms-locations-map__panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 1rem 1rem 0 0;
    transform: translateY(12px);
  }

  .ms-locations-map__panel.is-open {
    transform: translateY(0);
  }
}
