/*!
 * Atom centre locator — styles
 * Everything is scoped to .atom-locator and prefixed .al- so it won't clash with the host site.
 * Fonts: expects Comfortaa (700) and Montserrat (400–700) to be loaded by the site.
 */
.atom-locator {
  /* ---- Theme tokens (override on .atom-locator to customise) ---- */
  --al-green: #38D39B;
  --al-green-hover: #2fbf8a;
  --al-ink: #1E2025;
  --al-charcoal: #31343C;
  --al-grey: #626671;
  --al-light-grey: #BEC6CA;
  --al-line: #E5E7EB;
  --al-surface: #F6F7F8;
  --al-stage: #17191D;       /* map background */
  --al-land: #2A2D34;        /* UK land */
  --al-ireland: #1F2126;
  --al-font-heading: 'Comfortaa', sans-serif;
  --al-font-body: 'Montserrat', sans-serif;
  --al-radius: 15px;
  --al-shadow: 0 8px 40px rgba(0, 0, 0, .18);
  --al-ease: cubic-bezier(.2, .7, .2, 1);

  /* ---- Layout tokens ---- */
  --al-offset-top: 94px;     /* space for a fixed site header; set 24px if there isn't one */
  --al-max-width: 1440px;    /* matches the site nav */
  --al-gutter: 48px;
  --al-panel-w: 390px;
  --al-intro-w: 280px;
  --al-height: 100vh;
  --al-height: 100dvh;
  --al-min-height: 680px;
  --al-sticky-top: 66px;     /* mobile: sticky list labels sit under the fixed header */

  box-sizing: border-box;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--al-panel-w);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 40px;
  height: var(--al-height);
  min-height: var(--al-min-height);
  padding: var(--al-offset-top) max(var(--al-gutter), calc((100% - var(--al-max-width)) / 2)) 24px;
  background: var(--al-stage);
  color: #fff;
  font-family: var(--al-font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Base resets use :where() so they have zero specificity and never override component classes */
:where(.atom-locator) :where(*, *::before, *::after) { box-sizing: border-box; }
:where(.atom-locator) :where(svg) { display: block; }
:where(.atom-locator) :where(button) { font: inherit; color: inherit; }
:where(.atom-locator) :where(h2, h3) { margin: 0; }
.atom-locator :focus-visible { outline: 2px solid var(--al-green); outline-offset: 2px; }
.al-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.al-on-touch { display: none; }
@media (hover: none) { .al-on-hover { display: none; } .al-on-touch { display: inline; } }

/* ---------- Optional intro (host markup: <div class="al-intro">…</div>) ---------- */
.al-intro { grid-column: 1; grid-row: 1; padding: 18px 0 8px; max-width: 520px; z-index: 2; }
.al-intro .al-eyebrow {
  margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--al-green);
}
.al-intro h1 { margin: 0; font-family: var(--al-font-heading); font-weight: 700; color: #fff; font-size: 40px; line-height: 1.15; letter-spacing: .01em; }
.al-intro .al-lede { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .68); max-width: 360px; }

/* ---------- Map ---------- */
.al-stage { grid-column: 1; grid-row: 2; position: relative; display: flex; flex-direction: column; min-height: 0; }
.al-fit { flex: 1; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; }
.al-map {
  position: relative;
  width: min(100cqw, 100cqh * 660 / 1012);
  aspect-ratio: 660 / 1012;
  /* the outline includes Ireland on the left: nudge so Great Britain itself is centred */
  translate: -4% 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.al-svg { width: 100%; height: 100%; overflow: visible; }
.al-ireland { fill: var(--al-ireland); }
.al-land { fill: var(--al-land); }
.al-coast { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: .7; stroke-linejoin: round; pointer-events: none; }

.al-layer { mix-blend-mode: screen; transition: opacity .3s; }
.al-layer.is-off { opacity: 0; }
.al-zone { opacity: var(--al-layer-opacity); transition: opacity .25s var(--al-ease); }
.al-svg.has-focus .al-zone { opacity: calc(var(--al-layer-opacity) * .35); }
.al-svg.has-focus .al-zone.is-focus { opacity: 1; }
.al-zone-edge { fill: none; stroke-width: 1.1; opacity: .55; transition: opacity .25s, stroke-width .25s; }
.al-zone.is-focus .al-zone-edge { opacity: 1; stroke-width: 1.6; }

/* Pins */
.al-pins { position: absolute; inset: 0; pointer-events: none; }
.al-pin {
  position: absolute; width: 28px; height: 28px; margin: 0; padding: 0;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
  pointer-events: auto;
}
.al-pin[hidden] { display: none; }
.al-pin-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--al-pin);
  box-shadow: 0 0 0 2px var(--al-stage);
  transition: transform .2s var(--al-ease), box-shadow .2s, opacity .2s;
}
.al-map.has-focus .al-pin:not(.is-hot) .al-pin-dot { opacity: .5; }
.al-pin:hover .al-pin-dot, .al-pin:focus-visible .al-pin-dot, .al-pin.is-hot .al-pin-dot {
  transform: scale(1.45); opacity: 1; box-shadow: 0 0 0 2px #fff;
}
.al-pin.is-open .al-pin-dot {
  transform: scale(1.45); opacity: 1;
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px color-mix(in srgb, var(--al-pin) 35%, transparent);
}
.atom-locator .al-pin:focus-visible { outline: none; }
.al-pin.is-hot, .al-pin.is-open { z-index: 2; }

.al-user-pin {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff; box-shadow: 0 0 0 3px var(--al-stage); z-index: 3;
}
.al-user-pin::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid #fff; animation: al-pulse 2s var(--al-ease) infinite;
}
.al-user-pin[hidden] { display: none; }
@keyframes al-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }

/* Tooltip */
.al-tooltip {
  position: absolute; z-index: 5;
  min-width: 190px; max-width: 260px; padding: 10px;
  background: #fff; color: var(--al-charcoal); border-radius: 10px;
  box-shadow: var(--al-shadow);
  transform: translateY(calc(-100% - 14px));
  pointer-events: none;
}
.al-tooltip.is-below { transform: translateY(18px); }
.al-tooltip.is-sticky { pointer-events: auto; }
.al-tooltip[hidden] { display: none; }
.al-tt-title { margin: 0 2px 6px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--al-grey); }
.al-tt-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 6px 4px; border: 0; border-radius: 6px; background: none; text-align: left; }
button.al-tt-row { cursor: pointer; padding: 8px 6px; }
button.al-tt-row:hover { background: var(--al-surface); }
button.al-tt-row::after { content: "›"; margin-left: auto; align-self: center; font-size: 18px; color: var(--al-grey); }
.al-tt-dot { flex: none; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; background: var(--al-dot); }
.al-tt-row strong { display: block; font-size: 13px; font-weight: 700; color: var(--al-ink); }
.al-tt-row small { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--al-grey); }

/* Map key */
.al-key {
  position: relative; align-self: center;
  width: max-content; max-width: 100%; margin: 12px 0 0; padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px;
  background: rgba(255, 255, 255, .03);
}
.al-key[hidden] { display: none; }
.al-key-title { margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.al-key-items { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; padding: 0; }
.al-key-item { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .88); }
/* Swatch drawn like the map: soft coverage area with a pin in the middle */
.al-key-swatch {
  position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle closest-side,
    color-mix(in srgb, var(--al-key) 70%, transparent) 0%,
    color-mix(in srgb, var(--al-key) 38%, transparent) 60%,
    color-mix(in srgb, var(--al-key) 14%, transparent) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--al-key) 45%, transparent);
}
.al-key-swatch::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--al-key); box-shadow: 0 0 0 1.5px var(--al-stage);
}
.al-key-note {
  margin: 12px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, .55);
}

/* ---------- Floating panel ---------- */
.al-panel {
  grid-column: -2; grid-row: 1 / span 2;
  display: flex; flex-direction: column; min-height: 0;
  background: #fff; color: var(--al-charcoal);
  border-radius: var(--al-radius); box-shadow: var(--al-shadow);
  overflow: hidden; z-index: 3;
}
.al-panel-head { padding: 18px 16px 14px; border-bottom: 1px solid var(--al-line); }
.al-panel-title { font-family: var(--al-font-heading); font-weight: 700; font-size: 18px; text-align: center; color: var(--al-ink); }
.al-panel-sub { margin: 4px 0 14px; font-size: 12px; font-weight: 500; text-align: center; color: var(--al-grey); }

.al-search { position: relative; display: flex; align-items: center; margin: 0; }
.al-search input {
  width: 100%; height: 44px; margin: 0; padding: 0 48px 0 40px;
  border: 1px solid var(--al-line); border-radius: 9999px; background: var(--al-surface);
  font: 500 14px var(--al-font-body); color: var(--al-ink);
  transition: border-color .2s, background-color .2s;
}
.al-search input::placeholder { color: #8A8F99; }
.al-search input:focus { outline: none; border-color: var(--al-green); background: #fff; }
.al-search-icon { position: absolute; left: 14px; width: 17px; height: 17px; pointer-events: none; }
.al-search-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--al-grey); stroke-width: 2; stroke-linecap: round; }
.al-locate {
  position: absolute; right: 4px; width: 36px; height: 36px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; color: var(--al-grey);
  transition: background-color .2s, color .2s;
}
.al-locate:hover { background: #fff; color: var(--al-green); }
.al-locate svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.al-search.is-busy .al-search-icon { animation: al-spin 1s linear infinite; }
@keyframes al-spin { to { transform: rotate(360deg); } }
.al-status { margin: 0; font-size: 12px; font-weight: 500; color: var(--al-grey); }
.al-status:not(:empty) { margin-top: 8px; padding: 0 4px; }
.al-status.is-error { color: #C0392B; }

.al-coverage { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.al-coverage[hidden] { display: none; }
.al-coverage-row {
  display: grid; grid-template-columns: 10px 1fr auto; grid-template-rows: auto auto;
  column-gap: 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--al-line); border-radius: 8px;
  background: #fff; text-align: left; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.al-coverage-row:hover { border-color: var(--al-dot); background: color-mix(in srgb, var(--al-dot) 6%, #fff); }
.al-coverage-dot { grid-row: 1 / span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--al-dot); }
.al-coverage-type { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--al-grey); }
.al-coverage-name { grid-column: 2; font-size: 13px; font-weight: 700; color: var(--al-ink); }
.al-coverage-dist { grid-column: 3; grid-row: 1 / span 2; font-size: 12px; font-weight: 600; color: var(--al-grey); }
.al-coverage-row.is-outside .al-coverage-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--al-dot); }

.al-filters { display: flex; gap: 6px; margin-top: 12px; }
.al-chip {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 8px;
  border: 1px solid var(--al-line); border-radius: 9999px; background: #fff; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--al-ink);
  transition: border-color .2s, background-color .2s, color .2s;
}
.atom-locator .al-chip { color: var(--al-ink); }
.al-chip:hover { border-color: var(--al-chip); }
.al-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--al-chip); transition: background-color .2s, box-shadow .2s; }
.al-chip-count { font-size: 11px; font-weight: 600; color: var(--al-grey); }
.al-chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--al-chip) 60%, #fff); background: color-mix(in srgb, var(--al-chip) 8%, #fff); }
.atom-locator .al-chip[aria-pressed="false"] { color: #9AA0A9; }
.al-chip[aria-pressed="false"] .al-chip-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--al-chip); }

/* List + accordions */
.al-list {
  position: relative; flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0 15px 12px;
  scrollbar-width: thin; scrollbar-color: var(--al-light-grey) transparent;
}
.al-list-message { margin: 0; padding: 24px 4px; font-size: 13px; font-weight: 500; text-align: center; color: var(--al-grey); }
.al-list-message.is-error { color: #C0392B; }
.al-group[hidden] { display: none; }
.al-group-label {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 14px 2px 8px; background: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--al-grey);
}
.al-group-label span:last-child { margin-left: auto; letter-spacing: 0; }
.al-group-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--al-dot); }
.al-items { display: flex; flex-direction: column; gap: 8px; }

.al-item { border: 1px solid var(--al-line); border-radius: 8px; background: #fff; transition: border-color .2s, background-color .2s; }
.al-item.is-hot, .al-item:hover { border-color: color-mix(in srgb, var(--al-item) 70%, #fff); }
.al-item.is-hot { background: color-mix(in srgb, var(--al-item) 7%, #fff); }
.al-item.is-open { border-color: var(--al-item); background: #fff; }
.al-item-heading { margin: 0; font: inherit; }
.al-trigger { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.atom-locator .al-trigger:focus-visible { outline-offset: -2px; border-radius: 8px; }
.al-item-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--al-item); }
.al-item-text { flex: 1; min-width: 0; }
.al-item-name { display: block; font-size: 14px; font-weight: 700; color: var(--al-ink); }
.al-item-meta { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--al-grey); }
.al-badge {
  flex: none; padding: 3px 8px; border-radius: 9999px;
  background: color-mix(in srgb, var(--al-item) 16%, #fff);
  font-size: 10px; font-weight: 700; color: var(--al-ink); white-space: nowrap;
}
.al-badge[hidden] { display: none; }
.al-chevron { flex: none; width: 18px; height: 18px; color: var(--al-grey); transition: transform .3s var(--al-ease); }
.al-chevron svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.al-item.is-open .al-chevron { transform: rotate(180deg); }

.al-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .3s var(--al-ease), visibility 0s .3s; }
.al-item.is-open .al-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .3s var(--al-ease); }
.al-body-inner { overflow: hidden; min-height: 0; }
.al-item-type {
  margin: 0 12px 10px 32px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--al-item) 70%, #000);
}
.al-details { list-style: none; margin: 0; padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.al-details li { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--al-charcoal); }
.al-details svg { flex: none; width: 16px; height: 16px; margin: 1px 0 0 -3px; fill: none; stroke: var(--al-grey); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.al-details a { color: inherit; text-decoration: none; font-weight: 600; word-break: break-word; }
.al-details a:hover { color: var(--al-green); }
.al-hours { border-collapse: collapse; font-size: 12px; }
.al-hours th { padding: 0 14px 3px 0; text-align: left; font-weight: 500; color: var(--al-grey); white-space: nowrap; }
.al-hours td { padding: 0 0 3px; font-weight: 600; }
.al-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 12px 0 32px; padding: 0; }
.al-tags li { padding: 4px 10px; border-radius: 9999px; background: var(--al-surface); font-size: 11px; font-weight: 600; color: var(--al-charcoal); }
.al-actions { display: flex; gap: 8px; padding: 14px 12px 12px; }
.al-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 9999px;
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.al-btn--primary { flex: 1; background: var(--al-green); color: #fff; }
.al-btn--primary:hover { background: var(--al-green-hover); color: #fff; }
.al-btn--ghost { border: 1px solid var(--al-line); color: var(--al-ink); }
.al-btn--ghost:hover { border-color: var(--al-green); color: var(--al-green); }
.al-back { display: none; }

.al-panel-foot { padding: 12px 15px 15px; border-top: 1px solid var(--al-line); }
.al-cta {
  display: flex; align-items: center; justify-content: center; height: 46px;
  border-radius: 9999px; background: var(--al-green); color: #fff;
  font-size: 14px; font-weight: 700; text-decoration: none; transition: background-color .2s;
}
.al-cta:hover { background: var(--al-green-hover); color: #fff; }

/* ---------- Responsive ---------- */
@media (min-width: 900px) and (max-height: 820px) {
  .al-panel-sub { display: none; }
  .al-panel-title { margin-bottom: 12px; }
}
@media (max-width: 1359px), (max-height: 820px) {
  .al-intro .al-lede { display: none; }
}
@media (max-width: 1100px) and (min-width: 900px) {
  .atom-locator { --al-panel-w: 350px; column-gap: 24px; }
  .al-intro h1 { font-size: 32px; }
}

/* Wide: three columns — intro | map (centred) | panel */
@media (min-width: 1200px) {
  .atom-locator { grid-template-columns: var(--al-intro-w) minmax(0, 1fr) var(--al-panel-w); }
  .al-intro { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 36px; }
  .al-intro h1 { font-size: 36px; }
  .al-stage { grid-column: 2; grid-row: 1 / span 2; }
  /* key sits under the intro, in the left column */
  .al-key { position: absolute; bottom: 0; left: calc(-1 * (var(--al-intro-w) + 40px)); max-width: var(--al-intro-w); margin: 0; }
  /* narrower left column: list the types vertically rather than letting them wrap */
  .al-key-items { flex-direction: column; gap: 10px; }
}
@media (min-width: 1360px) {
  .atom-locator { --al-intro-w: 340px; }
  .al-key-items { flex-direction: row; gap: 10px 20px; }
  .al-intro h1 { font-size: 42px; }
}
/* No intro supplied: map takes the left space */
.atom-locator:not(:has(> .al-intro)) { grid-template-columns: minmax(0, 1fr) var(--al-panel-w); }
.atom-locator:not(:has(> .al-intro)) .al-stage { grid-column: 1; grid-row: 1 / span 2; }
.atom-locator:not(:has(> .al-intro)) .al-key { position: relative; left: auto; bottom: auto; max-width: 100%; margin-top: 12px; }

/* Mobile: stacked — search, map, list */
@media (max-width: 899px) {
  .atom-locator {
    --al-gutter: 16px;
    display: flex; flex-direction: column; gap: 12px;
    height: auto; min-height: 0;
    padding: calc(var(--al-offset-top) - 4px) var(--al-gutter) 32px;
    overflow: visible;
  }
  .al-panel { display: contents; }
  .al-intro { order: 1; padding: 8px 4px 4px; }
  .al-intro h1 { font-size: 30px; }
  .al-intro .al-lede { display: block; font-size: 14px; margin-top: 8px; }
  .al-panel-head { order: 2; background: #fff; border-radius: var(--al-radius); border-bottom: 0; }
  .al-panel-sub { display: none; }
  .al-panel-title { margin-bottom: 12px; }
  .al-stage { order: 3; display: block; padding: 4px 0 0; }
  .al-fit { container-type: normal; display: block; }
  .al-map { width: min(100%, 64vh * 660 / 1012); margin: 0 auto; }
  .al-key { position: static; width: 100%; margin: 12px 0 0; }
  .al-key-items { justify-content: space-between; }
  .al-list { order: 4; overflow: visible; padding: 0 12px 12px; background: #fff; border-radius: var(--al-radius); }
  .al-group-label { top: var(--al-sticky-top); }
  .al-panel-foot { order: 5; border-top: 0; padding: 0; }
  .al-pin { width: 32px; height: 32px; }
  .al-tooltip { min-width: 200px; }
  .al-back {
    display: block; width: calc(100% - 24px); margin: 0 12px 12px; padding: 10px;
    border: 0; border-radius: 8px; background: var(--al-surface); cursor: pointer;
    font-size: 12px; font-weight: 700; color: var(--al-charcoal);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atom-locator *, .atom-locator *::before, .atom-locator *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
