/* Store Locator Widget — Mobile-first, theme-friendly */

.store-locator-block {
  --sl-font: var(--font-body-family, inherit);
  --sl-color-text: var(--color-foreground, #1a1a1a);
  --sl-color-bg: var(--color-background, #ffffff);
  --sl-color-border: var(--color-border, #e5e5e5);
  --sl-color-subdued: var(--color-foreground-subdued, #6b7280);
  --sl-radius: var(--buttons-radius, 8px);
  --sl-in-stock: #16a34a;
  --sl-low-stock: #f59e0b;
  --sl-out-of-stock: #dc2626;
  --sl-primary: #2563eb;
  font-family: var(--sl-font);
  color: var(--sl-color-text);
}

/* ── Custom map popup — our own OverlayView card (no fragile Google InfoWindow chrome) ── */
.nb-gpop {
  position: absolute;
  /* anchored at the marker tip; lift the card fully above the pin (~50px tall
     incl. the larger focused pin) and centre horizontally */
  transform: translate(-50%, calc(-100% - 52px));
  z-index: 5;
}

.sl-iw {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  width: 248px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 34px -14px rgba(16, 18, 20, 0.4);
  padding: 11px 13px 12px;
}

.sl-iw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sl-iw-directions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

.sl-iw-directions:hover {
  background: #1d4ed8;
}

.sl-iw-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}
.sl-iw-close:hover { background: rgba(0, 0, 0, 0.06); color: #1a1a1a; }

.sl-iw-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
  color: #1a1a1a;
}

.sl-iw-address {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.sl-iw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.sl-iw-hours {
  font-size: 11.5px;
  color: #6b7280;
  min-width: 0;
}

.sl-iw-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.iw-stock-green {
  background: #dcfce7;
  color: #15803d;
}

.iw-stock-amber {
  background: #fef3c7;
  color: #b45309;
}

.iw-stock-red {
  background: #fee2e2;
  color: #b91c1c;
}

.iw-stock-grey {
  background: #f3f4f6;
  color: #6b7280;
}

/* ── Skeleton loading ── */
.sl-skeleton-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--sl-color-border);
}

.sl-skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--nb-ink,#15181d) 7%, var(--nb-surface,#fff)) 25%, color-mix(in srgb, var(--nb-ink,#15181d) 12%, var(--nb-surface,#fff)) 50%, color-mix(in srgb, var(--nb-ink,#15181d) 7%, var(--nb-surface,#fff)) 75%);
  background-size: 200% 100%;
  animation: sl-shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.sl-skeleton-title { width: 60%; height: 16px; }
.sl-skeleton-address { width: 80%; }
.sl-skeleton-stock { width: 40%; }

@keyframes sl-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty and error states ── */
.sl-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--sl-color-subdued);
}

.sl-retry {
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid var(--sl-color-border);
  border-radius: var(--sl-radius);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.sl-retry:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .sl-skeleton-line {
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   Nearby signature layer — theming tokens + living pins
   "Quiet-luxury cartography": editorial type, accent-tinted pins,
   a breathing focus marker on the nearest in-stock store.
   ════════════════════════════════════════════════════════════════ */
.store-locator-block {
  --nb-accent: #0f9d58;
  --nb-radius: 14px;
  --nb-surface: #ffffff;
  --nb-ink: #15181d;
  --nb-muted: #6b7280;
  --nb-line: #e7e6e2;
  --nb-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --nb-font-ui: "Hanken Grotesk", var(--sl-font, system-ui), -apple-system, sans-serif;
}

/* ── Living teardrop pins ── */
.nb-pin {
  position: relative;
  width: 30px;
  height: 40px;
  cursor: pointer;
}
.nb-pin__svg {
  position: relative;
  z-index: 1;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(15, 18, 24, 0.35));
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.nb-pin__drop { fill: var(--nb-pin-color, #9aa3ae); }
.nb-pin--in { --nb-pin-color: var(--nb-pin-in, var(--nb-accent, #0f9d58)); }
.nb-pin--low { --nb-pin-color: var(--nb-pin-low, #f59e0b); }
.nb-pin--out { --nb-pin-color: var(--nb-pin-out, #dc2626); }
.nb-pin--unknown { --nb-pin-color: #9aa3ae; }

.nb-pin__glow {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 0;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid var(--nb-pin-color);
  opacity: 0;
  pointer-events: none;
}

/* Focused (nearest in-stock) pin — larger, with a breathing ring */
.nb-pin--focus { width: 38px; height: 50px; z-index: 6; }
.nb-pin--focus .nb-pin__svg {
  width: 38px;
  height: 50px;
  filter: drop-shadow(0 7px 11px rgba(15, 18, 24, 0.42));
}
.nb-pin--focus .nb-pin__glow {
  top: 17px;
  animation: nb-breathe 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes nb-breathe {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
  70%  { opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}
.nb-pin:hover .nb-pin__svg { transform: translateY(-3px); }

/* ── "You are here" dot ── */
.nb-youdot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22), 0 2px 7px rgba(8, 10, 14, 0.35);
}
.nb-youdot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  /* scale-only keyframe — inset already centres it, so no translate */
  animation: nb-ring 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes nb-ring {
  0%   { transform: scale(0.6); opacity: 0.7; }
  70%  { opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .nb-youdot::after { animation: none; opacity: 0.3; } }

/* ── Themed MapLibre popup ── */
.maplibregl-popup.nb-popup .maplibregl-popup-content {
  font-family: var(--nb-font-ui);
  font-size: 13px;
  line-height: 1.4;
  color: var(--nb-muted);
  border-radius: calc(var(--nb-radius) * 0.7);
  padding: 11px 14px;
  border: 1px solid var(--nb-line);
  box-shadow: 0 14px 34px -14px rgba(15, 18, 24, 0.45);
  background: var(--nb-surface, #fff);
}
.maplibregl-popup.nb-popup .maplibregl-popup-content strong {
  color: var(--nb-ink);
  font-weight: 600;
}
.maplibregl-popup.nb-popup .maplibregl-popup-tip { display: none; }

@media (prefers-reduced-motion: reduce) {
  .nb-pin--focus .nb-pin__glow { animation: none; opacity: 0.35; }
  .nb-pin:hover .nb-pin__svg { transform: none; }
}

/* ════════════════════════════════════════════════════════════════
   Nearby immersive view — the expanded dialog, glass chrome,
   and the editorial Store Deck.
   ════════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.nb-modal {
  /* Self-sufficient token defaults — the modal is portaled to <body>,
     so it can't rely on .store-locator-block's cascade. JS overrides the
     dynamic tokens (accent/radius/theme/surface/ink/muted/line) inline. */
  --nb-accent: #0f9d58;
  --nb-radius: 14px;
  --nb-surface: #ffffff;
  --nb-ink: #15181d;
  --nb-muted: #6b7280;
  --nb-line: #e7e6e2;
  --nb-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --nb-font-ui: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  font-family: var(--nb-font-ui);
}
.nb-modal[hidden] { display: none; }
.nb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.46);
  backdrop-filter: blur(4px) saturate(1.1);
  -webkit-backdrop-filter: blur(4px) saturate(1.1);
  animation: nb-fade 0.4s ease both;
}
@keyframes nb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Dialog shell ── */
.nb-dialog {
  position: relative;
  width: min(960px, 95vw);
  height: min(620px, 88vh);
  background: var(--nb-surface, #fff);
  color: var(--nb-ink, #15181d);
  border-radius: calc(var(--nb-radius, 14px) + 8px);
  overflow: hidden;
  box-shadow: 0 44px 110px -34px rgba(8, 10, 14, 0.6), 0 2px 8px -2px rgba(8, 10, 14, 0.2);
  /* entrance handled by the JS FLIP morph (morphOpen/morphClose).
     NB: do NOT add `will-change: transform` here — promoting the dialog to its
     own compositing layer desyncs the MapLibre canvas from its HTML markers, so
     pins visibly slide/drift while zooming. The morph animates fine without it. */
}
.nb-stage { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: minmax(0, 1fr); height: 100%; }

/* ── Map side ── */
.nb-mapside { position: relative; overflow: hidden; min-height: 220px; background: color-mix(in srgb, var(--nb-ink, #15181d) 6%, var(--nb-surface, #fff)); }
/* Higher specificity + explicit size: MapLibre's own stylesheet loads after
   ours and sets .maplibregl-map{position:relative}, which would otherwise
   collapse this absolutely-positioned container and clip the map canvas. */
.nb-mapside .nb-map {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
}
.nb-mapside::after {
  /* subtle inner vignette so floating chrome reads cleanly */
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 80px -30px rgba(8, 10, 14, 0.35);
}

.nb-search {
  position: absolute; top: 16px; left: 16px; right: 16px; z-index: 4;
  display: flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 15px;
  background: color-mix(in srgb, var(--nb-surface, #fff) 74%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--nb-ink, #15181d) 9%, transparent);
  border-radius: calc(var(--nb-radius, 14px) * 0.85);
  box-shadow: 0 10px 28px -12px rgba(8, 10, 14, 0.34);
}
.nb-search__icon { color: var(--nb-muted, #6b7280); flex: 0 0 auto; }
.nb-search__input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; color: var(--nb-ink, #15181d); }
.nb-search__input::placeholder { color: var(--nb-muted, #6b7280); }

.nb-detect {
  position: absolute; bottom: 16px; left: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px; cursor: pointer;
  background: color-mix(in srgb, var(--nb-surface, #fff) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--nb-ink, #15181d) 9%, transparent);
  border-radius: 999px; color: var(--nb-ink, #15181d);
  font: inherit; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 10px 24px -12px rgba(8, 10, 14, 0.32);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.nb-detect:hover { transform: translateY(-1px); }
.nb-detect.sl-detecting { opacity: 0.55; }

.nb-close {
  position: absolute; top: 14px; right: 14px; z-index: 7;
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--nb-surface, #fff) 80%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--nb-ink, #15181d) 9%, transparent);
  border-radius: 50%; color: var(--nb-ink, #15181d);
  box-shadow: 0 8px 20px -10px rgba(8, 10, 14, 0.3);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.nb-close:hover { transform: rotate(90deg); }

/* ── Deck side ── */
.nb-deckside {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--nb-surface, #fff);
  background-image: radial-gradient(130% 70% at 100% 0%, color-mix(in srgb, var(--nb-accent, #0f9d58) 8%, transparent), transparent 58%);
}
.nb-dhead { padding: 26px 26px 14px; }
.nb-prod { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.nb-prod img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; border: 1px solid var(--nb-line, #e7e6e2); }
.nb-prod__title { font-size: 12px; color: var(--nb-muted, #6b7280); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--nb-accent, #0f9d58); font-weight: 700; }
.nb-title { font-family: var(--nb-font-display); font-weight: 500; font-size: 30px; line-height: 1.04; letter-spacing: -0.01em; margin: 9px 0 7px; color: var(--nb-ink, #15181d); }
.nb-summary { font-size: 13px; color: var(--nb-muted, #6b7280); margin: 0; }

.nb-deck { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px 22px; display: flex; flex-direction: column; gap: 11px; }
.nb-deck::-webkit-scrollbar { width: 8px; }
.nb-deck::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--nb-ink, #15181d) 14%, transparent); border-radius: 99px; }

/* ── Ticket ── */
.nb-ticket {
  position: relative; padding: 15px 16px; cursor: pointer;
  background: color-mix(in srgb, var(--nb-ink, #15181d) 2.5%, var(--nb-surface, #fff));
  border: 1px solid var(--nb-line, #e7e6e2);
  border-radius: var(--nb-radius, 14px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s, border-color 0.2s;
  animation: nb-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 0.18s);
}
@keyframes nb-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nb-deck--ready .nb-ticket { animation: none; }
.nb-ticket:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -22px rgba(8, 10, 14, 0.42);
  border-color: color-mix(in srgb, var(--nb-ink, #15181d) 18%, transparent);
}
.nb-ticket.is-active {
  border-color: color-mix(in srgb, var(--nb-accent, #0f9d58) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nb-accent, #0f9d58) 28%, transparent),
              0 20px 38px -24px color-mix(in srgb, var(--nb-accent, #0f9d58) 65%, transparent);
}
.nb-ticket.is-active::before {
  content: ""; position: absolute; left: 0; top: 15px; bottom: 15px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--nb-accent, #0f9d58);
}
.nb-ticket__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.nb-ticket__name { font-size: 15px; font-weight: 600; color: var(--nb-ink, #15181d); margin: 0; line-height: 1.25; }
.nb-ticket__addr { font-size: 12.5px; color: var(--nb-muted, #6b7280); margin: 3px 0 0; line-height: 1.4; }

.nb-pill { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.nb-pill--in { background: color-mix(in srgb, var(--nb-accent, #0f9d58) 16%, transparent); color: var(--nb-accent, #0f9d58); }
.nb-pill--low { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.nb-pill--out { background: rgba(220, 38, 38, 0.13); color: #b91c1c; }
.nb-pill--unknown { background: color-mix(in srgb, var(--nb-ink, #15181d) 8%, transparent); color: var(--nb-muted, #6b7280); }

.nb-ticket__meta { display: flex; align-items: baseline; gap: 9px; margin-top: 12px; font-size: 12.5px; color: var(--nb-muted, #6b7280); }
.nb-dist b { font-family: var(--nb-font-display); font-weight: 500; font-size: 20px; color: var(--nb-ink, #15181d); }
.nb-sep { font-style: normal; opacity: 0.45; }

.nb-ticket__pickup { margin: 6px 0 0; font-size: 12px; color: var(--nb-muted, #4b5563); }
.nb-ticket__cta { display: flex; gap: 8px; margin-top: 14px; }
.nb-btn {
  flex: 1; text-align: center; font-size: 12.5px; font-weight: 600;
  padding: 9px 0; border-radius: calc(var(--nb-radius, 14px) * 0.6);
  text-decoration: none; transition: transform 0.15s ease, filter 0.15s;
}
.nb-btn:hover { transform: translateY(-1px); }
.nb-btn--primary { background: var(--nb-accent, #0f9d58); color: #fff; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--nb-accent, #0f9d58) 70%, transparent); }
.nb-btn--primary:hover { filter: brightness(1.06); }
.nb-btn--ghost { background: transparent; color: var(--nb-ink, #15181d); border: 1px solid var(--nb-line, #e7e6e2); }
.nb-btn--icon { flex: 0 0 auto; }

.nb-empty { padding: 44px 24px; text-align: center; color: var(--nb-muted, #6b7280); font-size: 13.5px; }

/* ── Footer wordmark ── */
.nb-foot {
  flex: 0 0 auto;
  display: flex; align-items: baseline; gap: 8px;
  padding: 13px 26px 17px;
  border-top: 1px solid var(--nb-line, #e7e6e2);
}
.nb-foot__by { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nb-muted, #6b7280); opacity: 0.75; }
.nb-wordmark { display: inline-block; font-family: var(--nb-font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--nb-ink, #15181d); }
.nb-wordmark::first-letter { color: var(--nb-accent, #0f9d58); }
[data-nb-hide-branding] .nb-foot { display: none; }

/* ── Dark surface refinements ── */
.nb-modal[data-nb-theme="dark"] .nb-ticket { background: color-mix(in srgb, #fff 4%, var(--nb-surface, #161c24)); }
.nb-modal[data-nb-theme="dark"] .nb-btn--ghost { border-color: rgba(255, 255, 255, 0.14); }
.nb-modal[data-nb-theme="dark"] .nb-pill--low { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.nb-modal[data-nb-theme="dark"] .nb-pill--out { background: rgba(220, 38, 38, 0.22); color: #fca5a5; }

/* ── Motion off ── */
@media (prefers-reduced-motion: reduce) {
  .nb-dialog, .nb-ticket, .nb-backdrop { animation: none; }
  .nb-ticket:hover, .nb-btn:hover, .nb-detect:hover { transform: none; }
  .nb-close:hover { transform: none; }
}

/* ── Mobile ── */
@media (max-width: 760px) {
  .nb-modal { padding: 0; align-items: flex-end; }
  .nb-dialog { width: 95vw; height: 92vh; height: 92dvh; border-radius: 20px 20px 0 0; }
  .nb-stage { grid-template-columns: 1fr; grid-template-rows: 42% 58%; }
  .nb-mapside { min-height: 0; }
  .nb-title { font-size: 24px; }
  .nb-dhead { padding: 20px 18px 12px; }
  .nb-search { right: 58px; }           /* clear the close button */
  .nb-deck { padding: 6px 14px 18px; }
  .nb-btn { padding: 12px 0; }          /* ≥44px tap target */

  /* Compact: full-width sheet, single column (no empty map row).
     `.nb-modal` prefix lifts specificity above the base `.nb-dialog--compact`
     width rule (which is later in source order). */
  .nb-modal .nb-dialog--compact { width: 100vw; }
  .nb-dialog--compact .nb-stage { grid-template-rows: minmax(0, 1fr); }
  .nb-dialog--compact .nb-search { right: auto; }  /* header flow — close button sits above it */
  .nb-dialog--compact .nb-dhead { padding-right: 58px; }  /* clear the close button */
}

/* ── MapLibre controls, themed to feel intentional ── */
.nb-mapside .maplibregl-ctrl-top-right { top: 74px; right: 14px; }
.nb-mapside .maplibregl-ctrl-group {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--nb-ink, #15181d) 8%, transparent);
  box-shadow: 0 8px 20px -10px rgba(8, 10, 14, 0.3);
  background: color-mix(in srgb, var(--nb-surface, #fff) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nb-mapside .maplibregl-ctrl-group button { width: 31px; height: 31px; }
.nb-mapside .maplibregl-ctrl-group button + button { border-top: 1px solid color-mix(in srgb, var(--nb-ink, #15181d) 7%, transparent); }
.nb-mapside .maplibregl-ctrl-attrib {
  font-size: 10px;
  background: color-mix(in srgb, var(--nb-surface, #fff) 66%, transparent) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 7px 0 0 0;
  padding: 1px 7px;
}
.nb-mapside .maplibregl-ctrl-attrib a { color: var(--nb-muted, #6b7280); }
.nb-mapside .maplibregl-ctrl-bottom-left { display: none; } /* keep the locate pill clear */

/* ════════════════════════════════════════════════════════════════
   Living Tile — the inline before-click hero on the product page
   ════════════════════════════════════════════════════════════════ */
.nb-tile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--nb-line, #e7e6e2);
  border-radius: var(--nb-radius, 14px);
  overflow: hidden;
  background: var(--nb-surface, #fff);
  font-family: var(--nb-font-ui);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s;
}
.nb-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -26px rgba(8, 10, 14, 0.45);
  border-color: color-mix(in srgb, var(--nb-ink, #15181d) 16%, transparent);
}
.nb-tile:focus-visible { outline: 2px solid var(--nb-accent, #0f9d58); outline-offset: 2px; }

.nb-tile__map { position: relative; height: 150px; background: color-mix(in srgb, var(--nb-ink, #15181d) 6%, var(--nb-surface, #fff)); overflow: hidden; }
/* !important + specificity so MapLibre's late stylesheet can't collapse it */
.nb-tile__map .nb-tile__mini { position: absolute !important; inset: 0; width: 100%; height: 100%; }
.nb-tile__scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, transparent 45%, rgba(8, 10, 14, 0.1)); }

.nb-tile__shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--nb-ink,#15181d) 6%, var(--nb-surface,#fff)) 30%, color-mix(in srgb, var(--nb-ink,#15181d) 3%, var(--nb-surface,#fff)) 50%, color-mix(in srgb, var(--nb-ink,#15181d) 6%, var(--nb-surface,#fff)) 70%);
  background-size: 200% 100%;
  animation: nb-shimmer 1.3s linear infinite;
}
@keyframes nb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.nb-tile__glass {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--nb-surface, #fff) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--nb-ink, #15181d) 8%, transparent);
  border-radius: calc(var(--nb-radius, 14px) * 0.78);
  box-shadow: 0 12px 28px -14px rgba(8, 10, 14, 0.4);
}
.nb-tile__glass--solo { position: static; box-shadow: none; border-radius: 0; border: 0; }
.nb-tile--loading .nb-tile__glass { box-shadow: none; }
/* Neutral skeleton (no map area) so compact widgets don't flash a map on load */
.nb-tile--skeleton { animation: nb-pulse 1.3s ease-in-out infinite; }
.nb-tile--skeleton .nb-tile__cta { color: var(--nb-muted, #6b7280); }
@keyframes nb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.62; } }
@media (prefers-reduced-motion: reduce) { .nb-tile--skeleton { animation: none; } }
.nb-tile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nb-tile__title { font-size: 13.5px; font-weight: 700; color: var(--nb-ink, #15181d); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-tile__sub { font-size: 11.5px; color: var(--nb-muted, #6b7280); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-tile__cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--nb-accent, #0f9d58); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .nb-tile:hover { transform: none; }
  .nb-tile__shimmer { animation: none; }
}

/* ════════════════════════════════════════════════════════════════
   Compact widget — Ticket strip + map-free dialog + perforation
   The lightweight, map-free alternative to the Living Tile: a
   full-width "claim-ticket" strip inline on the PDP that opens a
   narrower, paper-warm dialog reusing the existing deck. No map.
   State modifiers: --in / --low / --out / --empty.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Ticket strip (inline trigger, replaces .nb-tile) ── */
.nb-strip {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--nb-line, #e7e6e2);
  border-radius: var(--nb-radius, 14px);
  background: var(--nb-surface, #fff);
  font-family: var(--nb-font-ui);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s;
}
.nb-strip:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -26px rgba(8, 10, 14, 0.45);
  border-color: color-mix(in srgb, var(--nb-ink, #15181d) 16%, transparent);
}
.nb-strip:focus-visible { outline: 2px solid var(--nb-accent, #0f9d58); outline-offset: 2px; }

/* ── 2. Status pill — tinted by the strip's state modifier ── */
.nb-strip__pill {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--nb-ink, #15181d) 8%, transparent);
  color: var(--nb-muted, #6b7280);
}
.nb-strip--in .nb-strip__pill { background: color-mix(in srgb, var(--nb-accent, #0f9d58) 16%, transparent); color: var(--nb-accent, #0f9d58); }
.nb-strip--low .nb-strip__pill { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.nb-strip--out .nb-strip__pill { background: rgba(220, 38, 38, 0.13); color: #b91c1c; }
.nb-strip--empty .nb-strip__pill { background: color-mix(in srgb, var(--nb-ink, #15181d) 8%, transparent); color: var(--nb-muted, #6b7280); }

/* ── 3. Title + sub ── */
.nb-strip__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nb-strip__title {
  font-size: 13.5px; font-weight: 700; color: var(--nb-ink, #15181d); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nb-strip__sub {
  font-size: 11.5px; color: var(--nb-muted, #6b7280); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 4. "Check" CTA — solid accent ── */
.nb-strip__cta {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 14px;
  margin-left: 6px;
  border-radius: calc(var(--nb-radius, 14px) * 0.6);
  background: var(--nb-accent, #0f9d58);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--nb-accent, #0f9d58) 70%, transparent);
}

/* ── 6. Compact dialog — narrower, single column, no map ── */
.nb-dialog--compact { width: min(560px, 95vw); }
.nb-dialog--compact .nb-stage { grid-template-columns: 1fr; }
.nb-dialog--compact .nb-mapside { display: none; }

/* ── 7. Paper backdrop — warm, faintly grained surface ── */
.nb-dialog--compact .nb-deckside {
  background-color: color-mix(in srgb, var(--nb-ink, #15181d) 2%, var(--nb-surface, #fff));
  background-image:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--nb-accent, #0f9d58) 7%, transparent), transparent 56%),
    radial-gradient(100% 60% at 0% 100%, color-mix(in srgb, var(--nb-ink, #15181d) 4%, transparent), transparent 60%),
    radial-gradient(circle at center, color-mix(in srgb, var(--nb-ink, #15181d) 4%, transparent) 0 0.6px, transparent 0.7px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
  background-repeat: no-repeat, no-repeat, repeat;
}

/* ── 8. Header search in compact — flows in the header, not over a map ── */
.nb-dialog--compact .nb-dhead {
  padding: 24px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nb-dialog--compact .nb-search {
  position: static; right: auto; left: auto; top: auto; bottom: auto;
  width: 100%;
  box-shadow: 0 6px 18px -12px rgba(8, 10, 14, 0.28);
  background: color-mix(in srgb, var(--nb-surface, #fff) 88%, transparent);
}

/* ── 9. Ticket perforation — notched top/bottom edge in the deck ── */
.nb-dialog--compact .nb-ticket { position: relative; }
.nb-dialog--compact .nb-deck > .nb-ticket:last-child::after { display: none; }

/* ── 10. Compact entrance ── */
.nb-dialog--compact {
  animation: nb-fade-scale 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes nb-fade-scale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* ── Dark surface refinements ── */
.nb-modal[data-nb-theme="dark"] .nb-strip--low .nb-strip__pill { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.nb-modal[data-nb-theme="dark"] .nb-strip--out .nb-strip__pill { background: rgba(220, 38, 38, 0.22); color: #fca5a5; }

/* ── Motion off ── */
@media (prefers-reduced-motion: reduce) {
  .nb-dialog--compact { animation: none; }
  .nb-strip:hover { transform: none; }
}
