/* LazerMap styles. Scoped under .lm-root. Override the custom properties to match brand tokens. */
.lm-root {
  --lm-pin: #d62027;          /* Lazer red: replace with the brand token */
  --lm-pin-size: 18px;        /* red fill diameter; the white ring adds 2px on each side */
  --lm-pin-ring: #ffffff;
  --lm-focus: #111827;
  --lm-bg: #eef1f3;
  --lm-text: #1f2933;
  position: relative;
  width: 100%;
  height: clamp(380px, 62vh, 640px);
  background: var(--lm-bg);
  border-radius: 8px;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--lm-text);
}
/* Higher specificity on purpose: maplibre-gl.css sets .maplibregl-map { position: relative } and must not win,
   whichever stylesheet loads last (matters inside Webflow embeds). */
.lm-root > .lm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Pins: 32px hit area, red dot sized by --lm-pin-size */
.lm-pin {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; display: grid; place-items: center;
}
.lm-pin::before {
  content: ""; width: var(--lm-pin-size); height: var(--lm-pin-size); border-radius: 50%;
  background: var(--lm-pin); border: 2px solid var(--lm-pin-ring);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45); transition: transform .12s ease;
}
.lm-pin:hover::before, .lm-pin[aria-expanded="true"]::before { transform: scale(1.25); }
.lm-pin:focus-visible { outline: 3px solid var(--lm-focus); outline-offset: 0; }

/* Tooltip (MapLibre popup) */
.lm-tooltip .maplibregl-popup-content {
  padding: 8px 12px; border-radius: 6px; max-width: 240px; font-size: 14px; line-height: 1.35;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); color: var(--lm-text);
}
.lm-tooltip strong { display: block; margin-bottom: 2px; }
.lm-tooltip .maplibregl-popup-tip { border-top-color: #fff; border-bottom-color: #fff; }

/* Loading / error / empty overlay */
.lm-status {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center;
  background: var(--lm-bg); font-size: 15px;
}
.lm-status[hidden] { display: none; }
.lm-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #cbd2d9; border-top-color: var(--lm-pin); animation: lm-spin .9s linear infinite;
}
.lm-status:not([data-state="loading"]) .lm-spinner { display: none; }
.lm-retry {
  font: inherit; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--lm-text);
  background: #fff; color: var(--lm-text); cursor: pointer;
}
.lm-retry:focus-visible { outline: 3px solid var(--lm-focus); outline-offset: 2px; }
.lm-status:not([data-state="error"]) .lm-retry { display: none; }
.lm-fallback { margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; columns: 2; column-gap: 24px; text-align: left; }
.lm-fallback[hidden] { display: none; }

/* Reset view control (bottom-left; the zoom buttons are top-right) */
.lm-reset-group { background: #fff; border-radius: 6px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .1); }
.lm-reset {
  display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border: 0; border-radius: 6px;
  background: transparent; color: var(--lm-text); font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}
.lm-reset:hover { background: #f1f3f5; }
.lm-reset:focus-visible { outline: 3px solid var(--lm-focus); outline-offset: 2px; }

/* Non-blocking notice (some tiles failed) */
.lm-notice {
  position: absolute; left: 8px; top: 8px; z-index: 4; max-width: calc(100% - 16px);
  background: rgba(255, 255, 255, .95); border-radius: 6px; padding: 6px 10px; font-size: 13px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.lm-notice[hidden] { display: none; }

.lm-sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Very narrow phones: keep dense areas readable */
@media (max-width: 359px) { .lm-root { --lm-pin-size: 16px; } }

@media (max-width: 599px) {
  .lm-root { height: clamp(360px, 70vh, 520px); border-radius: 0; }
  .lm-fallback { columns: 1; }
}
@keyframes lm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .lm-spinner { animation: none; }
  .lm-pin::before { transition: none; }
}
