/* Passport Stamps Map — scoped so Avada / theme CSS cannot restyle the page. */
.psm-root {
  --psm-cream: #f7f1e8;
  --psm-paper: #fffaf3;
  --psm-ink: #2c2416;
  --psm-ink-soft: #5c5144;
  --psm-line: #d9cbb8;
  --psm-accent: #b85c38;
  --psm-accent-dark: #8c3f24;
  --psm-gold: #b8892a;
  --psm-complete: #2f5d3a;
  --psm-shadow: 0 10px 30px rgba(44, 36, 22, 0.12);
  --psm-map-bg: #d9e3d2;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 820px;
  height: max(820px, calc(100vh - 40px));
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--psm-cream);
  color: var(--psm-ink);
  line-height: 1.45;
  font-family: "Source Sans 3", "Source Sans Pro", "Nunito Sans", "Open Sans", system-ui, sans-serif;
  text-align: left;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.psm-root *,
.psm-root *::before,
.psm-root *::after { box-sizing: border-box; }
.psm-root [hidden] { display: none !important; }
.psm-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

/* Beat Avada column constraints when the shortcode sits in a 1/1 container. */
.fusion-builder-row .psm-root,
.fusion-column .psm-root,
.awb-column .psm-root,
.fusion-text .psm-root,
.entry-content .psm-root {
  max-width: 100% !important;
  width: 100%;
}

.psm-header {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-end;
  padding: 0.4rem 1rem 0.35rem;
  align-items: center;
  border-bottom: 1px solid var(--psm-line);
  background: linear-gradient(180deg, #fbf6ee, var(--psm-cream));
  flex: 0 0 auto;
}
.psm-brand { max-width: 46rem; }
.psm-eyebrow {
  margin: 0;
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--psm-accent);
  font-weight: 400;
}
.psm-title {
  margin: 0.05rem 0 0.15rem;
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-weight: 650;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
  color: var(--psm-ink);
  line-height: 1.15;
}
.psm-lede { margin: 0; color: var(--psm-ink-soft); font-size: 0.95rem; max-width: 40rem; }

.psm-tools { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.psm-search input,
.psm-btn,
.psm-jumps button,
.psm-text-btn,
.psm-panel-close,
.psm-legend-item,
.psm-inset {
  font: inherit;
  color: var(--psm-ink);
  appearance: none;
  -webkit-appearance: none;
}
.psm-search input {
  width: min(22rem, 70vw);
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--psm-line);
  border-radius: 999px;
  background: var(--psm-paper);
  min-height: 44px;
  line-height: 1.2;
  box-shadow: none;
}
.psm-btn,
.psm-jumps button {
  background: var(--psm-paper);
  border: 1px solid var(--psm-line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}
.psm-btn:hover,
.psm-jumps button:hover {
  background: #f3e3d6;
  border-color: var(--psm-accent);
  color: var(--psm-ink);
}
.psm-text-btn {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--psm-accent-dark);
  font-weight: 600;
  text-decoration: underline;
  min-height: 44px;
  padding: 0 0.2rem;
  box-shadow: none;
}

.psm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  padding: 0.5rem 1.1rem;
  border-bottom: 1px solid var(--psm-line);
  background: #f3ece3;
  flex: 0 0 auto;
}
.psm-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  background: none;
  border-radius: 999px;
  padding: 0.25rem 0.55rem 0.25rem 0.3rem;
  cursor: pointer;
  min-height: 40px;
  text-align: left;
  box-shadow: none;
}
.psm-legend-item:hover,
.psm-legend-item[aria-current="true"] {
  border-color: var(--psm-ink);
  background: var(--psm-paper);
}
.psm-legend-swatch {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  border: 1px solid rgba(44,36,22,0.35);
  flex: 0 0 auto;
}
.psm-legend-item[data-status="complete"] .psm-legend-swatch {
  outline: 2px solid var(--psm-gold);
  outline-offset: 1px;
}
.psm-legend-text { display: flex; flex-direction: column; line-height: 1.15; }
.psm-legend-name { font-weight: 600; font-size: 0.82rem; }
.psm-legend-count { font-size: 0.72rem; color: var(--psm-ink-soft); }
.psm-legend-check { color: var(--psm-complete); font-weight: 700; margin-left: 0.15rem; }

.psm-status {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.35rem 1.1rem;
  background: #efe4d4;
  border-bottom: 1px solid var(--psm-line);
  font-size: 0.92rem;
  flex: 0 0 auto;
}
.psm-status p { margin: 0; }

.psm-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 360px;
  background: var(--psm-map-bg);
}
.psm-map {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  background: var(--psm-map-bg);
}

.psm-insets {
  position: absolute;
  right: 12px;
  bottom: 58px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.psm-inset {
  display: block;
  width: 170px;
  padding: 0;
  border: 1px solid #7a6a55;
  border-radius: 8px;
  overflow: hidden;
  background: var(--psm-paper);
  box-shadow: var(--psm-shadow);
  cursor: pointer;
  text-align: left;
  min-height: 0;
  line-height: 1.2;
}
.psm-inset-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem 0;
}
.psm-inset-map { height: 110px; width: 100%; pointer-events: none; }
#psm-inset-ak .psm-inset-map { height: 130px; }

.psm-jumps {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: calc(100% - 200px);
}
.psm-jumps button {
  min-height: 40px;
  font-size: 0.8rem;
  background: rgba(255,250,243,0.95);
}

.psm-search-results {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(32rem, calc(100% - 24px));
  max-height: 50%;
  overflow: auto;
  background: var(--psm-paper);
  border: 1px solid var(--psm-line);
  border-radius: 12px;
  box-shadow: var(--psm-shadow);
  z-index: 800;
}
.psm-search-results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--psm-line);
  background: none;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  color: inherit;
  border-radius: 0;
  box-shadow: none;
  text-transform: none;
}
.psm-search-results button:hover { background: #f3e3d6; }
.psm-muted { color: var(--psm-ink-soft); font-size: 0.85rem; }

.psm-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(26.5rem, 100%);
  background: var(--psm-paper);
  border-left: 1px solid var(--psm-line);
  box-shadow: var(--psm-shadow);
  z-index: 1100;
  overflow: auto;
  padding: 1rem 1.1rem 2rem;
  color: var(--psm-ink);
}
.psm-panel-handle { display: none; }
.psm-panel-close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--psm-cream);
  border: 1px solid var(--psm-line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  min-height: 40px;
  z-index: 2;
  box-shadow: none;
  text-transform: none;
}
.psm-panel-hero {
  width: calc(100% + 2.2rem);
  margin: -1rem -1.1rem 0.8rem;
  max-height: 180px;
  object-fit: cover;
  display: block;
  background: #e6d9c8;
}
.psm-panel-title {
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  margin: 0 0 0.15rem;
  line-height: 1.2;
  clear: both;
  color: var(--psm-ink);
  font-weight: 650;
}
.psm-panel-meta { margin: 0 0 0.6rem; color: var(--psm-ink-soft); font-size: 0.9rem; }
.psm-panel-desc { font-size: 0.95rem; margin: 0 0 0.6rem; }
.psm-panel a { color: var(--psm-accent-dark); }
.psm-completion {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f3ece3;
  font-weight: 600;
}
.psm-completion[data-status="complete"] { background: #e1efe4; color: var(--psm-complete); }
.psm-completion[data-status="partial"] { background: #f8ead3; }
.psm-progress-ring {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: conic-gradient(var(--psm-accent) calc(var(--pct) * 1%), #e5d8c8 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.psm-progress-ring span {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--psm-paper);
}

.psm-stamp-list { list-style: none; margin: 0; padding: 0; }
.psm-stamp-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.55rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--psm-line);
}
.psm-stamp-heading { font-size: 1.05rem; margin: 0.8rem 0 0.2rem; }
.psm-stamp-mark {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid var(--psm-ink);
  border-radius: 4px;
  background: var(--psm-paper);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}
.psm-stamp-mark.is-got { background: var(--psm-complete); border-color: var(--psm-complete); color: #fff; }
.psm-stamp-list button.psm-stamp-toggle {
  all: unset;
  cursor: pointer;
  display: block;
}
.psm-stamp-list button.psm-stamp-toggle:focus-visible .psm-stamp-mark {
  outline: 2px solid var(--psm-accent);
  outline-offset: 2px;
}
.psm-stamp-list h3 { margin: 0; font-size: 1rem; color: var(--psm-ink); font-weight: 650; }
.psm-stamp-list p { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--psm-ink-soft); }
.psm-badge {
  display: inline-block;
  margin: 0.15rem 0.25rem 0 0;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #efe4d4;
  color: var(--psm-ink);
}
.psm-badge.is-anniv { background: #f3d9c6; color: var(--psm-accent-dark); }
.psm-badge.is-new { background: #f1d2d0; }
.psm-badge.is-located { background: #dceadf; color: var(--psm-complete); }
.psm-badge.is-unlocated { background: #eee; color: #666; }

.psm-footer {
  padding: 0.7rem 1.1rem 0.9rem;
  color: var(--psm-ink-soft);
  font-size: 0.78rem;
  border-top: 1px solid var(--psm-line);
  flex: 0 0 auto;
  background: var(--psm-cream);
}
.psm-footer p { margin: 0.3rem 0; }

.psm-toast {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 1200;
  background: #6b2a1a;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  box-shadow: var(--psm-shadow);
  max-width: min(28rem, calc(100% - 2rem));
  font-weight: 600;
  font-size: 0.9rem;
}

.psm-root .leaflet-container { font: inherit; background: var(--psm-map-bg); }
.psm-root .leaflet-control-attribution { font-size: 9px; background: rgba(255,250,243,0.85) !important; }
.psm-park-marker,
.psm-station-marker {
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,0.35);
}
.psm-park-marker.is-none { background: #fff; }
.psm-park-marker.is-partial,
.psm-park-marker.is-complete { background: var(--fill, #b85c38); }
.psm-park-marker.is-complete::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='white' d='M2 6.5l2.5 2.5L10 3.5' stroke='white' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>") center/contain no-repeat;
}
.psm-station-marker { border: 2px solid #fff; }
.psm-station-marker.is-got { background: var(--psm-complete); }
.psm-station-marker.is-need { background: #fff; box-shadow: 0 0 0 2px var(--fill, #b85c38), 0 1px 4px rgba(0,0,0,0.35); }

@media (max-width: 800px) {
  .psm-root {
    min-height: 80vh;
    height: min(92vh, 900px);
  }
  .psm-header { flex-direction: column; align-items: stretch; gap: 0.55rem; padding: 0.7rem 0.75rem 0.55rem; }
  .psm-lede { display: none; }
  .psm-tools { width: 100%; }
  .psm-search, .psm-search input { width: 100%; }
  .psm-legend { gap: 0.2rem 0.35rem; padding: 0.3rem 0.75rem; }
  .psm-legend-item { padding: 0.15rem 0.35rem; min-height: 32px; }
  .psm-legend-name { font-size: 0.72rem; }
  .psm-legend-count { font-size: 0.62rem; }
  .psm-insets { display: none; }
  .psm-jumps { max-width: calc(100% - 16px); }
  .psm-stage { min-height: 280px; }
  .psm-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(72vh, 640px);
    border-left: 0;
    border-top: 1px solid var(--psm-line);
    border-radius: 18px 18px 0 0;
    z-index: 100050;
  }
  .psm-panel-handle {
    display: block;
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: #cbb9a3;
    margin: 0 auto 0.6rem;
  }
  .psm-panel-hero { border-radius: 0; }
  .psm-toast { position: fixed; z-index: 100060; }
}

@media (max-width: 420px) {
  .psm-header, .psm-legend, .psm-status, .psm-footer { padding-left: 0.75rem; padding-right: 0.75rem; }
  .psm-title { font-size: 1.4rem; }
}

/* v1.0.2: compact header, hide the theme's page title bar on the map page. */
.psm-root .psm-eyebrow,
.psm-root .psm-lede { display: none; }
.psm-root .psm-title { margin: 0; }
body.psm-has-map .avada-page-titlebar-wrapper,
body.psm-has-map .fusion-page-title-bar { display: none !important; }
/* v1.0.3: the site's header is transparent and floats over the top of the page.
   On the map page give it a solid band (the site's own sticky-header color) and
   let it take up space so the logo and menu sit above the map, not on it. */
body.psm-has-map .fusion-header-wrapper { position: relative !important; }
body.psm-has-map .fusion-header,
body.psm-has-map .fusion-secondary-main-menu { background-color: #6666a4 !important; }
body.psm-has-map #main { padding-top: 0 !important; }
.psm-wheel-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 800; pointer-events: none;
  background: rgba(44, 36, 22, 0.78); color: #fff;
  padding: 0.6rem 1rem; border-radius: 8px; font-size: 0.95rem;
}
