/* ==========================================================================
   Rata — Dealer locator
   rvs_dealer_locator
   --------------------------------------------------------------------------
   Every selector is anchored to [data-rvs="dealer-locator"]. A bare [data-rvs]
   matches every other module in the family.

   No colours, type sizes or spacing are declared here — only tokens from
   rvs-tokens.css. The one local custom property is the map height, which is
   per-instance and arrives inline on the module root.

   The display face appears nowhere in this sheet. Eyebrows and section
   headings carry .rvs__label / .rvs-heading-style--* from the token layer;
   everything else is the body face via .rvs__body, .rvs__heading-s and
   .rvs__label-s. Owners Wide is only in the kit as Black, so at chip and
   caption size it reads as stretched rather than as emphasis.

   Breakpoints match the family: 1000px tablet, 640px mobile.

   BUILD 57 (York, 1 Oct)
   - Cards list (data-list="cards", default): each dealer its own box, no grey
     rules around or between them. "Ruled" keeps the original look.
   - Full width + data-align="page": the list text lines up with the page
     margin on desktop. Lives in a min-width media query on purpose, so no
     attribute-heavy desktop rule can outrank the tablet/mobile overrides —
     the recurring stacking bug in this family.
   - Chips and tags: cream fill, pill corners, sentence case, no outline.
   - Small details in Roboto Mono via .rvs-dl__mono.
   - The form wrapper carries POWER's form classes; nothing here restyles
     .hs-input or .hs-button any more.

   BUILD 71 (York, 28 Oct)
   - No grey line on the search field, the region select or the NZ/AU
     toggle; the toggle reads "New Zealand" / "Australia", not capitals.
   - The open region list is the browser's own; where the browser supports
     a styled select (appearance: base-select) it loses the outline and the
     blue highlight and highlights red. Elsewhere it stays native.
   - Stockist chips sit on their own line under "Accredited agents for",
     with more room above them, and go red on hover; the note is mono.
   - Cards: ranges as one line with dividers under a rule; buttons are
     Roboto Mono pills like the product page spec chips, in red.
   - "Show more dealers" in the body face (Aktiv).

   BUILD 72.3 (York, 28 Oct)
   - Search as the support search bar without its border: white pill,
     magnifier, red Search pill inset. Region select rounded to match.
   ========================================================================== */

[data-rvs="dealer-locator"] {
  display: block;
  position: relative;
  background: var(--rvs-bg);
  color: var(--rvs-text);

  /* Chips sit on the page background, tags sit on a card, so each gets its
     own fill — on the Cream scheme the page IS cream and a cream chip would
     vanish. Dark schemes fall back to the scheme's own surface. */
  --rvs-dl-chip-bg:    var(--rvs-cream);
  --rvs-dl-chip-hover: var(--rvs-red);        /* build 71: red, not clay */
  --rvs-dl-chip-hover-fg: var(--rvs-white);
  --rvs-dl-tag-bg:     var(--rvs-cream);
  --rvs-dl-chip-fg:    var(--rvs-charcoal);
}

[data-rvs="dealer-locator"][data-scheme="cream-deep"] {
  --rvs-dl-chip-bg: var(--rvs-light-cream);
}

[data-rvs="dealer-locator"][data-scheme="olive"],
[data-rvs="dealer-locator"][data-scheme="charcoal"],
[data-rvs="dealer-locator"][data-scheme="red"] {
  --rvs-dl-chip-bg:    var(--rvs-surface);
  --rvs-dl-chip-hover: rgba(248, 247, 242, .22);
  --rvs-dl-tag-bg:     rgba(248, 247, 242, .14);
  --rvs-dl-chip-fg:    var(--rvs-text);
}

/* The list measures the module's own width for page-margin alignment.
   cqw where supported (correct inside a contained DnD section too), 100vw
   otherwise, which is off by half a scrollbar at worst. */
[data-rvs="dealer-locator"] .rvs-dl__body { --rvs-dl-vw: 100vw; }
@supports (width: 1cqw) {
  [data-rvs="dealer-locator"].rvs-dl { container-type: inline-size; }
  [data-rvs="dealer-locator"] .rvs-dl__body { --rvs-dl-vw: 100cqw; }
}

[data-rvs="dealer-locator"][data-pad="none"]     { --rvs-dl-space: 0; }
[data-rvs="dealer-locator"][data-pad="tight"]    { --rvs-dl-space: var(--rvs-band-pad-tight); }
[data-rvs="dealer-locator"][data-pad="standard"] { --rvs-dl-space: var(--rvs-band-pad); }

[data-rvs="dealer-locator"] .rvs-dl__inner {
  padding-block: var(--rvs-dl-space, var(--rvs-band-pad)) var(--rvs-gap-lg);
}

/* --------------------------------------------------------------------------
   Type assertions

   These restate what .rvs__heading-s and .rvs__label-s already say in
   rvs-tokens.css. They are here because an older foundation is easy to leave
   on the theme — the token layer only moved labels and small headings onto the
   body face recently, and against an earlier rvs-tokens.css every one of these
   renders in Owners Wide. Owners Wide exists only as Black (800), so at chip
   and caption size it sets as a wide slab.

   Still token-driven: the family name is never named here. Redundant against a
   current foundation, and harmless.
   -------------------------------------------------------------------------- */

[data-rvs="dealer-locator"] .rvs-dl__dealer h3,
[data-rvs="dealer-locator"] .rvs-dl__seg button,
[data-rvs="dealer-locator"] .rvs-dl__region,
[data-rvs="dealer-locator"] .rvs-dl__fallback h4,
[data-rvs="dealer-locator"] .rvs-dl__empty h4 {
  font-family: var(--rvs-font-body);
}

/* Mono role — York, 1 Oct: the "little details" are Roboto Mono in Scott's
   designs. Same values as .rvs-pd__mono in rvs-product.css, which isn't
   loaded on this page. Uppercase by default; chips, tags and the toggle
   switch to sentence case below. */
[data-rvs="dealer-locator"] .rvs-dl__mono {
  font-family: var(--rvs-font-mono);
  font-weight: 400;
  font-size: var(--rvs-label-s);
  line-height: 1.6;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rvs-text);
  margin: 0;
}

[data-rvs="dealer-locator"] .rvs-dl__sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__header {
  display: flex;
  flex-direction: column;
  gap: var(--rvs-gap-sm);
  margin-bottom: var(--rvs-gap-lg);
}

[data-rvs="dealer-locator"] .rvs-dl__blurb p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Search
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__search {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: var(--rvs-gap-sm);
  align-items: center;
}

/* Build 72.3 (York): the support search bar's look without its border —
   white pill, magnifier mask on the left, red pill Search button inset on
   the right. Same treatment as the parts search. */
[data-rvs="dealer-locator"] {
  --rvs-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6'/%3E%3C/svg%3E");
}
[data-rvs="dealer-locator"] .rvs-dl__q {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 5px;
  border-radius: var(--rvs-radius-pill);
  background: var(--rvs-surface);
  transition: box-shadow var(--rvs-transition);
}
[data-rvs="dealer-locator"] .rvs-dl__q::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  background-color: var(--rvs-text);
  opacity: .6;
  -webkit-mask: var(--rvs-icon-search) center / contain no-repeat;
  mask: var(--rvs-icon-search) center / contain no-repeat;
}
[data-rvs="dealer-locator"] .rvs-dl__q:focus-within { box-shadow: 0 0 0 1px var(--rvs-red); }

/* POWER styles every input[type=search] as an underlined line; reset. */
[data-rvs="dealer-locator"] .rvs-dl__q .rvs-dl__q-input,
[data-rvs="dealer-locator"] .rvs-dl__q .rvs-dl__q-input:focus {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  color: var(--rvs-text);
  font-family: var(--rvs-font-body);
  font-size: var(--rvs-body);
  line-height: 1.3;
}

[data-rvs="dealer-locator"] .rvs-dl__q-btn {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 24px;
  border: 0;
  border-radius: var(--rvs-radius-pill);
  background: var(--rvs-btn-bg);
  color: var(--rvs-btn-fg);
  font-family: var(--rvs-font-body);
  font-weight: var(--rvs-bold-weight);
  font-size: .9375rem;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--rvs-transition), color var(--rvs-transition);
}
[data-rvs="dealer-locator"] .rvs-dl__q-btn:hover,
[data-rvs="dealer-locator"] .rvs-dl__q-btn:focus-visible {
  background: var(--rvs-btn-bg-hover);
  color: var(--rvs-btn-fg-hover);
}
[data-rvs="dealer-locator"] .rvs-dl__q-btn:focus-visible { outline: 2px solid var(--rvs-red); outline-offset: 2px; }

/* Build 71: no outline (York). The white field on the band is the edge;
   focus shows as a thin red line instead of the browser's blue ring.
   Build 72.3: rounded to a pill so the region select sits with the search
   and the toggle. */
[data-rvs="dealer-locator"] .rvs-dl__field {
  width: 100%;
  font-family: var(--rvs-font-body);
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: var(--rvs-radius-pill);
  background: var(--rvs-surface);
  color: var(--rvs-text);
  box-shadow: none;
  outline: 0;
  transition: border-color var(--rvs-transition);
}
[data-rvs="dealer-locator"] .rvs-dl__field:hover,
[data-rvs="dealer-locator"] .rvs-dl__field:focus,
[data-rvs="dealer-locator"] .rvs-dl__field:focus-visible { border-color: var(--rvs-red); outline: 0; box-shadow: none; }

/* The open region list. Chrome / Edge with customisable select: no outline,
   no blue, red highlight. Other browsers keep their native list. */
@supports (appearance: base-select) {
  [data-rvs="dealer-locator"] select.rvs-dl__field,
  [data-rvs="dealer-locator"] select.rvs-dl__field::picker(select) { appearance: base-select; }

  [data-rvs="dealer-locator"] select.rvs-dl__field {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  [data-rvs="dealer-locator"] select.rvs-dl__field::picker-icon { color: var(--rvs-text); }
  [data-rvs="dealer-locator"] select.rvs-dl__field::picker(select) {
    margin-top: 6px;
    padding: 6px 0;
    border: 0;
    border-radius: var(--rvs-radius);
    background: var(--rvs-white);
    box-shadow: 0 8px 28px rgba(34, 34, 34, .16);
  }
  [data-rvs="dealer-locator"] select.rvs-dl__field option {
    padding: 9px 16px;
    font-family: var(--rvs-font-body);
    font-size: var(--rvs-body);
    color: var(--rvs-charcoal);
    background: transparent;
    outline: 0;
  }
  [data-rvs="dealer-locator"] select.rvs-dl__field option::checkmark { display: none; }
  [data-rvs="dealer-locator"] select.rvs-dl__field option:checked { font-weight: var(--rvs-bold-weight); }
  [data-rvs="dealer-locator"] select.rvs-dl__field option:hover,
  [data-rvs="dealer-locator"] select.rvs-dl__field option:focus,
  [data-rvs="dealer-locator"] select.rvs-dl__field option:focus-visible {
    background: var(--rvs-red);
    color: var(--rvs-white);
  }
}

/* Build 71: no outline, sentence case ("New Zealand", not capitals). */
[data-rvs="dealer-locator"] .rvs-dl__seg {
  display: inline-flex;
  border: 0;
  border-radius: var(--rvs-radius-pill);
  overflow: hidden;
  background: var(--rvs-surface);
}

[data-rvs="dealer-locator"] .rvs-dl__seg button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--rvs-radius-pill);
  background: transparent;
  color: var(--rvs-text);
  font-family: var(--rvs-font-body);
  font-weight: var(--rvs-bold-weight);
  font-size: .9375rem;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--rvs-transition), color var(--rvs-transition);
}
[data-rvs="dealer-locator"] .rvs-dl__seg button:not(.is-on):hover { color: var(--rvs-red); }

[data-rvs="dealer-locator"] .rvs-dl__seg button.is-on {
  background: var(--rvs-btn-bg);
  color: var(--rvs-btn-fg);
}

[data-rvs="dealer-locator"] .rvs-dl__geo { margin: var(--rvs-gap-sm) 0 0; }

/* The geolocation trigger is a button, not a link, so the arrow the shared
   .rvs__link appends would point at nothing. */
[data-rvs="dealer-locator"] .rvs-dl__geo-btn {
  border: 0;
  background: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
[data-rvs="dealer-locator"] .rvs-dl__geo-btn::after { content: none; }

/* ==========================================================================
   Stockist filter
   ========================================================================== */

/* Build 71: more room above, so the search block and the stockist block
   read as two areas (York); the label on its own line, chips under it. */
[data-rvs="dealer-locator"] .rvs-dl__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: var(--rvs-gap-lg);
}

[data-rvs="dealer-locator"] .rvs-dl__filters-label { flex: 0 0 100%; margin: 0 0 4px; }

/* Full button reset — POWER's button chrome isn't visible in DevTools
   without user-agent styles on. */
[data-rvs="dealer-locator"] .rvs-dl__chip {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--rvs-radius-pill);
  background: var(--rvs-dl-chip-bg);
  color: var(--rvs-dl-chip-fg);
  font-size: .8125rem;
  letter-spacing: .01em;
  text-transform: none;
  line-height: 1.4;
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--rvs-transition), color var(--rvs-transition);
}

[data-rvs="dealer-locator"] .rvs-dl__chip:hover {
  background: var(--rvs-dl-chip-hover);
  color: var(--rvs-dl-chip-hover-fg, var(--rvs-dl-chip-fg));
}

[data-rvs="dealer-locator"] .rvs-dl__chip.is-on,
[data-rvs="dealer-locator"] .rvs-dl__chip.is-on:hover {
  background: var(--rvs-btn-bg);
  color: var(--rvs-btn-fg);
}

[data-rvs="dealer-locator"] .rvs-dl__chip:focus-visible { outline: 2px solid var(--rvs-red); outline-offset: 2px; }

[data-rvs="dealer-locator"] .rvs-dl__chip b { font-weight: inherit; margin-left: 8px; }

/* Build 67 (York): more room under the chips, one line, and smaller than
   body so it doesn't outweigh the mono label above. p. adds the element so
   this outranks the shared .rvs__body size whatever the load order. */
[data-rvs="dealer-locator"] p.rvs-dl__note {
  margin-top: 20px;
  max-width: none;
  font-size: .875rem;
  line-height: 1.5;
}
/* Build 71: Roboto Mono (York), sentence case like the chips. */
[data-rvs="dealer-locator"] p.rvs-dl__note.rvs__body {
  font-family: var(--rvs-font-mono);
  font-size: .8125rem;
  letter-spacing: .01em;
  line-height: 1.6;
}

/* ==========================================================================
   Notice — region dropped because nothing in it stocks the filtered range
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__notice {
  margin-top: var(--rvs-gap-md);
  padding: var(--rvs-gap-sm) var(--rvs-gap-md);
  background: var(--rvs-surface);
  border-left: 3px solid var(--rvs-red);
}

[data-rvs="dealer-locator"] .rvs-dl__notice p { margin: 0; }

/* ==========================================================================
   List and map
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__body {
  --rvs-dl-list-w: 372px;              /* text width inside the list */
  --rvs-dl-pad-l: var(--rvs-gap-md);
  --rvs-dl-pad-r: var(--rvs-gap-md);
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  border-block: 1px solid var(--rvs-rule);
  scroll-margin-top: 120px;            /* clears the floating header */
}

[data-rvs="dealer-locator"][data-width="contained"] .rvs-dl__body {
  max-width: var(--rvs-container);
  margin-inline: auto;
  border: 1px solid var(--rvs-rule);
}

[data-rvs="dealer-locator"] .rvs-dl__body--nomap { grid-template-columns: 1fr; }

[data-rvs="dealer-locator"] .rvs-dl__list {
  max-height: var(--rvs-dl-map-h, 720px);
  overflow-y: auto;
  border-right: 1px solid var(--rvs-rule);
  background: var(--rvs-surface);
}

[data-rvs="dealer-locator"] .rvs-dl__body--nomap .rvs-dl__list {
  max-height: none;
  border-right: 0;
}

[data-rvs="dealer-locator"] .rvs-dl__count {
  padding: var(--rvs-gap-sm) var(--rvs-dl-pad-r) var(--rvs-gap-sm) var(--rvs-dl-pad-l);
  border-bottom: 1px solid var(--rvs-rule);
  background: var(--rvs-bg);
  position: sticky;
  top: 0;
  z-index: 2;
}

[data-rvs="dealer-locator"] .rvs-dl__dealer {
  position: relative;
  padding: 20px var(--rvs-dl-pad-r) 18px var(--rvs-dl-pad-l);
  border-bottom: 1px solid var(--rvs-rule);
  cursor: pointer;
  transition: background-color var(--rvs-transition);
}

[data-rvs="dealer-locator"] .rvs-dl__dealer:hover { background: var(--rvs-bg); }
[data-rvs="dealer-locator"] .rvs-dl__dealer.is-open {
  background: var(--rvs-bg);
  box-shadow: inset 3px 0 0 var(--rvs-red);
}

/* Spillover rows — outside the region but close to it. */
[data-rvs="dealer-locator"] .rvs-dl__dealer.is-out { opacity: .82; }

[data-rvs="dealer-locator"] .rvs-dl__dealer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--rvs-gap-sm);
  align-items: flex-start;
}

[data-rvs="dealer-locator"] .rvs-dl__place { margin-top: 4px; }

[data-rvs="dealer-locator"] .rvs-dl__dist {
  white-space: nowrap;
  padding-top: 4px;
}

/* Build 71 (York's sketch): the ranges as one line, divided, under a rule —
   replaces the row of cream tags. */
[data-rvs="dealer-locator"] p.rvs-dl__ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rvs-rule);
  font-size: .8125rem;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--rvs-text);
}
[data-rvs="dealer-locator"] .rvs-dl__ranges span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin: 0 12px;
  vertical-align: -.2em;
  background: var(--rvs-text);
  opacity: .35;
}

/* "More info" — York couldn't tell a card opened. A real button, so it
   works from the keyboard and announces its state. */
[data-rvs="dealer-locator"] .rvs-dl__toggle {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--rvs-link);
  font-size: .8125rem;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}

[data-rvs="dealer-locator"] .rvs-dl__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--rvs-transition);
}

[data-rvs="dealer-locator"] .rvs-dl__dealer.is-open .rvs-dl__toggle::after { transform: translateY(2px) rotate(-135deg); }
[data-rvs="dealer-locator"] .rvs-dl__dealer:hover .rvs-dl__toggle,
[data-rvs="dealer-locator"] .rvs-dl__toggle:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Detail opens on select. A max-height keeps it animatable without JS
   measuring; the value clears the longest card. */
[data-rvs="dealer-locator"] .rvs-dl__detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--rvs-transition), margin-top var(--rvs-transition);
}

[data-rvs="dealer-locator"] .rvs-dl__dealer.is-open .rvs-dl__detail {
  max-height: 280px;
  margin-top: var(--rvs-gap-sm);
}

[data-rvs="dealer-locator"] .rvs-dl__contact a { color: inherit; }

[data-rvs="dealer-locator"] .rvs-dl__actions {
  display: flex;
  gap: 8px;
  margin-top: var(--rvs-gap-sm);
  flex-wrap: wrap;
}

/* Build 71 (York): Roboto Mono pills, the product page's spec chips in red
   rather than olive — the phone number filled, the rest cream, every one
   red on hover. Full reset: POWER styles bare buttons and links. */
[data-rvs="dealer-locator"] .rvs-dl__cta {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--rvs-radius-pill);
  background: var(--rvs-dl-chip-bg);
  color: var(--rvs-dl-chip-fg);
  font-family: var(--rvs-font-mono);
  font-weight: 400;
  font-size: .8125rem;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--rvs-transition), color var(--rvs-transition);
}
[data-rvs="dealer-locator"] .rvs-dl__cta--primary {
  background: var(--rvs-red);
  color: var(--rvs-white);
}
[data-rvs="dealer-locator"] .rvs-dl__cta:hover,
[data-rvs="dealer-locator"] .rvs-dl__cta:focus-visible {
  background: var(--rvs-red);
  color: var(--rvs-white);
  text-decoration: none;
}
[data-rvs="dealer-locator"] .rvs-dl__cta--primary:hover,
[data-rvs="dealer-locator"] .rvs-dl__cta--primary:focus-visible { background: var(--rvs-charcoal); }
[data-rvs="dealer-locator"] .rvs-dl__cta:focus-visible { outline: 2px solid var(--rvs-red); outline-offset: 2px; }

[data-rvs="dealer-locator"] .rvs-dl__spill {
  margin: 0;
  padding: 11px var(--rvs-dl-pad-r) 11px var(--rvs-dl-pad-l);
  background: var(--rvs-bg);
  border-bottom: 1px solid var(--rvs-rule);
}

[data-rvs="dealer-locator"] .rvs-dl__empty {
  padding: var(--rvs-gap-lg) var(--rvs-gap-md);
  text-align: center;
}

[data-rvs="dealer-locator"] .rvs-dl__more {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: var(--rvs-gap-sm);
  border: 0;
  border-bottom: 1px solid var(--rvs-rule);
  background: var(--rvs-surface);
  color: var(--rvs-text);
  /* Build 71: body face (Aktiv), not mono (York). */
  font-family: var(--rvs-font-body);
  font-weight: var(--rvs-bold-weight);
  font-size: .9375rem;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--rvs-transition), color var(--rvs-transition);
}

[data-rvs="dealer-locator"] .rvs-dl__more:hover { background: var(--rvs-bg); color: var(--rvs-red); }

/* Build 79: display:block above beat the hidden attribute, so "Show -20 more
   dealers" showed on an empty list. Anything this module hides stays hidden. */
[data-rvs="dealer-locator"] [hidden] { display: none !important; }

/* Build 79.2: dealer name on pin hover. Sits in the map's float pane. */
[data-rvs="dealer-locator"] .rvs-dl__pinlabel {
  position: absolute;
  transform: translate(-50%, calc(-100% - 14px));
  padding: 5px 10px;
  border-radius: var(--rvs-radius, 3px);
  background: var(--rvs-charcoal, #222);
  color: #fff;
  font-family: var(--rvs-font-body);
  font-weight: var(--rvs-bold-weight);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(34, 34, 34, .2);
}

[data-rvs="dealer-locator"] .rvs-dl__fallback {
  padding: var(--rvs-gap-md) var(--rvs-dl-pad-r) var(--rvs-gap-md) var(--rvs-dl-pad-l);
  background: var(--rvs-bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* --- Map ---------------------------------------------------------------- */

[data-rvs="dealer-locator"] .rvs-dl__map {
  position: relative;
  min-height: var(--rvs-dl-map-h, 720px);
  background: var(--rvs-cream);
}

[data-rvs="dealer-locator"] .rvs-dl__map-missing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--rvs-gap-md);
  text-align: center;
}

[data-rvs="dealer-locator"] .rvs-dl__searcharea {
  position: absolute;
  top: var(--rvs-gap-sm);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 11px 22px;
  border: 0;
  border-radius: var(--rvs-radius-pill);
  background: var(--rvs-charcoal);
  color: var(--rvs-light-cream);
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(34, 34, 34, .28);
}

/* Google's InfoWindow sits outside the module root, so it can only be
   reached from the document. Kept minimal deliberately. */
.rvs-dl__iw {
  font-family: var(--rvs-font-body);
  font-size: var(--rvs-display-xs);
  line-height: var(--rvs-display-xs-lh);
  color: var(--rvs-charcoal);
}

/* ==========================================================================
   Enquiry band
   --------------------------------------------------------------------------
   Carries its own data-scheme, so everything below reads from the scheme
   tokens and any scheme works without a light/dark variant.

   The form is rendered raw (legacy editor, Set as raw HTML form), which means
   POWER styles it. Only colour is overridden here — shape, spacing and sizing
   are left to the theme so the form matches every other form on the site.
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__enquiry {
  background: var(--rvs-bg);
  color: var(--rvs-text);
  padding-block: var(--rvs-band-pad);
}

/* Build 67: the selected dealer sits in a row of its own above the form, so
   the heading and intro start level with the first form field (York). */
[data-rvs="dealer-locator"] .rvs-dl__enquiry-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-areas:
    ".    selected"
    "copy form";
  column-gap: var(--rvs-gap-lg);
  row-gap: 0;
  align-items: start;
}
[data-rvs="dealer-locator"] .rvs-dl__enquiry-copy { grid-area: copy; }
[data-rvs="dealer-locator"] .rvs-dl__enquiry-copy > :first-child { margin-top: 0; }
[data-rvs="dealer-locator"] .rvs-dl__selected     { grid-area: selected; }
[data-rvs="dealer-locator"] .rvs-dl__enquiry-side { grid-area: form; }

[data-rvs="dealer-locator"] .rvs-dl__enquiry-blurb { margin-top: var(--rvs-gap-sm); }
[data-rvs="dealer-locator"] .rvs-dl__enquiry-blurb p:last-child { margin-bottom: 0; }

/* Selected dealer — heads the form column so it's read before the fields.
   A red bar rather than an outline: York asked for fewer grey rules. */
[data-rvs="dealer-locator"] .rvs-dl__selected {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 var(--rvs-gap-md);
  padding: 18px 22px;
  background: var(--rvs-surface);
}

[data-rvs="dealer-locator"] .rvs-dl__selected-place:empty { display: none; }

[data-rvs="dealer-locator"] .rvs-dl__change {
  margin-top: 6px;
  color: var(--rvs-link);
  text-transform: none;
  letter-spacing: .02em;
  font-size: .8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* POWER's .pwr--dark / .pwr--light paint their own background; this wrapper
   only borrows them for label, field and button colours. Same as parts. */
[data-rvs="dealer-locator"] .rvs-dl__form.pwr-form { background: transparent; color: inherit; }

[data-rvs="dealer-locator"] .rvs-dl__footnote { margin-top: var(--rvs-gap-sm); font-size: .9375rem; }

/* ==========================================================================
   Region grid
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__regions { padding-block: var(--rvs-band-pad-tight); }
[data-rvs="dealer-locator"] .rvs-dl__regions-heading { margin-block: var(--rvs-gap-sm) var(--rvs-gap-lg); }

[data-rvs="dealer-locator"] .rvs-dl__region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

[data-rvs="dealer-locator"] .rvs-dl__region {
  background: var(--rvs-surface);
  border: 1px solid var(--rvs-rule);
  padding: 13px 16px;
  color: var(--rvs-text);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: border-color var(--rvs-transition);
}

[data-rvs="dealer-locator"] .rvs-dl__region:hover { border-color: var(--rvs-heading); }
[data-rvs="dealer-locator"] .rvs-dl__region.is-on { border-color: var(--rvs-red); box-shadow: inset 3px 0 0 var(--rvs-red); }
[data-rvs="dealer-locator"] .rvs-dl__region b { letter-spacing: .04em; }

/* ==========================================================================
   Cards list (data-list="cards") — build 57
   --------------------------------------------------------------------------
   No rules around the list, around the map or between dealers; each dealer
   is a surface box with space between. Padding moves from the cards onto
   the list, so --rvs-dl-pad-l/-r position the whole column at once.
   ========================================================================== */

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__body { border-block: 0; }
[data-rvs="dealer-locator"][data-list="cards"][data-width="contained"] .rvs-dl__body { border: 0; }

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__list {
  background: transparent;
  border-right: 0;
  padding: 0 var(--rvs-dl-pad-r) var(--rvs-gap-md) var(--rvs-dl-pad-l);
}

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__count {
  padding: var(--rvs-gap-sm) 0 12px;
  border-bottom: 0;
  background: var(--rvs-bg);
}

[data-rvs="dealer-locator"][data-list="cards"] [data-dl="results"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__dealer {
  padding: 20px 22px 18px;
  border-bottom: 0;
  background: var(--rvs-surface);
}

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__dealer:hover { background: var(--rvs-surface); }
[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__dealer.is-open { background: var(--rvs-surface); }

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__spill {
  padding: 12px 0 0;
  background: transparent;
  border-bottom: 0;
}

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__more {
  margin-top: 12px;
  border-bottom: 0;
}

[data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__fallback {
  margin-top: 12px;
  padding: var(--rvs-gap-md) 22px;
  background: var(--rvs-surface);
}

/* Page-margin alignment — desktop only, full width only.
   The left pad is the distance from the module edge to the content edge of
   .rvs__container, so the dealer text starts under the heading and search.
   The list column grows by both pads, so the text keeps its width. York:
   "as long as that margin is reflected on the other side of the text". */
@media (min-width: 1001px) {
  [data-rvs="dealer-locator"][data-align="page"] .rvs-dl__body {
    --rvs-dl-pad-l: max(var(--rvs-gap-md), calc((var(--rvs-dl-vw) - var(--rvs-container)) / 2 + var(--rvs-gutter)));
    --rvs-dl-pad-r: var(--rvs-gap-lg);
    grid-template-columns: calc(var(--rvs-dl-list-w) + var(--rvs-dl-pad-l) + var(--rvs-dl-pad-r)) minmax(0, 1fr);
  }

  /* No map: one column, so the column maths doesn't apply. */
  [data-rvs="dealer-locator"][data-align="page"] .rvs-dl__body--nomap { grid-template-columns: 1fr; }

  /* Cards: the box edge lands on the page margin. Ruled: the card's own
     padding carries the pad, so the rules still run to the screen edge and
     the dealer text lands on the margin. */
}

/* ==========================================================================
   Diagnostics — Advanced toggle only, never on a published page
   ========================================================================== */

[data-rvs="dealer-locator"] .rvs-dl__debug {
  font-family: var(--rvs-font-mono);
  font-size: var(--rvs-label-s);
  line-height: 1.6;
  background: #FFFBE6;
  border: 2px solid #D59A1E;
  color: #4A3305;
  padding: var(--rvs-gap-md);
  margin-block: var(--rvs-gap-md);
  overflow-x: auto;
}

[data-rvs="dealer-locator"] .rvs-dl__debug h4 {
  font-family: inherit;
  font-size: inherit;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: var(--rvs-gap-sm) 0 6px;
}
[data-rvs="dealer-locator"] .rvs-dl__debug h4:first-child { margin-top: 0; }
[data-rvs="dealer-locator"] .rvs-dl__debug table { border-collapse: collapse; width: 100%; margin-bottom: 10px; }
[data-rvs="dealer-locator"] .rvs-dl__debug th,
[data-rvs="dealer-locator"] .rvs-dl__debug td {
  text-align: left;
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid #E8D9A8;
  vertical-align: top;
}
[data-rvs="dealer-locator"] .rvs-dl__debug td:first-child { white-space: nowrap; color: #7A5A10; }
[data-rvs="dealer-locator"] .rvs-dl__debug code { background: rgba(0, 0, 0, .06); padding: 1px 5px; }
[data-rvs="dealer-locator"] .rvs-dl__debug .is-bad { color: var(--rvs-red); font-weight: var(--rvs-bold-weight); }

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1000px) {
  [data-rvs="dealer-locator"] .rvs-dl__search { grid-template-columns: 1fr; }
  [data-rvs="dealer-locator"] .rvs-dl__seg { justify-self: start; }

  /* Map above the list on narrow screens. Desktop placement rules must not
     carry extra attribute selectors here or they outrank these overrides —
     the recurring stacking bug across this module family. */
  [data-rvs="dealer-locator"] .rvs-dl__body,
  [data-rvs="dealer-locator"][data-width="contained"] .rvs-dl__body { grid-template-columns: 1fr; }
  [data-rvs="dealer-locator"] .rvs-dl__list { max-height: none; border-right: 0; order: 2; }
  [data-rvs="dealer-locator"] .rvs-dl__map { min-height: 340px; order: 1; }

  [data-rvs="dealer-locator"] .rvs-dl__enquiry-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "selected" "form";
    row-gap: var(--rvs-gap-md);
  }
  [data-rvs="dealer-locator"] .rvs-dl__selected { margin-bottom: 0; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 640px) {
  /* Same specificity as the base rule, later in the sheet, so it wins. The
     page-margin rules live in a min-width query and never reach here. */
  [data-rvs="dealer-locator"] .rvs-dl__body {
    --rvs-dl-pad-l: var(--rvs-gutter-mobile);
    --rvs-dl-pad-r: var(--rvs-gutter-mobile);
  }
  [data-rvs="dealer-locator"][data-list="cards"] .rvs-dl__dealer { padding: 18px 18px 16px; }

  [data-rvs="dealer-locator"] .rvs-dl__region-grid { grid-template-columns: 1fr; }
  [data-rvs="dealer-locator"] .rvs-dl__map { min-height: 280px; }
}
