/* Business map page. Unlayered on purpose: it must beat WordPress core's
   unlayered layout rules on the wrapping full-bleed section. */
.r2-sec.r2-map { padding: 0 !important; margin: 0 !important; max-width: none !important; }
.vmpa-map {
  --panel-w: 320px;
  position: relative;
  height: calc(100svh - var(--vmpa-head, 120px));
  min-height: 520px;
  background: var(--color-navy, #0b3146);
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--color-ink, #0b3146);
  overflow: hidden;
}
.vmpa-map-stage, .vmpa-map-stage gmp-map-3d { position: absolute; inset: 0; width: 100%; height: 100%; }

.vmpa-map-panel {
  position: absolute; z-index: 2; top: 16px; left: 16px; bottom: 16px; width: var(--panel-w);
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(255, 255, 255, .96); border-radius: 8px; padding: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}
.vmpa-map-sheet-toggle { display: none; }
.vmpa-map-search {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 16px;
  border: 0; border-bottom: 2px solid var(--color-navy, #0b3146); background: var(--color-paper, #f6f2ea); border-radius: 0;
}
.vmpa-map-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vmpa-map-chip {
  --chip: var(--color-navy, #0b3146);
  font: 600 12px/1 var(--font-body, system-ui); letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--chip); background: #fff; color: var(--chip);
}
.vmpa-map-chip.is-active { background: var(--chip); color: #fff; }
.vmpa-map-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.vmpa-map-list li { padding: 8px 2px; border-bottom: 1px solid #e6e1d6; }
.vmpa-map-list li[aria-current] { background: #fbf4e2; }
.vmpa-map-name {
  display: flex; gap: 8px; align-items: center; width: 100%; text-align: left;
  background: none; border: 0; padding: 0; font: 600 15px/1.3 var(--font-body, system-ui); color: inherit; cursor: pointer;
}
.vmpa-map-name i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.vmpa-map-meta { display: block; margin: 2px 0 0 18px; font-size: 13px; color: #55606a; }
.vmpa-map-meta a { color: var(--color-brick, #a4401f); }
.vmpa-map-fallback { margin: 0; padding: 10px 12px; background: #fbf4e2; border-left: 4px solid var(--color-marigold, #f2b233); }

.vmpa-map-tools { position: absolute; z-index: 2; top: 16px; right: 16px; display: flex; gap: 8px; }
.vmpa-map-tools button { touch-action: manipulation; }
/* Expanded (no Fullscreen API, e.g. iPhone): cover the whole screen. */
.vmpa-map.is-expanded { position: fixed !important; inset: 0; z-index: 100000; height: 100svh !important; min-height: 0; }
html.vmpa-map-expanded, html.vmpa-map-expanded body { overflow: hidden; }
.vmpa-map-tools button {
  font: 600 13px/1 var(--font-body, system-ui); padding: 10px 14px; border-radius: 6px; cursor: pointer;
  border: 0; background: var(--color-navy, #0b3146); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.vmpa-map-tools button:hover, .vmpa-map-tools button:focus-visible { background: var(--color-marigold, #f2b233); color: var(--color-navy, #0b3146); }

.vmpa-map-card {
  position: absolute; z-index: 3; right: 16px; bottom: 24px; width: min(360px, calc(100% - 32px));
  background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 8px 28px rgba(0, 0, 0, .32);
}
.vmpa-map .vmpa-map-card h2 {
  margin: 4px 0 8px !important; font-family: var(--font-display, var(--font-body)) !important;
  font-size: 28px !important; line-height: 1 !important; letter-spacing: 0 !important; text-wrap: balance;
  color: var(--color-navy, #0b3146) !important;
}
.vmpa-map-card-cat { --chip: var(--color-navy); margin: 0; font: 600 12px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--chip); }
.vmpa-map-card-blurb, .vmpa-map-card-facts { margin: 0 0 10px; font-size: 15px; line-height: 1.45; }
.vmpa-map-card-facts span { display: block; }
.vmpa-map-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* Theme paragraph rules zero the margins above; space the buttons from here. */
.vmpa-map .vmpa-map-card-actions { margin-top: 12px !important; }
.vmpa-map .vmpa-map-card-actions a {
  font: 600 13px/1 var(--font-body); padding: 9px 12px; border-radius: 6px; text-decoration: none !important;
  border: 2px solid var(--color-navy, #0b3146); color: var(--color-navy, #0b3146) !important; background: #fff;
}
.vmpa-map .vmpa-map-card-actions a.is-primary { background: var(--color-navy, #0b3146); color: #fff !important; }
.vmpa-map .vmpa-map-card-actions a:hover, .vmpa-map .vmpa-map-card-actions a:focus-visible { background: var(--color-marigold, #f2b233); border-color: var(--color-marigold, #f2b233); color: var(--color-navy, #0b3146) !important; }
.vmpa-map-card-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: #55606a; }

/* Fallback / no key: just the list, centred. */
.vmpa-map.is-fallback { height: auto; min-height: 0; background: var(--color-paper, #f6f2ea); padding: 24px 16px; }
.vmpa-map.is-fallback .vmpa-map-panel { position: static; width: auto; max-width: 720px; margin: 0 auto; box-shadow: none; }
.vmpa-map.is-fallback .vmpa-map-list { overflow: visible; }

@media (max-width: 599px) {
  .vmpa-map { height: calc(100svh - var(--vmpa-head, 96px)); }
  .vmpa-map-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 64px; padding: 8px 12px 12px;
    border-radius: 12px 12px 0 0; transition: max-height .25s ease; overflow: hidden;
  }
  .vmpa-map.sheet-open .vmpa-map-panel { max-height: 72%; }
  .vmpa-map-sheet-toggle {
    display: block; width: 100%; padding: 12px; border: 0; background: none; cursor: pointer;
    font: 700 15px/1 var(--font-body); color: var(--color-navy, #0b3146);
  }
  .vmpa-map-sheet-toggle::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: #c9c3b6; }
  .vmpa-map-tools { top: 12px; right: 12px; }
  /* Compact card: name, two lines of description, address + phone, one row
     of small buttons — the map stays the star. */
  .vmpa-map-card { left: 10px; right: 10px; bottom: 72px; width: auto; padding: 10px 14px 12px; }
  .vmpa-map .vmpa-map-card h2 { font-size: 20px !important; margin: 2px 0 4px !important; padding-right: 24px; }
  .vmpa-map-card-cat { font-size: 10px; }
  .vmpa-map-card-blurb, .vmpa-map-card-facts { font-size: 13px; line-height: 1.35; margin-bottom: 6px; }
  .vmpa-map-card-facts .is-hours { display: none; }
  .vmpa-map-card-facts span { display: inline; }
  .vmpa-map-card-facts span + span::before { content: " · "; }
  .vmpa-map-card-actions { flex-wrap: nowrap; gap: 6px; }
  .vmpa-map .vmpa-map-card-actions { margin-top: 8px !important; }
  .vmpa-map .vmpa-map-card-actions a { font-size: 12px; padding: 7px 9px; white-space: nowrap; }
  .vmpa-map-card-close { top: 4px; right: 6px; font-size: 22px; }
  /* Keep the card short so it doesn't cover the map: two lines, tap for more. */
  .vmpa-map-card-blurb:not(.is-open) {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; cursor: pointer;
  }
  .vmpa-map.is-fallback .vmpa-map-panel { max-height: none; border-radius: 8px; }
  .vmpa-map.is-fallback .vmpa-map-sheet-toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vmpa-map-panel { transition: none; } }
