/*!
 * Green Road Map — Design System
 * ============================================================================
 * This file is loaded sitewide by plugins/system/grmdesign on every frontend
 * page (under both shaper_helixultimate and ultimate-rch templates) so the
 * redesign applies uniformly without having to edit each template's
 * custom.css. The plugin lives outside the template directory, so template
 * updates can't break it.
 *
 * Edit this file once — both templates pick up the change.
 *
 * The Inter web font is loaded by the plugin separately (Google Fonts link)
 * so there's no @import here.
 *
 * Originally extracted from templates/shaper_helixultimate/css/custom.css.
 * ============================================================================
 */

/* ============================================================================
   ============================================================================
   MEMBER MAP REDESIGN — green/glass direction — added 2026-05-08
   Pilot view: grrfrontendmembermapview
   References: docs/gamma-redesign-examples/{example-1.html,design-system.html}

   This block REPLACES the earlier "NEW MINIMAL STYLE" black/white experiment.
   Most rules below are scoped to body.view-grrfrontendmembermapview so they
   cannot affect any other page on the site. EXCEPTION: the HEADER block
   (look for "HEADER — GLOBAL") was promoted to sitewide because the same
   nav look is now the canonical look for every page. Inter is loaded via
   @import at the top of this file — it ships sitewide for now; can be
   moved to per-view PHP later if perf becomes a concern.
   ============================================================================
   ============================================================================ */


/* ----------------------------------------------------------------------------
   DESIGN TOKENS — local to the member-map view
   Defined on :root (sitewide) so they're available to ANY view that opts
   into the design system. Component rules below stay scoped per-view; only
   the tokens themselves are global. Tokens are namespaced `--gr-*` so they
   can't collide with framework variables.
   ---------------------------------------------------------------------------- */
:root {
  /* Brand greens */
  --gr-green:        #22c55e;
  --gr-green-light:  #86efac;
  --gr-green-dark:   #166534;
  --gr-green-soft:   rgba(34, 197, 94, 0.10);
  --gr-green-soft-2: rgba(34, 197, 94, 0.20);

  /* Slate neutrals */
  --gr-slate-50:  #f8fafc;
  --gr-slate-100: #f1f5f9;
  --gr-slate-200: #e2e8f0;
  --gr-slate-300: #cbd5e1;
  --gr-slate-400: #94a3b8;
  --gr-slate-500: #64748b;
  --gr-slate-600: #475569;
  --gr-slate-700: #334155;
  --gr-slate-800: #1e293b;
  --gr-slate-900: #0f172a;

  /* Glass surfaces */
  --gr-surface-100: rgba(255, 255, 255, 0.90);
  --gr-surface-200: rgba(255, 255, 255, 0.70);
  --gr-surface-300: rgba(255, 255, 255, 0.40);

  /* Shadows */
  --gr-shadow-glass:       0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --gr-shadow-glass-hover: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --gr-shadow-sm:          0 1px 2px 0 rgba(0, 0, 0, 0.05);

  /* Radii */
  --gr-radius-sm:   0.5rem;   /* 8px  */
  --gr-radius-md:   0.75rem;  /* 12px — Tailwind rounded-xl  */
  --gr-radius-lg:   1rem;     /* 16px — Tailwind rounded-2xl */
  --gr-radius-full: 9999px;

  /* Typography
     - sans  → body (paragraphs, form fields, tables, buttons)
     - display → headings (h1–h6 and the per-card title classes). Arvo
       is the slab-serif baked into the GREENROADMAP logo wordmark, so
       echoing it in headings ties the page chrome back to the brand
       mark while keeping body text clean and readable. */
  --gr-font-sans:    'Inter', system-ui, -apple-system, BlinkMacSystemFont,
                     'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --gr-font-display: 'Arvo', Georgia, 'Times New Roman', serif;
}


/* ----------------------------------------------------------------------------
   DISPLAY-FONT (ARVO) OVERRIDES — applied to headings + heading-style
   class hooks across the design system. The body / form / table /
   button rules below leave font-family alone for everything else, so
   those keep using --gr-font-sans (Inter) by inheritance.
   Source order: this block sits at the top so the per-page heading
   rules later in the file inherit the Arvo family (they only override
   size / weight / colour, not font-family).
   ---------------------------------------------------------------------------- */
:where(h1, h2, h3, h4, h5, h6,
       .gr-list-card__title,
       .gr-grmuid,
       .gr-stat__value,
       .page-header h1,
       .com-users-login .page-header h1,
       .com-users-profile__edit .page-header h1) {
  font-family: var(--gr-font-display);
  letter-spacing: 0;        /* the Inter-tuned -0.01/-0.02 tight tracking */
                            /* reads odd in a slab serif; reset here so   */
                            /* per-rule letter-spacing settings can       */
                            /* override if they want.                     */
}
/* Heading-style classes that are SMALL UPPERCASE LABELS — keep Inter:
   .gr-totals__heading ("TOTALS" / "RESTRICTION TOTALS"), form field
   labels (.control-label label, .gr-filter label, .gr-stat__label,
   etc.). Arvo at small caps with tracking reads dated; Inter stays. */



/* ----------------------------------------------------------------------------
   TYPOGRAPHY RESET
   Defeats the inline <style> blocks that helix-ultimate emits in <head>:
     body { font-family: 'Roboto'; font-size: 14px; }
     h1..h5 { font-family: 'Arvo'; font-weight: 600; }
   These inline rules sit AFTER every CSS file in source order, so we win the
   cascade by adding extra specificity (the body class).
   ---------------------------------------------------------------------------- */
/* Body font (Inter) — applied to the page baseline + form controls.
   h1–h6 intentionally excluded; they inherit Arvo from the
   DISPLAY-FONT OVERRIDES block at the top of this file. */
body.view-grrfrontendmembermapview,
body.view-grrfrontendmembermapview button,
body.view-grrfrontendmembermapview input,
body.view-grrfrontendmembermapview select,
body.view-grrfrontendmembermapview textarea {
  font-family: var(--gr-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.view-grrfrontendmembermapview {
  font-size: 14px;
  color: var(--gr-slate-800);
  background-color: var(--gr-slate-50);
}

body.view-grrfrontendmembermapview h1 {
  font-size: 1.875rem;        /* 30px — Tailwind text-3xl */
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gr-slate-900);
}
body.view-grrfrontendmembermapview h2 {
  font-size: 1.25rem;         /* 20px — Tailwind text-xl */
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gr-slate-800);
}
body.view-grrfrontendmembermapview h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gr-slate-800);
}


/* ----------------------------------------------------------------------------
   FOOTER + BOTTOM REGIONS — hidden on this view
   ---------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview #sp-footer,
body.view-grrfrontendmembermapview #sp-bottom,
body.view-grrfrontendmembermapview #sp-section-1,
body.view-grrfrontendmembermapview #sp-hero {
  display: none !important;
}


/* ----------------------------------------------------------------------------
   HEADER — GLOBAL (applies to every frontend page, not just the member map).
   White / glass surface, sticky, compact, brand-green active nav.

   Note: this block sits inside the MEMBER MAP REDESIGN section purely for
   historical reasons — that's where the look was first developed. It was
   later promoted to a sitewide block (selectors no longer prefixed with
   body.view-grrfrontendmembermapview) because the user wants the same nav
   look on every page. The MAIN BODY rules below remain view-scoped because
   they're specifically about letting the map fill the viewport.
   ---------------------------------------------------------------------------- */
#sp-header {
  background-color: var(--gr-surface-100);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gr-slate-100);
  box-shadow: var(--gr-shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  min-height: 56px;
  padding: 0;
}

#sp-header .container,
#sp-header .container-inner {
  height: 100%;
}
#sp-header .container-inner > .row {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  flex-wrap: nowrap;
}
#sp-header .sp-column {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Primary logo — smaller, vertically centred */
#sp-logo .logo {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
}
.logo-image,
.logo-image-phone {
  height: var(--grm-logo-h, 28px) !important;
  width: auto;
  max-width: 100%;
}

/* The pin-and-road icon after the wording (2026-10-21), laid out as the brand's
   landscape lockup: the icon is 3.12× the wording's height, sits 0.517× that
   height to its right, and its foot lines up with the foot of the letters.
   Measured off "GRM Landscape logo RGB.png". It is drawn here rather than baked
   into the logo file because the logo is a template-style setting held in each
   site's database; this way every header (main site, RCH pages, guest map)
   gets it from one deployed rule. --grm-logo-h is the wording's height: the
   whole lockup is 3.12× it tall, so 15px fits the 56px header (28px wording
   would need an 87px header). */
#sp-header {
  --grm-logo-h: 15px;
}
#sp-header .logo > a {
  display: inline-flex;
  align-items: flex-end;
}
#sp-header .logo > a::after {
  content: "";
  flex: none;
  height: calc(var(--grm-logo-h) * 3.12);
  width: calc(var(--grm-logo-h) * 3.12 * 0.7472);   /* the icon's own aspect, 60.867 × 81.46 */
  margin-left: calc(var(--grm-logo-h) * 0.517);
  background: url("../images/grm-icon.svg") no-repeat center / contain;
}
/* Local and dev only: plg_system_envmetatag's fixed 29px banner expects the
   page pushed down 30px, but ultimate-rch sets 20px, so on RCH pages the
   banner hid the top of the header — and with it the tip of the pin. No
   banner on production, so this never fires there. */
body:has(.env-env-banner) {
  padding-top: 30px !important;
}

/* Secondary "powered by TRF" logo — also smaller, right-aligned */
#sp-logo2 .sp-column {
  justify-content: flex-end;
}
#sp-logo2 img {
  max-height: 24px;
  width: auto;
  opacity: 0.75;
}

/* Megamenu — Inter, slate, brand-green active */
#sp-menu .sp-column {
  justify-content: flex-end;
  width: 100%;
}
.sp-megamenu-wrapper {
  height: 100%;
}
.sp-megamenu-parent {
  display: flex !important;            /* defeats Bootstrap d-lg-block !important */
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  height: 100%;
  list-style: none;
  flex-wrap: nowrap;
}
.sp-megamenu-parent > li {
  height: 100%;
  display: flex;
  align-items: stretch;
}
/* Note: #sp-header in the selector is needed to beat the legacy
   `#sp-menu li a { font-family: Arvo; color: #076633 ... }` rule earlier in
   this file, which has ID-level specificity (100). Class-only selectors
   would lose the cascade against it. */
#sp-header .sp-megamenu-parent > li {
  align-items: center;            /* override stretch so pills don't fill bar */
}
#sp-header .sp-megamenu-parent > li > a,
#sp-header .sp-megamenu-parent > li > span.sp-menu-separator,
#sp-header .sp-megamenu-parent > li > span.sp-menu-heading {
  display: inline-flex;
  align-items: center;
  font-family: var(--gr-font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--gr-slate-600);
  padding: 7px 14px;
  border: none;
  border-radius: var(--gr-radius-full);
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
  transition: color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
#sp-header .sp-megamenu-parent > li > a:hover,
#sp-header .sp-megamenu-parent > li > span:hover {
  color: var(--gr-slate-900);
  background-color: var(--gr-slate-100);
}

/* Active item — green pill with white text. */
#sp-header .sp-megamenu-parent > li.current-item > a,
#sp-header .sp-megamenu-parent > li.active > a {
  color: #ffffff;
  background-color: var(--gr-green);
}
#sp-header .sp-megamenu-parent > li.current-item > a:hover,
#sp-header .sp-megamenu-parent > li.active > a:hover {
  color: #ffffff;
  background-color: var(--gr-green-dark);
}

/* Login + Register pills (only show for guests) — matched pair of
   rounded-full pills sat side-by-side in the megamenu. Login is dark
   slate, Register is brand-green. Padding + font-size + radius MUST
   match so they read as a paired CTA, not two mismatched links.
   font-family !important needed to beat `.sppb-btn { font-family: Arvo !important }`. */
#sp-header .sp-megamenu-parent .nav-login-only-guest,
#sp-header .sp-megamenu-parent .nav-register-only-guest {
  font-family: var(--gr-font-sans) !important;
  border-radius: var(--gr-radius-full) !important;
  padding: 7px 14px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border: none !important;
  border-bottom: none !important;
  text-transform: none !important;
  line-height: 1.4 !important;
}
#sp-header .sp-megamenu-parent .nav-login-only-guest {
  background-color: var(--gr-slate-900) !important;
  color: #ffffff !important;
}
#sp-header .sp-megamenu-parent .nav-login-only-guest:hover {
  background-color: var(--gr-slate-800) !important;
  color: #ffffff !important;
}
#sp-header .sp-megamenu-parent .nav-register-only-guest {
  background-color: var(--gr-green) !important;
  color: #ffffff !important;
}
#sp-header .sp-megamenu-parent .nav-register-only-guest:hover {
  background-color: var(--gr-green-dark) !important;
  color: #ffffff !important;
}

/* Dropdown menus.
   #sp-header in selectors so we beat the legacy `#sp-menu li a` rule.
   .sp-dropdown is the outer card; .sp-dropdown-inner is helix's own inner
   wrapper which ships with its own padding/background/shadow — we flatten
   it so the outer card is the only visual layer. */
#sp-header .sp-dropdown {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-md);
  box-shadow: var(--gr-shadow-glass);
  padding: 6px;
  margin-top: 0;
}
/* Invisible hover bridge — closes the gap between the trigger pill and the
   dropdown so the user can move the mouse down without leaving the hover
   area and the dropdown collapsing. */
#sp-header .sp-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
  background: transparent;
}
#sp-header .sp-dropdown-inner {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border: none;
  border-radius: 0;
}
#sp-header .sp-dropdown-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
#sp-header .sp-dropdown-items > li > a,
#sp-header .sp-dropdown li.sp-menu-item > a {
  display: block;
  font-family: var(--gr-font-sans) !important;
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  padding: 8px 12px;
  border-radius: var(--gr-radius-sm);
  border: none;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#sp-header .sp-dropdown-items > li > a:hover,
#sp-header .sp-dropdown li.sp-menu-item > a:hover {
  background-color: var(--gr-slate-100);
  color: var(--gr-slate-900);
}


/* ----------------------------------------------------------------------------
   MAIN BODY — let the map fill the viewport below the header
   ---------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview #sp-main-body {
  padding: 0;
  margin: 0;
}


/* ----------------------------------------------------------------------------
   FLOATING MAP CONTROLS — vertical glass card stack on the right edge of the
   map. Two wrapper bars exist:
     .vertical-wrapper-controls       (top, ~12 buttons: search, key, pin,
                                       location, tracking, layers, gpx, zoom,
                                       fullscreen, settings, boundaries)
     .vertical-wrapper-controls-info  (bottom, 2 buttons: pin + info)
   Each wrapper used to render as a single grey pill containing tightly-packed
   children. We strip the wrapper background and convert each child into its
   own 40×40 white rounded card with a soft shadow. The OL zoom group keeps
   its + and − buttons inside ONE card, separated by a thin divider.
   ---------------------------------------------------------------------------- */
/* Wrapper itself is now the visual surface — one white rounded card with
   soft shadow that contains all the icons. This reads as a single tool
   palette over the busy map rather than 13 individual floating cards. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);   /* 16px — matches example surfaces */
  box-shadow: var(--gr-shadow-glass);
  padding: 6px;
  width: 48px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Each direct child is transparent — the wrapper provides the visual surface.
   Children stay 36×36 with rounded corners so hover gives a subtle
   highlight ring inside the card. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > *,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * {
  background-color: transparent;
  color: var(--gr-slate-700);
  border: none;
  border-radius: var(--gr-radius-sm);   /* 8px — subtle hover highlight */
  box-shadow: none;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}
/* Safety net: a toolbar placeholder whose script did not load (any tier) stays an
   empty div — hide it rather than leave a blank 36px slot. Filled placeholders and
   the OpenLayers zoom control have children, so they are unaffected. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > div:empty { display: none; }
body.view-grrfrontendmembermapview .vertical-wrapper-controls > *:hover,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > *:hover {
  color: var(--gr-green);
  background-color: var(--gr-slate-50);
  border-color: transparent;
  box-shadow: none;
}

/* Icons (img / svg) inside cards — constrain so they're centred with breathing room. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * img,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * svg,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * img,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  object-fit: contain;
  display: block;
  margin: 0;
}

/* OL zoom group — both buttons stacked, no divider line (the wrapper is
   one surface; we treat zoom as two separate icon cells). */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom {
  height: 72px;
  flex-direction: column;
  gap: 2px;
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom .ol-zoom-in,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom .ol-zoom-out {
  background: transparent;
  color: var(--gr-slate-700);
  border: none;
  border-radius: var(--gr-radius-sm);
  box-shadow: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom .ol-zoom-in:hover,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom .ol-zoom-out:hover {
  background-color: var(--gr-slate-50);
  color: var(--gr-green);
}

/* OL fullscreen / layer-switcher buttons — outer .ol-control is already a
   card; the inner button just needs to be transparent. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-control:not(.ol-zoom) > button,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .layer-switcher > button {
  background: transparent;
  color: var(--gr-slate-700);
  border: none;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Flatten any inner wrappers (toggle labels, JS-injected button divs etc.)
   so the card is the only visual surface. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * span,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * button,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * label,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * a,
body.view-grrfrontendmembermapview .vertical-wrapper-controls > * div:not(.panel),
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * span,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * button,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * a,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * div {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

/* Font Awesome icons inside cards. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls i.fas,
body.view-grrfrontendmembermapview .vertical-wrapper-controls i.fa,
body.view-grrfrontendmembermapview .vertical-wrapper-controls i.far,
body.view-grrfrontendmembermapview .vertical-wrapper-controls-info i.fas {
  color: var(--gr-slate-700);
  font-size: 16px;
  line-height: 1;
}

/* Layer-switcher and fullscreen buttons render their icons via Font Awesome
   ::before content (FA 5 is loaded site-wide). font-size: 0 on the button
   hides the OL-supplied glyphs (`»` for layer-switcher, `⤢` for fullscreen)
   so only the pseudo-element shows. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .layer-switcher > button {
  font-size: 0 !important;   /* OL ships font-size: 1.14em — beat it */
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .layer-switcher > button::before {
  content: "\f5fd";  /* fa-layer-group */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 16px;
  color: var(--gr-slate-700);
  line-height: 1;
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-fullscreen > button {
  font-size: 0;
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-fullscreen > button::before {
  content: "\f31e";  /* fa-expand-arrows-alt — clearer than fa-expand at 16px */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 16px;
  color: var(--gr-slate-700);
  line-height: 1;
}

/* Layer-switcher panel — clean up the radio-button + label layout. */
body.view-grrfrontendmembermapview .layer-switcher .panel {
  padding: 12px !important;
  font-family: var(--gr-font-sans);
}
body.view-grrfrontendmembermapview .layer-switcher .panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
body.view-grrfrontendmembermapview .layer-switcher .panel ul ul {
  padding-left: 0;
  margin-top: 4px;
}
body.view-grrfrontendmembermapview .layer-switcher .panel li.group > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gr-slate-900);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px 0;
}
body.view-grrfrontendmembermapview .layer-switcher .panel li.layer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  margin: 0;
}
body.view-grrfrontendmembermapview .layer-switcher .panel li.layer input[type="radio"],
body.view-grrfrontendmembermapview .layer-switcher .panel li.layer input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--gr-green);
  cursor: pointer;
  position: static;   /* OL ships position: absolute on these — undo it */
  left: auto;
}
body.view-grrfrontendmembermapview .layer-switcher .panel li.layer > label {
  flex: 1 1 auto;
  display: block;            /* defeat flatten rule's inline-flex */
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  margin: 0;
  cursor: pointer;
  line-height: 1.2;
}
body.view-grrfrontendmembermapview .layer-switcher .panel li.layer > label:hover {
  color: var(--gr-slate-900);
}

/* Pin toggle (#rememberMapTogglePlaceholder) — the toggle ships as
   .checkbox-wrapper-8 > input + .tgl-btn label > #pin-icon SVG. We need
   each layer to fill the card so the icon is centred. */
body.view-grrfrontendmembermapview #rememberMapTogglePlaceholder .checkbox-wrapper-8 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 0;
}
body.view-grrfrontendmembermapview #rememberMapTogglePlaceholder .checkbox-wrapper-8 input.tgl {
  display: none;
}
body.view-grrfrontendmembermapview #rememberMapTogglePlaceholder .tgl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
body.view-grrfrontendmembermapview #rememberMapTogglePlaceholder #pin-icon {
  width: 18px;
  height: 18px;
}
/* The pin icon is TWO shapes: a <path> (the cap) and a <polygon> (the
   needle) — both hardcode fill="#ffffff". A shape's own fill attribute beats
   the parent SVG's inherited CSS fill, so we must target both shapes
   directly, or the white needle vanishes against the card and only the cap
   ("top half of the pin") shows. */
body.view-grrfrontendmembermapview #rememberMapTogglePlaceholder #pin-icon path,
body.view-grrfrontendmembermapview #rememberMapTogglePlaceholder #pin-icon polygon {
  fill: var(--gr-slate-700);
}
body.view-grrfrontendmembermapview #cb3-8:checked + .tgl-btn #pin-icon path,
body.view-grrfrontendmembermapview #cb3-8:checked + .tgl-btn #pin-icon polygon {
  fill: var(--gr-green);
}


/* ----------------------------------------------------------------------------
   GROUP BADGE — the dev-only widget in the bottom right.
   Restyled to match the glass surface language.
   ---------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview #plg-groupbadge {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-family: var(--gr-font-sans) !important;
}
body.view-grrfrontendmembermapview #plg-groupbadge .gb-header {
  background-color: var(--gr-surface-100);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-md);
  box-shadow: var(--gr-shadow-glass);
  padding: 10px 14px;
  color: var(--gr-slate-700);
}
body.view-grrfrontendmembermapview #plg-groupbadge .gb-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gr-slate-800);
}
body.view-grrfrontendmembermapview #plg-groupbadge .gb-content {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-md);
  box-shadow: var(--gr-shadow-glass);
  margin-top: 4px;
  padding: 10px 14px;
  color: var(--gr-slate-700);
  font-size: 12px;
}


/* ----------------------------------------------------------------------------
   SIDE PANE DOCK — the managed vertical stack that holds the side panes
   (route-details, route-planner). A flexbox column does the layout; the
   stacking + reflow are handled by assets/index-functions/sidePaneDock.js.
   The dock itself is click-through; only the panes inside it catch pointer
   events.
   ---------------------------------------------------------------------------- */
.side-pane-dock {
  /* position:absolute, anchored to the map area (#map2). top/left:0 with
     16px padding — the padding insets the panes by 16px (their visual
     margin from the map edge) and gives their drop-shadows room before
     the overflow clip. */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  max-height: 100%;
  /* The whole column scrolls as one unit when the stacked panes exceed
     the map area — one scrollbar on the dock, no internal pane scrolling. */
  overflow-y: auto;
}
.side-pane-dock > * {
  /* Panes keep their full natural height; the dock does the scrolling. */
  flex: 0 0 auto;
}


/* ----------------------------------------------------------------------------
   SIDE PANE (replaces the old OL popup that opened on feature click).
   `#popup` keeps its ID for backwards compatibility with the AJAX content
   fill code in markup.php. It is no longer an OL Overlay, and no longer
   self-positioned — it is a member of the SidePaneDock, which owns its
   position, show/hide and slide animation. This rule is only the card
   styling. Closed = inline display:none (set by the dock).
   ---------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview #popup.side-pane {
  width: 360px;
  max-width: calc(100vw - 32px);
  /* No max-height — the pane is its natural height and the dock scrolls. */
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.18),
              0 4px 12px -2px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--gr-font-sans);
}

/* Re-click pulse — body briefly tints to flag content swap. */
body.view-grrfrontendmembermapview #popup.side-pane.is-pulse .side-pane-body {
  animation: side-pane-pulse 600ms ease-out;
}
@keyframes side-pane-pulse {
  0%   { background-color: var(--gr-green-soft); }
  100% { background-color: transparent; }
}

/* Header — sticky title row with close X. */
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gr-slate-100);
  flex: 0 0 auto;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gr-slate-900);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-title i {
  color: var(--gr-green);
  font-size: 13px;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-closer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--gr-radius-sm);
  color: var(--gr-slate-500);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-closer:hover {
  color: var(--gr-slate-900);
  background-color: var(--gr-slate-100);
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-closer i {
  font-size: 14px;
}

/* Body — scrollable area for the AJAX-injected route details. position:
   relative anchors the absolute-positioned loader overlay below. */
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body {
  position: relative;
  padding: 16px;
  flex: 1 1 auto;
  overflow-y: auto;
  font-size: 13px;
  color: var(--gr-slate-700);
  line-height: 1.5;
}

/* Loading state — spinner overlays the pane body, content fades while it
   spins. The legacy #loader.lds-dual-ring just toggles a `.hidden` class
   when the AJAX call starts/finishes; we hijack the no-`.hidden` state to
   centre the spinner and dim #details behind it. */
body.view-grrfrontendmembermapview #popup.side-pane #loader.lds-dual-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: 48px;
  height: 48px;
  z-index: 2;
  pointer-events: none;
}
body.view-grrfrontendmembermapview #popup.side-pane #loader.lds-dual-ring::after {
  width: 36px;
  height: 36px;
  margin: 6px;
  border-color: var(--gr-green) transparent var(--gr-green) transparent;
}
body.view-grrfrontendmembermapview #popup.side-pane #loader.lds-dual-ring.hidden {
  display: none;
}
/* While the loader is visible (no .hidden class), fade #details. */
body.view-grrfrontendmembermapview #popup.side-pane #loader.lds-dual-ring:not(.hidden) ~ #details {
  opacity: 0.25;
  pointer-events: none;
  transition: opacity 150ms ease;
}
body.view-grrfrontendmembermapview #popup.side-pane #details {
  opacity: 1;
  transition: opacity 150ms ease;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body p {
  margin: 0 0 8px 0;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body p:last-child {
  margin-bottom: 0;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body p > span {
  display: inline;
  font-weight: 600;
  color: var(--gr-slate-900);
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body a {
  color: var(--gr-green-dark);
  text-decoration: underline;
  text-decoration-color: var(--gr-green-soft-2);
  text-underline-offset: 2px;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body a:hover {
  text-decoration-color: var(--gr-green-dark);
}

/* ----- Side-pane content components -----
   Class names below are emitted by markup.php's loadGRRinitialDetails_OL
   AJAX response. The structure is:
     .pane-grmuid    — hero GRMUID at the top of the body
     .pane-fields > .pane-field > <dt> + <dd>  — semantic key/value rows
     .pane-actions   — primary "More details" button + secondary icon row */
body.view-grrfrontendmembermapview #popup.side-pane .pane-grmuid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px 0;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-grmuid {
  font-family: var(--gr-font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gr-slate-900);
  margin: 0;
  line-height: 1.1;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
/* Small "Road details" link to the right of the GRMUID for RCH/superuser.
   Simple outline-grey button. .side-pane-body in the selector chain to
   beat the generic `.side-pane-body a` rule above. */
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body .pane-grmuid-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-full);
  background-color: #ffffff;
  color: var(--gr-slate-700);
  font-family: var(--gr-font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body .pane-grmuid-action:hover {
  color: var(--gr-slate-900);
  background-color: var(--gr-slate-50);
  border-color: var(--gr-slate-300);
  text-decoration: none;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body .pane-grmuid-action i {
  font-size: 10px;
  transition: transform 0.15s ease;
}
body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body .pane-grmuid-action:hover i {
  transform: translateX(2px);
}

body.view-grrfrontendmembermapview .pane-fields {
  margin: 0 0 20px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.view-grrfrontendmembermapview .pane-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body.view-grrfrontendmembermapview .pane-field dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
body.view-grrfrontendmembermapview .pane-field dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  line-height: 1.4;
  word-break: break-word;
}
body.view-grrfrontendmembermapview .pane-empty {
  color: var(--gr-slate-400);
  font-weight: 400;
}


/* ----------------------------------------------------------------------------
   SIDE PANE DOCK — PHONE LAYOUT (below Bootstrap's md, 768px)
   ----------------------------------------------------------------------------
   Placed AFTER the pane rules above on purpose: the selectors below are the
   same specificity as their desktop counterparts, so source order is what
   makes them win. Moving this block earlier silently disables it.

   THE BUG THIS FIXES (measured 2026-08-19 at a 390px viewport):
   the dock is position:absolute at top/left 0 with z-index 1050, holding a
   360px-wide pane capped at calc(100vw - 32px). At 390px the pane therefore
   spans x=16..374. `.vertical-wrapper-controls` is position:absolute at
   right:20px, 48px wide, so it spans x=322..370 — entirely inside the pane's
   footprint, and losing the z-index contest 99 vs 1050. Opening any road
   hid all of the map's controls behind the pane.

   THE FIX: below md the dock stops being a top-left column and becomes a
   bottom sheet. That clears the toolbar completely (it stays top-right),
   matches what people expect from a map on a phone, and — because the dock
   owns BOTH panes — moves route-details and route-planner together rather
   than needing a rule each.

   KNOWN GAP (CSS cannot reach this): sidePaneDock.js animates panes in and
   out with translateX(-110%) — a horizontal slide. As a bottom sheet they
   should rise vertically. The pane still opens, closes and reflows correctly;
   it just enters from the left rather than from below. Fixing it is a
   translateX -> translateY swap in assets/index-functions/sidePaneDock.js
   (the open() and close() animate() calls), deliberately NOT done here
   because this pass is CSS-only.
   ---------------------------------------------------------------------------- */
@media (max-width: 767.98px) {

  body.view-grrfrontendmembermapview .side-pane-dock {
    /* FIXED, not absolute. The dock's desktop parent is #map2, whose bottom
       edge overshoots the visible window — measured at exactly 30px here,
       because .body-innerwrapper is height:100vh while the environment
       banner above it pushes its origin to y=30. Anchored to #map2 the sheet
       hung 29px below the screen and the footer buttons were unreachable.
       (The banner is a local/dev artefact, so the overshoot differs per
       environment — which is the point: a sheet must anchor to the VIEWPORT,
       not to an ancestor whose height depends on site chrome. The same
       overshoot is already noted against .vertical-wrapper-controls-info in
       grrfrontendmembermapview.css, where it was worked around with a magic
       40px offset rather than fixed.)
       Safe here because no ancestor sets transform/filter/will-change, any
       of which would make `fixed` resolve against that ancestor instead of
       the viewport — worth re-checking if the template chrome changes. */
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 8px 0;
    gap: 8px;
    /* svh = the SMALL viewport height, i.e. the height with mobile browser
       chrome VISIBLE. Using vh here would size the sheet against the tallest
       possible viewport, so the bottom of the pane would sit under Safari's
       toolbar until the user scrolled. The vh line is the fallback for
       engines without svh and is intentionally first. */
    max-height: 62vh;
    max-height: 62svh;
  }

  /* Panes fill the sheet width. The desktop rules set width:360px with a
     max-width cap; both are overridden rather than tweaked so the pane is
     genuinely full-bleed instead of 358px centred in a 390px sheet. */
  body.view-grrfrontendmembermapview #popup.side-pane,
  body.view-grrfrontendmembermapview .route-planner-panel {
    width: 100%;
    max-width: none;
  }

  /* The dock scrolls as one unit (overflow-y:auto on the desktop rule), and
     an unbroken white column reads as a single sheet even when two panes are
     stacked. Rounding every pane keeps them legible as separate cards rising
     from the bottom edge. */
  body.view-grrfrontendmembermapview #popup.side-pane,
  body.view-grrfrontendmembermapview .route-planner-panel {
    border-radius: var(--gr-radius-lg) var(--gr-radius-lg) 0 0;
  }

  /* Header is the sheet's grab area — give it a little more height so it is
     comfortable to hit with a thumb, and keep it stuck to the top of the
     pane while the dock scrolls. */
  body.view-grrfrontendmembermapview #popup.side-pane .side-pane-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #ffffff;
    padding: 16px;
  }


  /* --------------------------------------------------------------------
     MAP TOOLBAR — vertical column becomes a horizontal scrolling strip
     directly under the site header.
     --------------------------------------------------------------------
     WHY: stacked, the 12 controls are a fixed 504px tall regardless of
     screen width — about 71% of the map area on a 440px phone (measured on
     an iPhone 16 Pro Max, 2026-08-19). Raising the targets to the 44px
     platform minimum would have taken that past 90%, so "targets are too
     small" and "the toolbar is too big" were the same problem: fixing one
     by itself made the other worse.

     Rotating the SAME container into a row solves both at once. Nothing
     moves in the DOM and no control is hidden behind a "more" affordance —
     this is a pure reflow, which is what keeps it inside a CSS-only pass.
     It also sits at the opposite end of the screen from the side-pane
     sheet, so the two never compete for space.

     Full-bleed with a bottom border rather than a floating pill: it reads
     as an extension of the site header (which is where it now lives), and
     it gives the scroll strip the entire width to work with.
     -------------------------------------------------------------------- */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls {
    top: 0;
    right: 0;
    left: 0;
    width: auto;
    flex-direction: row;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 0;
    border-width: 0 0 1px;          /* keep only the rule under the strip */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;                       /* Firefox */
  }
  body.view-grrfrontendmembermapview .vertical-wrapper-controls::-webkit-scrollbar {
    display: none;                               /* WebKit/Blink */
  }

  /* 44px is the Apple HIG / Material minimum touch target. Applied to the
     bottom-right info cluster too — it stays where it is, but its buttons
     were 36px as well. */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > *,
  body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * {
    width: 44px;
    height: 44px;
  }

  /* The OL zoom group is itself a 72px COLUMN of two buttons. Left alone it
     would be the one item forcing the strip to 88px tall, so it flips to a
     row with the rest. */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom {
    /* !important is required here, not stylistic. grrfrontendmembermapview.css
       carries a legacy "beat OpenLayers" block (grep it for the Controls
       banner) which declares
           .ol-control { flex-direction: column !important; ... }
       and an !important declaration beats ANY normal one regardless of
       specificity or source order. Without this the strip lays out correctly
       but the zoom group stays a vertical stack — which is exactly what
       happened on the first attempt. Two !important declarations are then
       resolved by specificity, and this selector (0,3,1) beats .ol-control
       (0,1,0). Verified 2026-08-19. */
    flex-direction: row !important;
    height: 44px;
    width: auto;
  }
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom .ol-zoom-in,
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom .ol-zoom-out {
    width: 44px;
    height: 44px;
  }

  /* Grow the glyphs with their cells — an 18px icon centred in a 44px cell
     reads as a mis-sized button rather than a bigger one. (The -info
     selectors below are retained even though that cluster is hidden on
     phones, so the sizing is already correct if it is ever unhidden.) */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > * img,
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > * svg,
  body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * img,
  body.view-grrfrontendmembermapview .vertical-wrapper-controls-info > * svg {
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
  }

  /* --------------------------------------------------------------------
     Bottom-right floating cluster — HIDDEN on phones.
     --------------------------------------------------------------------
     It sat at bottom:40px right:20px, which on a phone is the worst
     available corner: it collided with the superuser OS-tile cost panel,
     and the side-pane bottom sheet (62svh) covers that area completely
     whenever a road is open.

     ⚠️ WHAT THIS COSTS — the cluster holds three controls and two of them
     have NO other entry point on mobile:
       • #location-pin        -> "Contacts" modal   (#location-popup)
       • .info-trigger-       -> "More info" modal  (#side-info-3)
       • #plg-groupbadge-trigger -> the dev-only group badge (no loss)
     The site burger is Joomla nav (Map / RCH / Profile / Logout / Partners
     / Admin), so it does not reach either modal. Both are informational
     rather than actions, which is why hiding is acceptable — but if they
     need to come back, the fix is to give them a home in the top strip,
     and that is a markup change, not CSS: they live in a separate
     absolutely-positioned container that cannot be merged into the
     scrolling row by styling alone.
     -------------------------------------------------------------------- */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls-info {
    display: none;
  }


  /* --------------------------------------------------------------------
     ROUTE PLANNER — phone layout
     --------------------------------------------------------------------
     Measured 2026-08-19 at 406x813 with a 60-waypoint route loaded: the
     panel's natural height is 1079px inside a 504px sheet. Where it goes —
     waypoint list 300, summary 249, options 132, instructions 74, header
     53, My Routes row 62, footer 55.

     Two structural problems, both worse than the raw size:

     1. THE FOOTER SCROLLED AWAY. Save / Save as / Export GPX sit at the
        bottom of that 1079px column, so committing a route meant scrolling
        the whole panel. On the desktop layout the panel is its natural
        height and the dock scrolls, which is fine when the dock is tall;
        on a phone it buries the only actions that matter.

     2. NESTED SCROLL REGIONS. The dock scrolled the panel while the
        waypoint list scrolled inside it — two nested scrollers on touch,
        where a drag that starts in the wrong place moves the wrong thing.

     The fix is one scroll region: pin the panel to the sheet height and let
     ONLY .route-planner-panel-body scroll. Header, My Routes row and footer
     then stay put. The panel is already display:flex/column (base rule plus
     the dock's inline display:flex), so this is just flex plumbing.
     -------------------------------------------------------------------- */
  /* Let panes SHRINK to the sheet rather than overflow it.
     The desktop rule is `.side-pane-dock > * { flex: 0 0 auto }` — panes keep
     their natural height and the dock scrolls, which is right when the dock
     is tall. On a phone we want the inverse, so the pane fits and its own
     body scrolls.
     NOTE: `max-height: 100%` on the pane does NOT work here, and was the
     first attempt. A percentage max-height resolves against the parent's
     HEIGHT, but the dock's height is auto (content-driven, capped only by
     max-height), so the percentage has no definite basis and computes to
     `none`. Constraining via the flex line is what actually binds. */
  body.view-grrfrontendmembermapview .side-pane-dock {
    overflow-y: hidden;        /* panes scroll internally now, not the dock */
  }
  /* ...except while a pane is being dragged. A drag upward moves the panel
     outside the dock's box, where the rule above clips it — it reads as the
     sheet slipping behind the map, then reappearing on release when the
     transform clears. sidePaneSheet.js adds this for the gesture AND for the
     settle animation that follows it (the panel is still displaced during
     those ~200ms, so re-clipping too early just moves the flicker).
     Note overflow-x computes to `auto` when overflow-y is hidden, so both
     axes have to be released here, not just the y. */
  body.view-grrfrontendmembermapview .side-pane-dock.is-dragging {
    overflow: visible;
  }
  body.view-grrfrontendmembermapview .side-pane-dock > * {
    flex: 0 1 auto;
    min-height: 0;
  }

  /* Road-details pane gets the same treatment — header stays, body scrolls. */
  body.view-grrfrontendmembermapview #popup.side-pane .side-pane-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.view-grrfrontendmembermapview .route-planner-panel-header,
  body.view-grrfrontendmembermapview .route-planner-panel-myroutes,
  body.view-grrfrontendmembermapview .route-planner-panel-footer {
    flex: 0 0 auto;
  }
  body.view-grrfrontendmembermapview .route-planner-panel-body {
    flex: 1 1 auto;
    min-height: 0;             /* without this a flex child refuses to
                                  shrink below its content and the panel
                                  overflows again — the classic flexbox
                                  min-height:auto trap */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Breathing room so the final waypoint card does not sit flush against
       the footer's top border and read as cut off. */
    padding-bottom: 20px;
  }

  /* Collapse the waypoint list's OWN scroller so the body is genuinely the
     one scroll region.
     `#route-planner-items` is max-height:300px + overflow-y:auto +
     overscroll-behavior:contain. That is a scroller nested inside a scroller,
     and on a phone it makes the tail of the list UNREACHABLE: during capture
     the sheet is ~42svh (~340px), so after the header and footer the body has
     roughly 220px — less than the list's own 300px cap. The list scrolls
     internally, and `overscroll-behavior: contain` then refuses to chain the
     gesture out to the body, so the last waypoints sit behind the footer with
     no way to scroll to them. Reported from a real device 2026-08-19.
     Removing the cap lets the list take its natural height and the body do
     all the scrolling — which is what the single-scroll-region fix intended
     and this rule had been quietly defeating. */
  body.view-grrfrontendmembermapview #route-planner-items {
    max-height: none;
    overflow: visible;
  }

  /* Footer actions: one compact row.
     A 2x2 grid at the 44px touch minimum was tried first and cost ~100px of
     FIXED panel height — height the map needs more than these buttons do.
     Screen space wins here: they are deliberate, low-frequency actions
     reached with the panel already open and already under the thumb, not
     targets you stab at while riding. 34px tall still clears the ~30px that
     a fingertip actually needs; it is the 44px recommendation that is
     relaxed, not usability.
     flex:1 1 0 + min-width:0 divides the row evenly and lets the widest
     label ("Export GPX") shrink rather than force a wrap. */
  body.view-grrfrontendmembermapview .route-planner-panel-footer {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 10px;
  }
  body.view-grrfrontendmembermapview .route-planner-panel-footer .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    height: 34px;
    padding: 0 6px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  /* --------------------------------------------------------------------
     MY ROUTES — give the saved-route grid the screen while it is open.
     --------------------------------------------------------------------
     The grid is absolutely positioned inside #map2 and the planner panel
     sits over its lower two-thirds, so on a phone you could see about one
     card of thirteen (each 360x335).

     #route-planner-myroutes-toggle carries aria-pressed, and routePlanner.js
     genuinely maintains it (verified true/false across a toggle), so :has()
     can react to the open state with NO JavaScript change. That is the only
     reason this is doable inside a CSS-only pass — without a state attribute
     to hook, coordinating these two elements would need the bundle.

     While open: collapse the panel to its header + the My Routes / Import
     row, and pull the grid's bottom edge up to clear it.
     -------------------------------------------------------------------- */
  /* Two ways into the same collapsed state, sharing one definition so they
     cannot drift: My Routes being open (aria-pressed, driven by the bundle),
     and the user dragging the header down (`is-collapsed`, set by
     assets/index-functions/sidePaneSheet.js). Both leave the header and the
     My Routes row — collapsing to exactly what My Routes already showed was
     the requested behaviour. */
  body.view-grrfrontendmembermapview
    .route-planner-panel:has(#route-planner-myroutes-toggle[aria-pressed="true"])
    :is(.route-planner-panel-body, .route-planner-panel-footer),
  body.view-grrfrontendmembermapview
    .route-planner-panel:has(#route-planner-shared-toggle[aria-pressed="true"])
    :is(#route-planner-tab-create, .route-planner-panel-footer),
  body.view-grrfrontendmembermapview
    .route-planner-panel.is-collapsed
    :is(.route-planner-panel-body, .route-planner-panel-footer) {
    display: none;
  }
  /* Shared Routes v2 (2026-09-27): the Shared toggle now keeps the panel body —
     it holds #route-planner-shared-mode (the Cards/Map switch, filters, results)
     — and hides only the create tab + footer. The filters collapse behind their
     <details> on phones so the sheet stays short; the grid clearance below is
     sized for the collapsed block. */

  /* The header is the drag handle.
     touch-action:none is load-bearing, not cosmetic — without it the browser
     claims vertical gestures for page scrolling and the pointermove events
     stop arriving mid-drag. Scoped to the header alone so the panel body
     still scrolls normally.
     The pill is the affordance: a bottom sheet with no grab handle reads as
     fixed furniture, and nobody discovers a gesture they have no reason to
     try. */
  body.view-grrfrontendmembermapview .route-planner-panel-header {
    position: relative;
    touch-action: none;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    padding-top: 18px;
  }
  body.view-grrfrontendmembermapview .route-planner-panel-header:active {
    cursor: grabbing;
  }
  body.view-grrfrontendmembermapview .route-planner-panel-header::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: var(--gr-radius-full);
    background-color: var(--gr-slate-300);
  }
  body.view-grrfrontendmembermapview
    #map2:has(#route-planner-myroutes-toggle[aria-pressed="true"])
    .route-planner-saved-grid,
  body.view-grrfrontendmembermapview
    #map2:has(#route-planner-shared-toggle[aria-pressed="true"])
    .route-planner-saved-grid {
    /* The collapsed panel is ~117px (header 53 + My Routes row 62) and is
       anchored to the VIEWPORT (position:fixed), while this grid is absolute
       inside #map2 — whose bottom overshoots the viewport by the height of
       whatever chrome sits above .body-innerwrapper (30px locally, from the
       environment banner; 0 where there is no banner). The two therefore
       cannot be aligned exactly in CSS without knowing that offset.
       160px clears the panel in the worst case. Deliberately erring toward a
       gap rather than an overlap: the grid scrolls (overflow-y:auto), so a
       little dead space costs nothing, whereas an overlap hides the bottom
       card behind the panel — which is what 132px did, by 15px. */
    bottom: 160px;
  }

  /* --------------------------------------------------------------------
     WHILE PLACING WAYPOINTS — shrink the sheet so the map is usable.
     --------------------------------------------------------------------
     This is the central tension of the planner on a phone: configuring
     needs the panel, but adding points needs the MAP, and at the resting
     height only 31% of the map was visible (measured 406x813). Tapping a
     road through a third of a screen is the whole feature working against
     itself.

     routePlanner.js puts `route-planner-active` on <body> while capture is
     running (verified: absent -> present -> absent across the Edit/Stop
     toggle). So the sheet can stand aside exactly when the map matters and
     come back when it does not — no JS change, no new control for the user
     to learn, and it self-corrects because the same class drives both.

     The My Routes / Import row also goes while capturing: mid-route you are
     not opening a different route, and it buys 62px of the body back.
     -------------------------------------------------------------------- */
  body.view-grrfrontendmembermapview.route-planner-active .side-pane-dock {
    max-height: 42vh;
    max-height: 42svh;
  }
  body.view-grrfrontendmembermapview.route-planner-active .route-planner-panel-myroutes {
    display: none;
  }

  /* The "Press Start, then click the map to add points…" block (74px) is
     onboarding copy: it tells you how to begin, so once capture is running
     it is describing something already done. Hidden while active, restored
     when you stop — so the guidance is there every time you come back to it,
     and never in the way while you work.
     Unlike the two rules above this does not shrink the panel (the block
     lives inside the scrolling body, not the fixed chrome). What it buys is
     scroll position: the waypoint list and route summary now start at the
     top of the body instead of 74px down it, which at a 42svh sheet is most
     of what you can see. */
  body.view-grrfrontendmembermapview.route-planner-active #route-planner-instructions {
    display: none;
  }

  /* --------------------------------------------------------------------
     MY ROUTES CARDS — fill the width instead of leaving a dead margin.
     --------------------------------------------------------------------
     The desktop track is `repeat(auto-fill, minmax(260px, 360px))`, whose
     MAXIMUM is a fixed 360px — so a track can never grow past that, and
     `justify-content:start` parks the remainder on the right. At a 390px
     grid width that wasted ~30px down the whole column, on the screen with
     the least to spare.

     Changing the max to 1fr lets the track absorb the leftover. Keeping
     auto-fill + the 260px minimum means this still does the right thing
     across the whole phone range rather than only at one width: one
     full-bleed column on a handset, and two filled columns once the grid
     clears ~536px (2x260 + 16px gap) — a large phone in landscape, or a
     small tablet just under the md breakpoint.
     -------------------------------------------------------------------- */
  body.view-grrfrontendmembermapview .route-planner-saved-grid__inner {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  /* The empty state is capped at 360px for the same reason — match it so a
     "no saved routes yet" card does not sit oddly narrow beside the change
     above. */
  body.view-grrfrontendmembermapview .route-planner-saved-grid__empty {
    max-width: none;
  }
}

/* ---------------------------------------------------------------------------
   Reports accordion — More Details panel (#moreDetailsPanel), directly beneath
   "Other Information".

   Native <details>/<summary> rather than the Bootstrap accordion: no JS, no
   collapse plugin, and it still works if the bundle fails to load. The shared
   `name` attribute makes the group exclusive (one open at a time) where
   supported and is harmlessly ignored elsewhere.
   --------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview .grr-reports,
body.view-grrfrontendmembermapview .grr-videos {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gr-slate-100);
}
body.view-grrfrontendmembermapview .grr-reports-title,
body.view-grrfrontendmembermapview .grr-videos-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gr-slate-500);
}
body.view-grrfrontendmembermapview .grr-reports-count,
body.view-grrfrontendmembermapview .grr-videos-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gr-slate-100);
  color: var(--gr-slate-700);
  font-size: 10px;
  letter-spacing: 0;
}
body.view-grrfrontendmembermapview .grr-report + .grr-report {
  border-top: 1px solid var(--gr-slate-100);
}
body.view-grrfrontendmembermapview .grr-report > summary {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gr-slate-900);
  cursor: pointer;
  list-style: none; /* suppress the default marker; we draw our own below */
}
body.view-grrfrontendmembermapview .grr-report > summary::-webkit-details-marker {
  display: none;
}
body.view-grrfrontendmembermapview .grr-report > summary::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid var(--gr-slate-400);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}
body.view-grrfrontendmembermapview .grr-report[open] > summary::before {
  transform: translateY(-50%) rotate(90deg);
}
body.view-grrfrontendmembermapview .grr-report > summary:focus-visible {
  outline: 2px solid var(--gr-green);
  outline-offset: 2px;
  border-radius: 2px;
}
body.view-grrfrontendmembermapview .grr-report-body {
  padding: 0 0 10px 18px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--gr-slate-700);
  /* Reports are member-typed free text — a pasted URL or run-on word would
     otherwise widen the modal column. */
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  body.view-grrfrontendmembermapview .grr-report > summary::before {
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   Videos — More Details panel, under the images (2026-10-06). Click-to-play:
   each video is a thumbnail button, and on click an iframe replaces it
   (grrfrontendmembermapview/tmpl/markup.php, grabVideos + Section 6B). The
   divider, heading and count pill are shared with the Reports block above.
   --------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview .grr-video {
  margin: 0 0 12px;
}
body.view-grrfrontendmembermapview .grr-video:last-child {
  margin-bottom: 0;
}
body.view-grrfrontendmembermapview .grr-video-frame {
  position: relative;
  max-width: 600px; /* the image column's cap (.grr-no-images) */
  aspect-ratio: 16 / 9;
  border-radius: var(--gr-radius-sm);
  overflow: hidden;
  background: #000;
}
body.view-grrfrontendmembermapview .grr-video-play,
body.view-grrfrontendmembermapview .grr-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
body.view-grrfrontendmembermapview .grr-video-play {
  display: block;
  background: #000;
  cursor: pointer;
}
body.view-grrfrontendmembermapview .grr-video-play[hidden] {
  display: none;
}
body.view-grrfrontendmembermapview .grr-video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease;
}
body.view-grrfrontendmembermapview .grr-video-play:hover img {
  opacity: 0.85;
}
body.view-grrfrontendmembermapview .grr-video-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding-left: 3px; /* optical centre for the triangle */
  border-radius: var(--gr-radius-full);
  background: rgba(15, 23, 42, 0.72); /* slate-900 */
  color: #fff;
  font-size: 20px;
  transform: translate(-50%, -50%);
  transition: background-color 0.15s ease;
}
body.view-grrfrontendmembermapview .grr-video-play:hover .grr-video-play-icon,
body.view-grrfrontendmembermapview .grr-video-play:focus-visible .grr-video-play-icon {
  background: var(--gr-green-dark);
}
body.view-grrfrontendmembermapview .grr-video-play:focus-visible {
  outline: 2px solid var(--gr-green);
  outline-offset: -3px; /* inside: the frame clips anything outside it */
}
body.view-grrfrontendmembermapview .grr-video figcaption {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gr-slate-900);
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  body.view-grrfrontendmembermapview .grr-video-play img,
  body.view-grrfrontendmembermapview .grr-video-play-icon {
    transition: none;
  }
}

body.view-grrfrontendmembermapview #popup.side-pane .pane-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--gr-slate-100);
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-actions-secondary {
  display: flex;
  gap: 6px;
}

body.view-grrfrontendmembermapview #popup.side-pane .pane-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--gr-radius-full);
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-btn-primary {
  background-color: var(--gr-green);
  color: #ffffff;
  width: 100%;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-btn-primary:hover {
  background-color: var(--gr-green-dark);
  color: #ffffff;
  text-decoration: none;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-btn-primary i {
  font-size: 13px;
}

/* ---------------------------------------------------------------------------
   "This road has reports" state for the popup's More details button.

   Applied only when the server reports a published, readable report count > 0,
   so the button cannot promise something the panel would not show.

   ⚠️ COLOUR NOTE: red is already load-bearing on this map — a red road line
   means "no motorcycle access" (see lineStyle in assets/index.ol.js and the key
   modal). A red button therefore risks reading as "this road is restricted"
   rather than "this road has reports". To switch to a warning amber instead,
   change the two colour values below and nothing else; the icon, badge and
   layout are colour-agnostic.
   --------------------------------------------------------------------------- */
body.view-grrfrontendmembermapview #popup.side-pane .pane-btn-primary.pane-btn-has-reports {
  background-color: #c62828;
  box-shadow: 0 1px 2px 0 rgba(198, 40, 40, 0.22);
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-btn-primary.pane-btn-has-reports:hover {
  background-color: #a91d1d;
}
/* Count sits to the right of the label, so the button reads
   "! More details (3)" at a glance without a layout shift. */
body.view-grrfrontendmembermapview #popup.side-pane .pane-btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  justify-content: stretch;
  flex: 1 1 0;
  height: 28px;
  padding: 0;
  border: 1px solid var(--gr-green-soft-2);
  border-radius: var(--gr-radius-full);
  background-color: transparent;
  color: var(--gr-green-dark);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn:hover {
  background-color: var(--gr-green-soft);
  border-color: var(--gr-green);
  text-decoration: none;
}
/* Default: icon centred, label parked just below the button. On hover the
   icon slides up and out, the label slides up into its place. */
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn-icon,
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gr-font-sans);
  color: inherit;
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity   0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn-icon {
  transform: translateY(0);
  font-size: 12px;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn-label {
  transform: translateY(110%);
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn:hover .pane-icon-btn-icon {
  transform: translateY(-110%);
  opacity: 0;
}
body.view-grrfrontendmembermapview #popup.side-pane .pane-icon-btn:hover .pane-icon-btn-label {
  transform: translateY(0);
  opacity: 1;
}

/* ----------------------------------------------------------------------------
   MODALS — applies to all Bootstrap modals on:
     - the member map view
     - the six single-record views (info, FAQ, etc.)
     - the two list views explicitly listed (FAQ + others)
   Same Bootstrap conventions across all three groups. Selectors use a
   nested :is() so the second :is() (single-record + list views) is the
   same group used by the SINGLE-RECORD + LIST VIEWS block below — keep
   them in sync. White rounded card, slate text + Inter, brand-green
   primary, outline-grey secondary, full-curve pill buttons — same
   tokens as the side pane.
   ---------------------------------------------------------------------------- */

:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-content {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.18),
              0 4px 12px -2px rgba(15, 23, 42, 0.08);
  font-family: var(--gr-font-sans);
  color: var(--gr-slate-700);
  overflow: hidden;
}

/* Header */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gr-slate-100);
  background-color: #ffffff;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-title,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-title.green {
  font-family: var(--gr-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gr-slate-900);
  margin: 0;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-title i {
  margin-right: 6px;
  color: var(--gr-green-dark);
  font-size: 13px;
}

/* Close button — Bootstrap 4 .close (×) AND Bootstrap 5 .btn-close */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-header .close,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-header .btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: -4px -4px -4px auto;
  border: none;
  border-radius: var(--gr-radius-sm);
  background-color: transparent;
  color: var(--gr-slate-500);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  opacity: 1;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-header .close:hover,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-header .btn-close:hover {
  color: var(--gr-slate-900);
  background-color: var(--gr-slate-100);
  opacity: 1;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-header .close span {
  display: block;
  line-height: 1;
}

/* Body */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body {
  padding: 20px;
  font-size: 13px;
  color: var(--gr-slate-700);
  line-height: 1.5;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body p {
  margin: 0 0 12px 0;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body p:last-child {
  margin-bottom: 0;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body p.small,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .small {
  font-size: 12px;
  color: var(--gr-slate-500);
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .text-muted {
  color: var(--gr-slate-500) !important;
}

/* Form labels — small uppercase slate-500, matching the side-pane field labels */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-label,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-label strong {
  display: block;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

/* Form controls — slate background, brand-green focus ring */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-control,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body select.form-control,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body textarea.form-control {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-control:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-control[readonly] {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-600);
  cursor: default;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body textarea.form-control {
  resize: vertical;
  min-height: 80px;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body input[type="file"].form-control {
  padding: 6px 12px;
  font-size: 12px;
}

/* Helper text under inputs */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-text {
  margin-top: 4px;
  font-size: 11px;
  color: var(--gr-slate-500);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Form check (radio / checkbox rows) */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin: 0;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-check-input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--gr-green);
  cursor: pointer;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .form-check-label {
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}

/* Spacing between form groups */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .mb-3 {
  margin-bottom: 16px !important;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .mb-3:last-child {
  margin-bottom: 0 !important;
}

/* Footer */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--gr-slate-100);
  background-color: #ffffff;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer:empty {
  display: none;
}

/* Running "Showing X of Y" beside the list-view View more buttons
   (mcrgrrfrontendlistview), the RCH dashboard's reports table and the per-road
   Reports tab (all 2026-09-18) + the county table's Show all link. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body[class*="frontendsingleview"]) .gr-list-count {
  display: inline-block;
  margin-right: 12px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  color: var(--gr-slate-600);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body[class*="frontendsingleview"]) .gr-list-count:empty { display: none; }
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body[class*="frontendsingleview"]) .gr-list-count__all {
  margin-right: 12px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  color: var(--gr-green-dark);
  text-decoration: underline;
  cursor: pointer;
  vertical-align: middle;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body[class*="frontendsingleview"]) .gr-list-count__all:hover { color: var(--gr-green); }
/* Footer buttons. Override Bootstrap .btn defaults + .bg-mustard ugly. */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--gr-radius-full);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
  text-transform: none;
  letter-spacing: 0;
}

/* Primary — brand green pill (overrides .bg-mustard too) */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn-primary,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn.bg-mustard,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn-primary.bg-mustard {
  background-color: var(--gr-green) !important;
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn-primary:hover,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn.bg-mustard:hover {
  background-color: var(--gr-green-dark) !important;
  color: #ffffff !important;
}

/* Secondary — outline grey pill */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn-secondary {
  background-color: #ffffff;
  color: var(--gr-slate-700);
  border: 1px solid var(--gr-slate-200);
  box-shadow: none;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-footer .btn-secondary:hover {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-900);
  border-color: var(--gr-slate-300);
}

/* In-body buttons (e.g. the "Upload" button inside the GPX modal body) */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .btn,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--gr-radius-full);
  background-color: var(--gr-green);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .btn:hover,
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .btn-primary:hover {
  background-color: var(--gr-green-dark);
  color: #ffffff;
}
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-body .btn.bg-mustard {
  background-color: var(--gr-green) !important;
  color: #ffffff !important;
}

/* Modal backdrop — slightly lighter than Bootstrap default */
:is(body.view-grrfrontendmembermapview, :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)) .modal-backdrop.show {
  opacity: 0.4;
}

/* Report Issue form (2026-10-09): the required-field star, and the state of a
   field that failed its check (markup.php, SECTION 7). The star matches the
   account forms'. The red border needs the id: the .form-control rule above is
   (0,3,1) and outranks Bootstrap's .form-control.is-invalid (0,2,0), so without
   it a failed field looked exactly like a good one. Border only, no shadow, for
   the reason given on the account forms (Helix discards input shadows). */
body.view-grrfrontendmembermapview #reportForm .star {
  color: var(--gr-green-dark);
  margin-left: 2px;
}
body.view-grrfrontendmembermapview #reportForm .form-control.is-invalid {
  border-color: #dc2626;
  background-image: none;
}
body.view-grrfrontendmembermapview #reportForm .invalid-feedback {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #b91c1c;
}
body.view-grrfrontendmembermapview #report-form-alert {
  font-size: 13px;
  padding: 10px 12px;
}

/* ============================================================================
   END MEMBER MAP REDESIGN
   ============================================================================ */


/* ============================================================================
   ============================================================================
   SINGLE-RECORD + LIST VIEWS — shared chrome (sidebar, sub-tabs, content
   card, info-trigger) + per-tab content rules. The :is() group above
   matches:
     - all six single-record views (substring match on
       "frontendsingleview"; the suffix is unique in this codebase)
     - the two list views explicitly named (8 other *frontendlistview
       views exist in the codebase but have NOT been audited for this
       design — add by name as they're brought in)

   Single-record views (substring-matched):
     view-grrfrontendsingleview        (Road details — landing tab)
     view-grraccessfrontendsingleview  (Access)
     view-grrdocsimagesfrontendsingleview (Documents / Photos / Videos)
     view-grrnotesfrontendsingleview   (Records Notes)
     view-grrreportsfrontendsingleview (Reports)
     view-grrhistoryfrontendsingleview (History — RCH only)
   List views (named explicitly):
     view-grrfrontendlistview          (Roads / Reports list)
     view-mcrgrrfrontendlistview       (Master County Records list)
     view-reportssummaryfrontendlistview (Reports Summary — admin overview, 2026-09-18)

   Modals: the MODALS block above wraps body.view-grrfrontendmembermapview
   plus this same :is() group via a nested :is(), so all modals on these
   views share one ruleset.
   ============================================================================
   ============================================================================ */

/* ----- Page baseline ----- */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-800);
  font-family: var(--gr-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Body font (Inter) — h1–h6 intentionally excluded; they inherit Arvo
   from the DISPLAY-FONT OVERRIDES block at the top of this file. */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) button,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) input,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) select,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) textarea {
  font-family: var(--gr-font-sans);
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #sp-footer,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #sp-bottom,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #sp-section-1,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #sp-hero {
  display: none !important;
}

/* Header rules used to live here, scoped to
   :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview).
   They were promoted to a sitewide block — see "HEADER — GLOBAL" near the
   top of this file. The rules are no longer duplicated here. */

/* ----- Body padding ----- */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #sp-main-body {
  padding: 24px 16px 64px;
}

/* ----- Top tabs (#myTab1) — pill-style.
   The legacy ultimate-rch tab styling (icon backgrounds, off-screen text,
   400px max-width, -50px margin on .tab-content) was commented out
   directly in templates/ultimate-rch/css/custom.css, so these rules don't
   need !important to win. */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #myTab1.nav-tabs.main {
  display: flex;
  gap: 4px;
  padding: 0 0 16px 0;
  margin: 0;
  border: none;
  list-style: none;
  background: transparent;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #myTab1 .nav-item {
  margin: 0;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #myTab1 .nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--gr-font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--gr-slate-700);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-full);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #myTab1 .nav-link:hover {
  background-color: var(--gr-slate-50);
  border-color: var(--gr-slate-300);
  color: var(--gr-slate-900);
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #myTab1 .nav-link.active {
  background-color: var(--gr-green);
  border-color: var(--gr-green);
  color: #ffffff;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #myTab1 .nav-link.active:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}

/* ----- Left sidebar ----- */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .left-sub-menu-holder {
  padding: 0 8px 0 0 !important;
  margin-top: 0 !important;
  display: flex;
  flex-direction: column;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .left-sub-menu-holder.pt-5,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .left-sub-menu-holder.mt-5 {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #theLeftMenu {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: var(--gr-shadow-glass);
  padding: 16px;
  height: auto;
  min-height: 0;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #theLeftMenu .form-control-holder {
  margin: 0 0 8px 0;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #theLeftMenu .dropper {
  width: 100%;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #theLeftMenu .select select {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #theLeftMenu .select select:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}

/* The previous sidebar `.left-sub-menu` ruleset (column-flex vertical
   list, block nav-links) was removed. The sub-tabs were moved out of
   the sidebar to the top of the .record-view-details card and are
   now styled as horizontal pills under #record-sub-tabs above. */

/* Sidebar logos */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .logos {
  margin-top: 24px !important;
  padding-top: 16px;
  border-top: 1px solid var(--gr-slate-100);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .logos .trf-logo {
  width: auto;
  margin: 0 !important;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .logos .trf-logo:hover {
  opacity: 1;
}

/* ----- Main content (.col-lg-9.bg-grey) ----- */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .bg-grey {
  background-color: transparent !important;
  padding: 0 !important;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: var(--gr-shadow-glass);
  padding: 24px;
  position: relative;
}

/* Section heading (used by individual tabs that still emit a top H3) */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details h3:not(.italic):first-of-type {
  font-family: var(--gr-font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gr-slate-900);
  margin: 0 0 20px 0;
}

/* Sub-tab nav at the top of the content card — moved here from the
   left sidebar so the user can switch between sibling single-record
   views (Road details / Access / Documents / Notes / Reports / History)
   for the same road. Each tab is a real link to a different view, not
   an in-page tab toggle. The active tab is marked server-side with
   .active by the existing markup. */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0 0 20px 0;
  margin: 0 0 20px 0;
  border: none;
  border-bottom: 1px solid var(--gr-slate-100);
  list-style: none;
  overflow-x: auto;            /* graceful scroll if it ever does overflow */
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs .nav-item {
  display: inline-flex;        /* shrink to content; default li would fill row */
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  background: transparent;     /* defeat any inherited bg from legacy rules */
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs .nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--gr-slate-600);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--gr-radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs .nav-link span {
  display: inline;
  position: static;            /* legacy rule pushes spans off-screen */
  width: auto;
  height: auto;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: inherit;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs .nav-link:hover {
  background-color: var(--gr-slate-50);
  border-color: var(--gr-slate-200);
  color: var(--gr-slate-900);
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs .nav-link.active {
  background-color: var(--gr-green);
  border-color: var(--gr-green);
  color: #ffffff;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details #record-sub-tabs .nav-link.active:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}

/* Field rows: <p><span>Label:</span> Value</p> */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details p {
  margin: 0 0 14px 0;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  line-height: 1.4;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details p > span {
  display: block;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px 0;
}

/* Editable inline inputs */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input.rch_input,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input[type="text"],
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input[type="email"],
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input[type="url"],
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details textarea {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-top: 4px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input.rch_input:focus,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input[type="text"]:focus,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input[type="email"]:focus,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details input[type="url"]:focus,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details textarea:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details textarea {
  resize: vertical;
  min-height: 80px;
}

/* Selects */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-control-holder {
  margin: 0 0 14px 0;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-control-holder > span {
  display: block;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px 0;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .select select,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details select.form-control,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details select {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details select:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}

/* Checkbox/radio groups — wrap each .form-control-holder that contains
   .form-check rows in a subtle outline card so the three flag-groups
   (Highway classification / Protected landscape / Surface type) read as
   distinct sections rather than one long stream. The :has() selector
   only matches checkbox-group holders, leaving the dropdown holders
   (county / HA / HA-ref) untouched. */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-control-holder:has(.form-check) {
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-md);
  padding: 14px;
  margin-bottom: 12px;
  background-color: #ffffff;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-control-holder:has(.form-check) > span {
  margin-bottom: 10px;
}

/* Checkboxes / radios */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 6px 0;
  padding: 0;
  width: 100%;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-check-input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--gr-green);
  cursor: pointer;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .form-check-label {
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}

/* Action buttons (UPDATE etc.) */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .btn,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .btn-primary,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .bg-mustard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  background-color: var(--gr-green) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--gr-radius-full) !important;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  transition: background-color 0.15s ease;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .btn:hover,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .btn-primary:hover,
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .bg-mustard:hover {
  background-color: var(--gr-green-dark) !important;
  color: #ffffff !important;
}

/* Floating "i" info trigger top-right */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .info-trigger {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-full);
  background-color: #ffffff;
  color: var(--gr-slate-600);
  text-decoration: none;
  z-index: 5;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .info-trigger:hover {
  color: var(--gr-green-dark);
  border-color: var(--gr-green-soft-2);
  background-color: var(--gr-slate-50);
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .record-view-details .info-trigger h3 {
  margin: 0;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
  color: inherit;
  line-height: 1;
}

/* Loader overlay */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #loader.lds-dual-ring.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  z-index: 10;
}
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) #loader.lds-dual-ring.overlay::after {
  width: 36px;
  height: 36px;
  margin: 6px;
  border-color: var(--gr-green) transparent var(--gr-green) transparent;
}

/* Inline map preview — subtle outline card with small padding so the
   Leaflet canvas sits inside a clean frame. The canvas itself stays
   untouched (its own width/height inline styles win).
   Now lives in the LEFT sidebar (between the filter dropdowns and the
   logos block) on grrfrontendsingleview, so the selector dropped its
   .record-view-details ancestor. The .details-map class is unique
   enough that scoping by view body class is sufficient. */
:is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview) .details-map {
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-md);
  padding: 8px;
  background-color: #ffffff;
  overflow: hidden;
  margin-top: 8px;
}
/* Map height tweak for the sidebar — the inline `height:414px` is fine
   for the old half-width right-column layout but feels stretched in the
   narrower sidebar. Override to a more compact 240px without touching
   the inline style (which would break responsiveness elsewhere). */
:is(body[class*="frontendsingleview"]) .left-sub-menu-holder .details-map #mapSINGLE {
  height: 240px !important;
}

/* ============================================================================
   END SINGLE RECORD VIEW
   ============================================================================ */


/* ============================================================================
   ============================================================================
   LIST VIEWS — main column (grrfrontendlistview + mcrgrrfrontendlistview)
   Both views share the same chrome primitives — white cards on slate-50
   page bg, filter bar above each table, scroll-wrapped table, brand-green
   pill footer button. mcrgrrfrontendlistview adds an inner pill-tab nav
   (#listviewtabs) and a totals stat-grid below the GRR table.
   The :is() group keeps both view scopes in one selector list. The page
   baseline (slate-50 bg, Inter font, sidebar white card) and the modal
   styling already apply via the SINGLE-RECORD + LIST VIEWS block above —
   no need to repeat them here. The legacy .thead-dark-mustard /
   .bg-mustard rules are NOT touched (still used by other unredesigned
   list views and admin tools).
   ============================================================================
   ============================================================================ */

/* ----- Top page tabs (Dashboard / List View) -----
   Shared between the two list views so the chrome looks the same. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 0 12px 0;
  margin: 0 0 16px 0;
  border: none;
  border-bottom: 1px solid var(--gr-slate-200);
  list-style: none;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main .nav-item {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  background: transparent;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main .nav-link {
  display: inline-block;
  padding: 9px 18px;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--gr-slate-600);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--gr-radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main .nav-link span {
  display: inline;
  position: static;
  width: auto;
  height: auto;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main .nav-link:hover {
  background-color: var(--gr-slate-50);
  border-color: var(--gr-slate-200);
  color: var(--gr-slate-900);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main .nav-link.active {
  background-color: var(--gr-green);
  border-color: var(--gr-green);
  color: #ffffff;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview) ul.nav.nav-tabs.main .nav-link.active:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}

/* ----- Main column container -----
   The .bg-grey / pt-4 / pb-5 utility classes were dropped from the markup,
   so the col-lg-9 sits transparently on the slate-50 page bg by default;
   give it a touch of vertical breathing room. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .col-lg-9 {
  padding: 8px 0 24px 0;
}

/* ----- Dashboard cards stack ----- */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .dashboard-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;            /* let table scroll-wrappers shrink inside */
}

/* ----- One card ----- */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card {
  position: relative;      /* anchor for absolute info-trigger */
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
  padding: 20px 24px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;            /* let inner scroll wrap shrink */
}

/* Card header: title (left) + info-trigger (right) */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__title {
  font-family: var(--gr-font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gr-slate-900);
  margin: 0;
}

/* Inline "i" info-trigger inside the card header.
   The single-record view styles .info-trigger with position: absolute
   top/right; in the list view we want it inline to the right of the
   title, so we reset the absolute positioning. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card .info-trigger {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-full);
  background-color: #ffffff;
  color: var(--gr-slate-600);
  text-decoration: none;
  flex: 0 0 auto;
  transition: color 0.15s ease, border-color 0.15s ease,
              background-color 0.15s ease;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card .info-trigger:hover {
  color: var(--gr-green-dark);
  border-color: var(--gr-green-soft-2);
  background-color: var(--gr-slate-50);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card .info-trigger h3 {
  margin: 0;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 600;
  font-style: normal;
  color: inherit;
  line-height: 1;
}

/* ----- Filter bar above the table ----- */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 0;
  margin: 0;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  flex: 1 1 220px;          /* grow but don't run away */
  max-width: 320px;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-filter label {
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-filter__select {
  display: block;
  width: 100%;
  padding: 8px 36px 8px 12px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-filter__select:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}

/* ----- Table scroll wrapper -----
   Negative side margin pulls the scroll edge to the card's edge so the
   shadow-on-scroll feels intentional. Padding inside re-creates the gap. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-table-scroll {
  margin: 0 -8px;
  padding: 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ----- Table itself ----- */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table {
  width: 100%;
  margin: 0;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  color: var(--gr-slate-700);
  border-collapse: separate;
  border-spacing: 0;
}
/* Override legacy .thead-dark-mustard (yellow) without !important */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table thead.thead-dark-mustard,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table thead {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-700);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table thead th {
  padding: 10px 12px;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  background-color: var(--gr-slate-50);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  border-top: 1px solid var(--gr-slate-100);
  border-bottom: 1px solid var(--gr-slate-200);
  white-space: nowrap;
  vertical-align: middle;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table thead th:first-child {
  border-top-left-radius: var(--gr-radius-sm);
  border-left: 1px solid var(--gr-slate-100);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table thead th:last-child {
  border-top-right-radius: var(--gr-radius-sm);
  border-right: 1px solid var(--gr-slate-100);
}
/* Force cells to stretch to row height — the well-known
   `tr { height: 1px } + td { height: 100% }` trick. Without it,
   `border-collapse: separate` leaves short cells (e.g. an action cell
   whose 36px buttons are dwarfed by a User cell that wraps to 84px)
   with a 49px-tall box; the cell's background colour only covers that
   49px and an empty strip below it shows the tr/tbody behind. With
   the trick, every td's box matches the row height so backgrounds
   (white in rest, transparent letting the tr-hover slate-50 show
   through on hover) stretch uniformly across the row. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody tr {
  height: 1px;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td {
  height: 100%;
  padding: 12px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  color: var(--gr-slate-700);
  border-bottom: 1px solid var(--gr-slate-100);
  vertical-align: middle;
  background-color: #ffffff;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td:first-child {
  border-left: 1px solid var(--gr-slate-100);
  font-weight: 500;
  color: var(--gr-slate-900);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td:last-child {
  border-right: 1px solid var(--gr-slate-100);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody tr:last-child td {
  border-bottom: 1px solid var(--gr-slate-200);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--gr-radius-sm);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--gr-radius-sm);
}
/* Defeat Bootstrap 5's .table-striped row tinting cleanly. Bootstrap
   doesn't just set `background-color: striped` on alternate rows — it
   stacks a `background-image: linear-gradient(--bs-table-bg-type, ...)`
   overlay on EVERY cell and toggles the variable on odd rows. So:
     - my `background-color: #ffffff` only sets the BASE colour
     - the gradient overlay on top still tints odd rows
     - cells whose content has its own bg (e.g. .btn-outline-* in the
       Actions column) cover the gradient, the rest don't → visible
       per-cell inconsistency
   Fix: zero the BS gradient variables on the table itself so the
   overlay resolves to transparent for every row, then my white base
   wins uniformly. ----------------------------------------------- */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table {
  --bs-table-bg: #ffffff;
  --bs-table-bg-type: transparent;
  --bs-table-color-type: var(--gr-slate-700);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody > tr > * {
  background-image: none;       /* defeat the BS gradient overlay */
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody tr:nth-of-type(odd) > td:first-child {
  color: var(--gr-slate-900);   /* keep the row-label first-cell emphasis */
}
/* Hover state: full row tinted slate-50.
   We put the hover background on the <tr> itself (not the tds) and
   make the tds transparent on hover so the tr's background shows
   through across the FULL row height. Without this trick, cells whose
   content is shorter than the row (e.g. an Actions cell with 36px
   icon-buttons in a row whose User cell wraps to 84px) have a cell box
   that only covers their own 49px content area — leaving a visible
   empty strip below where the hover colour doesn't reach. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table.table-hover tbody tr:hover {
  background-color: var(--gr-slate-50);
  cursor: pointer;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table.table-hover tbody tr:hover > td,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table.table-hover tbody tr:hover > * {
  background-color: transparent;
  color: var(--gr-slate-900);
}
/* Links inside table cells */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td a {
  color: var(--gr-green-dark);
  text-decoration: none;
  font-weight: 500;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td a:hover {
  text-decoration: underline;
}

/* ----- "Public" lozenge — Reports table USER cell. A report filed by a
   Public Member (group 14, no TRF number); rendered by
   grrreportsfrontendsingleview/tmpl/markup.php from reporter_public (1.0.49).
   Green-soft on green-dark, the site's own tokens, so it reads as a label,
   not a warning. ----- */
.grr-public-lozenge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--gr-radius-full);
  background: var(--gr-green-soft);
  color: var(--gr-green-dark);
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-family: var(--gr-font-sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
/* ----- Per-row action buttons (Reports table: Edit / Toggle-publish /
   Archive / Delete). Rendered by JS into the trailing .text-end td.
   Bootstrap's `btn-sm` made them undersized for the row; lay them out
   as a tight flex row of square 32×32 icon buttons that fill the row
   height with consistent slate borders. ------------------------------ */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end {
  white-space: nowrap;
  text-align: end;
  padding-top: 6px;
  padding-bottom: 6px;
}
/* Container behaviour: the buttons live as inline siblings with `me-2`
   margin from Bootstrap. Replace that with a clean flex row + gap so
   spacing is uniform and the row right-aligns inside the cell. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end {
  /* td can't be display:flex without breaking layout; use line-height
     trick + inline-flex on the buttons themselves below. */
  vertical-align: middle;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-edit-report,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-toggle-publish,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-archive-report,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-delete-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0 0 0 4px;       /* small gap between buttons; replaces `me-2` */
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  background-color: #ffffff;
  color: var(--gr-slate-700);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease;
}
/* First button doesn't need the leading gap. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end > .btn:first-child {
  margin-left: 0;
}
/* Per-action accent on hover — green for edit/publish, slate for
   archive, red for delete. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-edit-report:hover,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-toggle-publish:hover {
  color: var(--gr-green-dark);
  border-color: var(--gr-green-soft-2);
  background-color: var(--gr-green-soft);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-archive-report:hover {
  color: var(--gr-slate-900);
  border-color: var(--gr-slate-300);
  background-color: var(--gr-slate-100);
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-table tbody td.text-end .btn-delete-report:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background-color: #fef2f2;
}

/* ----- Card footer (button row) -----
   Two-zone flex: the optional .gr-doc-toolbar (member-editor only)
   sits on the left; the View More button sits on the right. When
   .gr-doc-toolbar is absent, the View More button is pushed right
   on its own (since it's the only flex item). On narrow viewports
   the row wraps and the toolbar drops above the View More button. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
}
/* Push the View More button to the right when the toolbar is also
   present; when the toolbar is absent, the button still sits at the
   right end of the row thanks to space-between's degenerate behaviour. */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer > .gr-btn {
  margin-left: auto;
}
/* Brand-green pill button — overrides legacy .btn.btn-primary.bg-mustard */
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer .gr-btn,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer .gr-btn.bg-mustard,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer .gr-btn.btn-primary,
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer .gr-btn.btn-primary.bg-mustard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  background-color: var(--gr-green);
  border: 1px solid var(--gr-green);
  border-radius: var(--gr-radius-full);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer .gr-btn:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}
:is(body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview, body[class*="frontendsingleview"]) .gr-list-card__footer .gr-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gr-green-soft),
              0 1px 2px 0 rgba(34, 197, 94, 0.18);
}

/* ----- mcrgrrfrontendlistview-only chrome -----
   The MCR list view wraps everything in ONE card; its header contains
   the inner pill-tab nav (#listviewtabs) so it sits visually flush
   with the card edge. The info-trigger floats to the right of the
   tabs. The MCR/GRR tab panes share the .gr-list-card styling above.
   ----------------------------------------------------------------- */

/* Push the .info-trigger to the right of the tabs in the card header,
   and let the tabs take all remaining horizontal space. */
body.view-mcrgrrfrontendlistview .gr-list-card__header {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: -4px 0 -4px 0;
}
body.view-mcrgrrfrontendlistview .gr-list-card__header > #listviewtabs {
  flex: 1 1 auto;
  min-width: 0;
}

/* Inner pill tabs */
body.view-mcrgrrfrontendlistview #listviewtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  margin: 0;
  border: none;
  list-style: none;
}
body.view-mcrgrrfrontendlistview #listviewtabs .nav-item {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  background: transparent;
}
body.view-mcrgrrfrontendlistview #listviewtabs .nav-link {
  display: inline-block;
  padding: 8px 16px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--gr-slate-600);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--gr-radius-full);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease;
}
body.view-mcrgrrfrontendlistview #listviewtabs .nav-link span {
  display: inline;
  position: static;
  width: auto;
  height: auto;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: inherit;
  color: inherit;
}
body.view-mcrgrrfrontendlistview #listviewtabs .nav-link:hover {
  background-color: var(--gr-slate-50);
  border-color: var(--gr-slate-200);
  color: var(--gr-slate-900);
}
body.view-mcrgrrfrontendlistview #listviewtabs .nav-link.active {
  background-color: var(--gr-green);
  border-color: var(--gr-green);
  color: #ffffff;
}
body.view-mcrgrrfrontendlistview #listviewtabs .nav-link.active:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}

/* Tab content + panes inside the listview card. Each pane has its own
   filter bar + table + footer button (+ totals on GRR), stacked. */
body.view-mcrgrrfrontendlistview .gr-list-card .tab-content {
  display: flex;
  flex-direction: column;
}
body.view-mcrgrrfrontendlistview .gr-list-card .tab-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}
body.view-mcrgrrfrontendlistview .gr-list-card .tab-pane.active,
body.view-mcrgrrfrontendlistview .gr-list-card .tab-pane.show.active {
  display: flex;
}

/* The <th> on Modified columns is sortable (.grr-sortable). Show the
   user it's clickable and give the sort arrow a clean Inter look. */
body.view-mcrgrrfrontendlistview .gr-list-table .grr-sortable {
  cursor: pointer;
  user-select: none;
}
body.view-mcrgrrfrontendlistview .gr-list-table .grr-sortable .sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: var(--gr-slate-400);
  vertical-align: middle;
}
body.view-mcrgrrfrontendlistview .gr-list-table .grr-sortable[data-sort-dir="asc"] .sort-arrow::before  { content: "▲"; color: var(--gr-green-dark); }
body.view-mcrgrrfrontendlistview .gr-list-table .grr-sortable[data-sort-dir="desc"] .sort-arrow::before { content: "▼"; color: var(--gr-green-dark); }
body.view-mcrgrrfrontendlistview .gr-list-table .grr-sortable[data-sort-dir=""]    .sort-arrow::before  { content: "▲▼"; letter-spacing: -1px; opacity: 0.4; }

/* Member-editor checkbox/radio column — leading <th> when $member_editor.
   The legacy template has an unscoped `thead th { width: 15%; }` rule
   that lands a 15% width hint on the empty select <th>, which makes the
   column wider than it should be. Counter it with the standard
   shrink-to-content pattern: width:1% + white-space:nowrap on BOTH the
   header AND the matching tbody first-cell (only applied to the MCR
   table, since GRR has no select column). */
body.view-mcrgrrfrontendlistview #intital_load_mcr .gr-list-table__select-col,
body.view-mcrgrrfrontendlistview #intital_load_mcr.gr-list-table thead th.gr-list-table__select-col,
body.view-mcrgrrfrontendlistview #intital_load_mcr.gr-list-table tbody td:first-child {
  width: 1%;
  white-space: nowrap;
  padding-left: 14px;
  padding-right: 8px;
  text-align: center;
}
/* Reset our generic "first-cell is the row label" styling for the MCR
   table, where the first cell is just a checkbox/radio control. */
body.view-mcrgrrfrontendlistview #intital_load_mcr.gr-list-table tbody td:first-child {
  font-weight: 400;
  color: var(--gr-slate-700);
}

/* ----- Totals stat grid (GRR tab only) ----- */
body.view-mcrgrrfrontendlistview .gr-totals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 0 0;
  padding: 16px 0 0 0;
  border-top: 1px solid var(--gr-slate-100);
}
body.view-mcrgrrfrontendlistview .gr-totals__heading-row {
  margin: 4px 0 0 0;
}
body.view-mcrgrrfrontendlistview .gr-totals__heading {
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gr-slate-500);
  margin: 0 0 4px 0;
}
body.view-mcrgrrfrontendlistview .gr-totals__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
body.view-mcrgrrfrontendlistview .gr-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background-color: var(--gr-slate-50);
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-md);
  min-width: 0;
}
body.view-mcrgrrfrontendlistview .gr-stat__label {
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
body.view-mcrgrrfrontendlistview .gr-stat__value {
  font-family: var(--gr-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gr-slate-900);
  line-height: 1.1;
  letter-spacing: 0;
  word-break: break-word;
}
body.view-mcrgrrfrontendlistview .gr-stat__sub {
  display: flex;
  flex-direction: column;
  font-family: var(--gr-font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--gr-slate-600);
  line-height: 1.3;
}
/* The .total_length wrapper span is hollowed out via display:contents so
   its children (the .m-val + .mi-val emitted by getSum()) become direct
   flex items and stack under the "Total length:" text node above. Keep
   it readable on browsers that don't support display:contents — the
   children would just inline-stack without explicit line breaks. */
body.view-mcrgrrfrontendlistview .gr-stat__sub > span {
  display: contents;
}
body.view-mcrgrrfrontendlistview .gr-stat__sub .m-val {
  display: block;
  color: var(--gr-slate-900);
  font-weight: 600;
}
body.view-mcrgrrfrontendlistview .gr-stat__sub .mi-val {
  display: block;
  color: var(--gr-slate-400);
  font-weight: 500;
}

/* ----- Sitewide doc-toolbar pattern -----
   Reusable "controls in a row" toolbar with primary / danger / disabled
   button variants and a hover-only tooltip on disabled buttons. NOT
   scoped to a body class so it works on any page where design-system.css
   is loaded (the grmdesign system plugin loads it on every frontend
   page).

   Specificity uses the `.gr-doc-toolbar .gr-doc-toolbar__btn` descendant
   pattern so the buttons beat the legacy `.doc-buttons a` rule
   (specificity 0,0,1,1) without needing !important. The companion JS
   click guard at media/plg_system_grmdesign/js/disabled-guard.js makes
   the disabled state actually block clicks (the CSS keeps pointer
   events on so the hover tooltip can still fire). ---------------- */
.gr-doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.gr-doc-toolbar.d-none {
  /* keep Bootstrap d-none working for tab-switching JS */
  display: none !important;
}
.gr-doc-toolbar .gr-doc-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* Reset the legacy `.doc-buttons a` rules that forced these anchors
     into 30×30 SVG-icon-background buttons. We want a normal pill. */
  width: auto;
  height: auto;
  min-width: 0;
  background-image: none;
  padding: 8px 16px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  background-color: var(--gr-green);
  border: 1px solid var(--gr-green);
  border-radius: var(--gr-radius-full);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  transition: background-color 0.15s ease, border-color 0.15s ease,
              color 0.15s ease;
}
.gr-doc-toolbar .gr-doc-toolbar__btn:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
  text-decoration: none;
}
/* Zero out margins. Specifically defeats the legacy
   `.doc-buttons a:first-child { margin-bottom: 5px }` rule (specificity
   0,0,2,1) which was for the old stacked-icon layout — without this
   override the first button's margin-bottom shifts the flex row's
   cross-axis centre and the buttons render misaligned vertically. */
.gr-doc-toolbar .gr-doc-toolbar__btn,
.gr-doc-toolbar .gr-doc-toolbar__btn:first-child,
.gr-doc-toolbar .gr-doc-toolbar__btn:last-child {
  margin: 0;
}
/* Danger variant for delete actions */
.gr-doc-toolbar .gr-doc-toolbar__btn--danger {
  background-color: #ffffff;
  color: #b91c1c;
  border-color: #fecaca;
  box-shadow: none;
}
.gr-doc-toolbar .gr-doc-toolbar__btn--danger:hover {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}
/* Disabled state — applied alongside another modifier (e.g. --danger).
   Source-ordered AFTER --danger so a button with both classes shows
   the muted grey treatment. JS strips this class to "enable" the
   button (e.g. when an MCR row is selected).
   We do NOT use pointer-events: none here because we want :hover to
   fire so the data-tooltip rule below shows the "why disabled" hint.
   Click is blocked by media/plg_system_grmdesign/js/disabled-guard.js. */
.gr-doc-toolbar .gr-doc-toolbar__btn--disabled {
  position: relative;
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-500);
  border-color: var(--gr-slate-200);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}
.gr-doc-toolbar .gr-doc-toolbar__btn--disabled:hover {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-500);
  border-color: var(--gr-slate-200);
  opacity: 0.7;
}

/* Tooltip on disabled buttons — uses data-tooltip attribute as content
   so we can keep the native `title` attribute off (avoids the ugly
   delayed browser tooltip showing on top of ours). Slate-900 pill that
   floats above the button with a small caret pointing down to it. */
.gr-doc-toolbar .gr-doc-toolbar__btn--disabled[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--gr-slate-900);
  color: #ffffff;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 10px;
  border-radius: var(--gr-radius-sm);
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  opacity: 1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.18);
}
.gr-doc-toolbar .gr-doc-toolbar__btn--disabled[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--gr-slate-900);
  pointer-events: none;
  z-index: 100;
}

/* ============================================================================
   END LIST VIEW DASHBOARD
   ============================================================================ */


/* ============================================================================
   ============================================================================
   DOC / IMAGE MODALS — Add MCR / Delete MCR / Add image / Delete image
   These modal IDs (#documentAdderModal, #documentDeleterModal,
   #imageDeleterModal, #featured-images-uploader) appear on
   mcrgrrfrontendlistview, grrdocsimagesfrontendsingleview, and
   mcrfrontendlistview. The modal CHROME (header / body / footer / close
   button / inputs.form-control / labels.form-label / footer .btn) is
   already handled by the MODALS block at the top of this file. Rules
   below add design-system polish for the bits the chrome block doesn't
   cover: the bare <select>s in the upload modals, the legacy "Choose a
   file" upload widget (.button-wrap + .new-button + the absolute file
   input), the .progress-wrp progress bar, the .form-row/.form-group
   Bootstrap-4 grid wrappers (Bootstrap 5 dropped .form-row), and the
   danger-styled DELETE confirm button.

   Selectors are ID-scoped to the modals — design-system.css loads
   sitewide so wherever these modal IDs render they pick up these rules
   automatically. ===========================================================
   ============================================================================ */

/* ----- .form-row / .form-group — replace the old Bootstrap 4 grid -----
   Inside our four modals, treat .form-row as a flex row with gap and
   .form-group as a flex item that can hold col-md-X width hints. */
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 12px;
  margin: 0 0 12px 0;
}
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-row:last-child {
  margin-bottom: 0;
}
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-group {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}
/* Honour col-md-X width hints inside our modals (Bootstrap 5 only
   activates these in a real .row > .col grid; here we approximate). */
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-group.col-md-12 { flex: 1 1 100%; }
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-group.col-md-8  { flex: 1 1 60%; }
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-group.col-md-6  { flex: 1 1 calc(50% - 6px); }
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .form-group.col-md-4  { flex: 1 1 30%; }

/* Labels — small uppercase slate, matching the chrome label styling */
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) label:not(.d-none):not(.new-button) {
  display: block;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

/* Bare <select>s in upload modals (no .form-control class).
   Helix Ultimate's compiled template.css has
   `select:not(.form-select):not(.form-control) { padding: .5rem .5rem
   !important; ... border-radius: .25rem }` — the !important on padding
   forces us to use !important too (template.css is build-generated, so
   commenting it out would be lost on the next template rebuild). The
   other longhand overrides win on specificity (the :is() with an ID is
   more specific than the bare element selector). */
:is(#documentAdderModal, #featured-images-uploader) .modal-body select {
  display: block;
  width: 100%;
  padding: 8px 36px 8px 12px !important;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:is(#documentAdderModal, #featured-images-uploader) .modal-body select:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}

/* Disabled "Document Name" / "Image Name" preview input in delete modals.
   This is purely informational — JS fills it with the selected row's name.
   Style it as a subtle read-only display rather than an editable input. */
:is(#documentDeleterModal, #imageDeleterModal) .modal-body input[disabled] {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-700);
  border-color: var(--gr-slate-200);
  font-weight: 500;
  cursor: default;
}

/* Confirmation input ("Type DELETE...") + DELETE button row. The original
   markup uses col-md-8 + col-md-4. With our flex grid above the input
   stretches and the button hugs its content. */
:is(#documentDeleterModal, #imageDeleterModal) .form-control-holder {
  margin: 0;
  padding: 0;
}

/* DELETE confirm buttons — danger styling. Override the
   `.modal-body .btn-primary` brand-green default from the MODALS chrome
   block. ID-targeted so other modal-body buttons stay green. */
#documentDeleterModal #document_deleter,
#imageDeleterModal #image_deleter {
  background-color: #dc2626 !important;       /* override chrome's !important */
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 1px 2px 0 rgba(220, 38, 38, 0.18);
}
#documentDeleterModal #document_deleter:hover,
#imageDeleterModal #image_deleter:hover {
  background-color: #b91c1c !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

/* ----- File upload "Choose a file" widget -----
   Markup: <div class="button-wrap"><label class="new-button"
   for="fileupload">Choose a file</label><input type="file" id="fileupload"></div>
   Override the legacy mustard-yellow .new-button + the absolute-position
   .input#fileupload tricks. Use the modern visually-hidden pattern: the
   <label> looks like a pill button, the <input type="file"> is hidden
   but still clickable via the label's `for` association. */
:is(#documentAdderModal, #featured-images-uploader) .button-wrap {
  position: relative;
  display: inline-block;
  margin: 4px 0 0 0;
}
:is(#documentAdderModal, #featured-images-uploader) .new-button {
  /* Reset the legacy mustard yellow + absolute-positioning hacks */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: static !important;
  padding: 8px 16px !important;
  width: auto !important;
  height: auto !important;
  text-indent: 0 !important;
  z-index: auto;
  /* Design-system secondary pill button */
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--gr-slate-700);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-full);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease;
}
:is(#documentAdderModal, #featured-images-uploader) .new-button:hover {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-900);
  border-color: var(--gr-slate-300);
}
/* Hide the actual file input but keep it click-target for the label.
   Visually-hidden pattern instead of the legacy z-index hack. */
:is(#documentAdderModal, #featured-images-uploader) input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  /* Defeat the legacy `top: 6px; left: 0; z-index: 1`. */
  top: auto !important;
  left: auto !important;
  font-size: 0 !important;
  color: transparent !important;
  opacity: 0;
}

/* The chosen file's name + size, written by the uploader JS on change (2026-10-01).
   Hidden while empty so the row collapses to just the button. */
:is(#documentAdderModal, #featured-images-uploader) .file-chosen {
  display: inline-block;
  margin: 4px 0 0 10px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  color: var(--gr-slate-700);
  vertical-align: middle;
  max-width: 100%;
  overflow-wrap: anywhere;
}
:is(#documentAdderModal, #featured-images-uploader) .file-chosen:empty {
  display: none;
}

/* ----- Progress bar (.progress-wrp) -----
   Override the legacy 30px/grey-border/dark-green-fill styling. Make it
   a slim slate-100 track with a brand-green fill, with the % readout
   centered on top. */
:is(#documentAdderModal, #featured-images-uploader) .modal-footer.progress-part {
  /* The legacy footer had no real action buttons — only the progress
     bar lives in the footer. Hide the empty footer until upload starts;
     show as a single full-width row when it does. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 20px;
  gap: 4px;
}
:is(#documentAdderModal, #featured-images-uploader) .progress-wrp {
  position: relative;
  width: 100%;
  height: 8px;
  margin: 0;
  background-color: var(--gr-slate-100);
  border: none;
  border-radius: var(--gr-radius-full);
  overflow: hidden;
}
:is(#documentAdderModal, #featured-images-uploader) .progress-wrp .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--gr-green);
  transition: width 0.2s ease;
}
:is(#documentAdderModal, #featured-images-uploader) .progress-wrp .status {
  position: static;
  display: block;
  margin: 4px 0 0 0;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

/* The Add modal has a NESTED <form id="uploader"> wrapping the file
   input — invalid HTML but pre-existing. Treat it as a transparent
   wrapper that doesn't add spacing of its own. */
:is(#documentAdderModal, #featured-images-uploader) form#uploader {
  display: contents;
}

/* ----- Form spacing tweaks -----
   The form-row/form-group flex grid above gives nice spacing between
   rows; tighten the modal-body's <form> wrapper to match. */
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .modal-body > form {
  margin: 0;
}
:is(#documentAdderModal, #documentDeleterModal, #imageDeleterModal, #featured-images-uploader) .modal-body > form > .form-row + .form-row {
  margin-top: 4px;
}

/* ============================================================================
   END DOC / IMAGE MODALS
   ============================================================================ */


/* ============================================================================
   GRMUID display — single inline line "GRMUID: 87" rendered above the
   sidebar map (by _partials/single_map.php) on every single-record
   sub-tab. The "GRMUID:" label and the number share the same large
   bold size; only the colour differs (slate-400 label / slate-900
   number) so the eye lands on the road id. ===================== */
:is(body[class*="frontendsingleview"]) .gr-grmuid {
  display: block;
  margin: 16px 0 16px 0;
  padding: 0;
  font-family: var(--gr-font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--gr-slate-900);
  text-align: left;
}
:is(body[class*="frontendsingleview"]) .gr-grmuid > span {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  font-weight: 300;             /* light weight for the label */
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: var(--gr-slate-400);
  margin: 0 4px 0 0;
}


/* ============================================================================
   ============================================================================
   SHARED USER-FORM CHROME — profile edit, login, and account recovery
   Restyle Joomla's stock profile form (rendered by Helix Ultimate's
   override at plugins/system/helixultimate/overrides/com_users/profile/edit.php)
   without touching the markup — that file gets overwritten on Helix
   updates.

   The selector below is the single source of truth for the form chrome —
   labels, inputs, focus ring, checkboxes, alerts, the password toggle and the
   password-strength meter — on FOUR page families, so they cannot drift apart:

     body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind)
       :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form)

   .view-reset / .view-remind / .grm-account-form were added 2026-09-24 for the
   forgot-password and forgot-username pages; their page-level layout (card,
   heading, helper links) lives at the end of this file under
   § ACCOUNT RECOVERY PAGES, and their markup at
   templates/shaper_helixultimate/overrides/com_users/_grm_account_page.php.

   Visual goals: a centered max-width card layout with each form
   <fieldset> as a sub-card section, design-system form controls
   (slate borders, brand-green focus ring), and primary/ghost pill
   buttons in the submit row. ============================================
   ============================================================================ */

body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-800);
  font-family: var(--gr-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Centre the Joomla system message on the profile-edit view. When an admin sets
   "Require password reset", Joomla forces the user here and shows a
   "You are required to reset your password before proceeding" alert — but Helix
   parks #system-message-container as a small bottom-right toast
   (template.css: position:fixed;bottom:0;right:15px;max-width:350px) that users
   miss. Centre it prominently instead. Scoped to this view only, so ordinary
   corner toasts elsewhere are unchanged. Dismissible via the alert's own close
   button; no blocking backdrop, so the reset form stays usable underneath.
   Also the sign-up form and its resend layout (view-registerfrontendview): its
   validation errors ("Please tick at least one interest.") sat bottom-left as a
   toast, easy to miss under a long form — and the login page (view-login), where
   "Your account has been activated" and the login-denied message land (KJ, 2026-09-19).
   And EVERY warning or error, on any page (2026-10-15): "Not found or access
   denied!" (a bad road number → the RCH dashboard) and "You are not authorised
   to view this page" (→ the home page) are the only explanation the user gets
   for being moved, and a tester missed the corner toast on a wide screen.
   Routine "saved" messages elsewhere stay in the corner. */
body:is(.view-profile.layout-edit, .view-registerfrontendview, .view-login, .view-reset, .view-remind) #system-message-container,
#system-message-container:has(joomla-alert[type="warning"], joomla-alert[type="danger"], joomla-alert[type="error"]) {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: calc(100% - 40px);
  max-width: 480px !important;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 100001 !important; /* above the sticky header + session-keeper modals */
}
body:is(.view-profile.layout-edit, .view-registerfrontendview, .view-login, .view-reset, .view-remind) #system-message-container :is(joomla-alert, .joomla-alert),
#system-message-container:has(joomla-alert[type="warning"], joomla-alert[type="danger"], joomla-alert[type="error"]) :is(joomla-alert, .joomla-alert) {
  display: block;
  border-radius: 12px;
  /* A card shadow, not a stage light: the old 24px/64px/40% shadow read as a grey
     band across the form under a "Profile saved." toast (KJ, dev, 2026-09-18). */
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14), 0 1px 3px rgba(15, 23, 42, 0.08);
}
/* .alert-message is what Joomla 5's <joomla-alert> actually holds the text in; .alert alone
   only matched the no-JS fallback, so the 15px never applied (found 2026-10-15). */
body:is(.view-profile.layout-edit, .view-registerfrontendview, .view-login, .view-reset, .view-remind) #system-message-container :is(.alert, .alert-message),
#system-message-container:has(joomla-alert[type="warning"], joomla-alert[type="danger"], joomla-alert[type="error"]) :is(.alert, .alert-message) {
  font-size: 15px !important;
  line-height: 1.5 !important;
}

body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit {
  max-width: 880px;
  margin: 24px auto;
  padding: 0 16px;
}

body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset {
  margin: 0;
  padding: 20px 24px 16px 24px;
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset > legend {
  /* A <legend> defaults to straddling the fieldset's top border, so on a
     card-styled fieldset it sits half-out of the top edge. Floating it full-width
     drops it out of that special rendering and into the card's padding as a normal
     heading. (Float is ignored on grid items, so the grid fieldsets below are
     unaffected; their legend stays a `grid-column: 1 / -1` item.) */
  float: left;
  width: 100%;
  margin: 0 0 16px 0;
  padding: 0;
  font-family: var(--gr-font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gr-slate-900);
  border: none;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset > p {
  margin: -12px 0 16px 0;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  color: var(--gr-slate-500);
  line-height: 1.5;
}
/* First element after the floated legend clears past it (rather than overlapping
   the float). One clear is enough — subsequent rows then stack in normal flow.
   No-op on the grid fieldsets (clear is ignored on grid items).
   The second selector: on the profile-EDIT page the first sibling after the legend
   is Joomla's hidden jform[id] input, so the clear landed on that and the Name
   group flowed up beside the float — a tiny box top-right that looked empty
   (KJ, 2026-09-17). Skip past hidden inputs to the first visible row. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset > legend + *,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset > legend + input[type="hidden"] + * {
  clear: left;
}

/* Joomla field rendering: .control-group > .control-label + .controls.
   Convert from the Bootstrap-2 horizontal pattern (label-left + input-right)
   to a stacked pattern (label above input). */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px 0;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .control-group:last-child {
  margin-bottom: 0;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .control-label {
  margin: 0;
  padding: 0;
  width: auto;
  text-align: left;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .control-label label {
  display: block;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .control-label label.required .star {
  color: var(--gr-green-dark);
  margin-left: 2px;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .controls {
  margin: 0;
  padding: 0;
}

/* Helper text under fields. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-text,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .controls > small,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .controls > .text-muted {
  display: block;
  margin: 4px 0 0 0;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--gr-slate-500);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
}

/* Text-like inputs + selects + textareas. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-control,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) select.form-select,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) textarea.form-control {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--gr-slate-900);
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-control:focus,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) select.form-select:focus,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) textarea.form-control:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}
/* Failed client-side validation. Joomla's form.validate marks the input
   .invalid / .form-control-danger and the label .invalid, but the .form-control
   rule above is (0,3,1) and silently outranked every one of those, so submitting
   an empty required field blocked the post and changed nothing on screen — no
   border, no colour, nothing to look at. Found 2026-09-24 on the reset form; it
   was equally silent on login and profile edit, which is why the fix belongs
   here rather than on one page. The red matches the sign-up form's
   .trfgrn-register__field.is-invalid, so the two agree.

   ⚠️ No box-shadow here, deliberately: Helix's template.css carries
   `input[type="email"] { box-shadow: none !important }` (and the same for the
   other input types), which discards every shadow these rules try to put on an
   input — that is also why the green :focus ring above has never actually
   rendered on any of these pages. Border and colour are what survive. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) :is(.form-control, select.form-select, textarea.form-control):is(.invalid, .form-control-danger) {
  border-color: #dc2626;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .control-label label.invalid {
  color: #b91c1c;
}

body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-control[readonly],
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-control[disabled] {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-600);
  cursor: default;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) textarea.form-control {
  resize: vertical;
  min-height: 90px;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) select.form-select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* Checkboxes and radios (interests etc.). */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin: 0 16px 6px 0;
  min-height: 0;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-check-input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gr-green);
  cursor: pointer;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .form-check-label {
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  line-height: 1.3;
  cursor: pointer;
}

/* Submit row: green pill primary + outline ghost cancel. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit {
  margin: 0;
  padding: 16px 24px;
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit > .mb-3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--gr-radius-full);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit .btn-primary {
  background-color: var(--gr-green);
  color: #ffffff;
  border-color: var(--gr-green);
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit .btn-primary:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit .btn-danger {
  background-color: #ffffff;
  color: var(--gr-slate-700);
  border-color: var(--gr-slate-200);
  box-shadow: none;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .com-users-profile__edit-submit .btn-danger:hover {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-900);
  border-color: var(--gr-slate-300);
}

/* ----- Password input + show/hide toggle.
   Joomla wraps the password input in `.password-group > .input-group`
   with a trailing `<button class="btn btn-secondary input-password-toggle">`
   containing an `<span class="icon-eye">` (the icomoon font isn't loaded
   on this template so the icon span is empty). Lay out the input + button
   as a proper Bootstrap-5 input-group with the button sitting flush on
   the right, and supply an inline-SVG eye icon via the pseudo-element. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group {
  width: 100%;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-group {
  display: flex;
  width: 100%;
  align-items: stretch;
}
/* Override the base .form-control's display:block; width:100% so it can
   share the row with the toggle button inside the input-group. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-group > .form-control {
  flex: 1 1 auto;
  min-width: 0;
  width: 1%;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-group > .form-control:focus {
  /* Keep the focus ring visually contiguous with the toggle button. */
  z-index: 2;
}
/* Show/hide password toggle button. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--gr-slate-200);
  border-left: none;
  border-top-right-radius: var(--gr-radius-sm);
  border-bottom-right-radius: var(--gr-radius-sm);
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-500);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle:hover {
  background-color: var(--gr-slate-100);
  color: var(--gr-slate-700);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle:focus-visible {
  outline: none;
  background-color: var(--gr-slate-100);
  color: var(--gr-slate-700);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
  z-index: 2;
  position: relative;
}
/* Hide the empty icomoon spans inside the button. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle .icon-eye,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle .icon-eye-slash,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle .icon-fw {
  display: none;
}
/* Render an inline-SVG eye icon via the button's ::before. Joomla's JS
   swaps the inner <span>'s class between `icon-eye` and `icon-eye-slash`
   when the user toggles — use :has() to flip the icon accordingly. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/><circle cx='12' cy='12' r='3'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/><circle cx='12' cy='12' r='3'/></svg>");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .input-password-toggle:has(.icon-eye-slash)::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/><path d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/><path d='M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/><line x1='2' y1='2' x2='22' y2='22'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/><path d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/><path d='M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/><line x1='2' y1='2' x2='22' y2='22'/></svg>");
}

/* ----- Password-strength meter.
   Joomla's js-password-strength plugin appends an HTML5 <meter> +
   a label <div id="password-0"> after the .input-group. The native
   <meter> styling is browser-specific (Chrome/Webkit + Firefox have
   different pseudo-elements, and the defaults look like old OS
   progress bars). Restyle as a slim slate-100 track with brand-green
   "strong" fill, amber "weak" fill, and red "very weak" fill. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter {
  display: block;
  width: 100%;
  height: 6px;
  margin: 6px 0 0 0;
  border: none;
  border-radius: var(--gr-radius-full);
  background: var(--gr-slate-100);
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;          /* mask the inner fill to the rounded track */
}
/* The empty/0 state: hide the meter until it has a value. Joomla
   sets value="0" on initial render — render only the empty track. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter:not([value]),
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter[value="0"] {
  /* keep the empty track visible — confirms the meter is there. */
  opacity: 0.5;
}
/* Webkit/Blink track + fill. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter::-webkit-meter-bar {
  background: var(--gr-slate-100);
  border: none;
  border-radius: var(--gr-radius-full);
  height: 6px;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter::-webkit-meter-optimum-value {
  background: var(--gr-green);
  border-radius: var(--gr-radius-full);
  transition: width 0.15s ease;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter::-webkit-meter-suboptimum-value {
  background: #f59e0b;       /* amber */
  border-radius: var(--gr-radius-full);
  transition: width 0.15s ease;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter::-webkit-meter-even-less-good-value {
  background: #dc2626;       /* red */
  border-radius: var(--gr-radius-full);
  transition: width 0.15s ease;
}
/* Firefox track + fill. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter::-moz-meter-bar {
  background: var(--gr-green);
  border-radius: var(--gr-radius-full);
}
/* Firefox doesn't expose level-specific pseudo-elements, so we use
   attribute selectors to switch the bar colour by value range.
   Joomla's meter has low=40 high=99 optimum=100 by default. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter:-moz-meter-sub-optimum::-moz-meter-bar {
  background: #f59e0b;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > meter:-moz-meter-sub-sub-optimum::-moz-meter-bar {
  background: #dc2626;
}

/* The strength-label container. Joomla writes "Weak" / "Medium" /
   "Strong" etc. into it via JS. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .password-group > [id^="password-"] {
  margin: 4px 0 0 0;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 14px;          /* reserve space so the layout doesn't jump */
}

/* Alerts (e.g. the "You do not have a token yet" notice in the
   Joomla API Token fieldset). Replace the stock Bootstrap alert with
   the design-system look. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .alert {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--gr-radius-sm);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .alert.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .alert.alert-info {
  background-color: var(--gr-slate-50);
  border: 1px solid var(--gr-slate-200);
  color: var(--gr-slate-700);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .alert.alert-danger,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .alert.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) .alert.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--gr-green-dark);
}

/* Passkey / WebAuthn plugin section.
   Rendered by plg_system_webauthn inside #plg_system_webauthn-management-interface.
   Style the table + the "Add New Passkey" button consistently with the
   rest of the design system. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn {
  font-family: var(--gr-font-sans);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table {
  width: 100%;
  margin: 0 0 12px 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: var(--gr-slate-700);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table thead {
  background-color: var(--gr-slate-50);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table thead.table-dark {
  /* defeat Bootstrap's dark thead variant — we want slate-50 to match
     the rest of the design system */
  --bs-table-bg: var(--gr-slate-50);
  --bs-table-color: var(--gr-slate-500);
  background-color: var(--gr-slate-50);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table th,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gr-slate-100);
  background-image: none;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  background-color: var(--gr-slate-50);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom-color: var(--gr-slate-200);
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .table td {
  background-color: #ffffff;
}
/* "Add New Passkey" button — green pill (Bootstrap renders it as
   .btn.btn-success.w-100; override the full-width and the BS-green
   palette to match our brand-green pills). */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .btn,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .btn.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  width: auto;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  background-color: var(--gr-green);
  color: #ffffff;
  border: 1px solid var(--gr-green);
  border-radius: var(--gr-radius-full);
  text-transform: none;
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .btn:hover,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) .plg_system_webauthn .btn.btn-success:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}

/* ----- The "Fields" custom-fields card (2026-09-18 rewrite) -----
   The OUTER card is the fieldset whose direct .control-group children hold
   jform[com_fields][…] inputs. The INNER fieldset.checkboxes (Joomla's checkbox
   list for Interests / Other) lives inside one of those groups. The old rules
   keyed both on ids with :has(), which matches every ANCESTOR too — so the
   outer card inherited the checkbox list's auto-fill grid and became five
   narrow columns with the tall Interests list stretching the first row (KJ's
   screenshot, 2026-09-18). Now: outer = 2 columns, Interests spans both,
   Other + Other details are paired, then address / town+county / postcode. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 16px;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > legend,
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > p {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group {
  margin: 0;
  min-width: 0;
}
/* Row order: Interests (full width), Other | Other details, address 1 | 2, town | county, postcode. */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_interests0)      { order: 1; grid-column: 1 / -1; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_other0)          { order: 2; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_other_details)   { order: 3; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_1st_line_of_address) { order: 4; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_2nd_line_of_address) { order: 5; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_city)            { order: 6; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_county)          { order: 7; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_postcode)        { order: 8; }
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_other_details) textarea { min-height: 74px; }

/* The INNER checkbox lists are not cards: strip the fieldset card look they
   inherit from the generic fieldset rule, and lay the boxes out in a wrapping
   grid (Interests: 10 boxes in three or four columns; Other: one box). */
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset.checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  column-gap: 16px;
  row-gap: 4px;
  margin: 0;
  padding: 2px 0 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset.checkboxes > legend {
  grid-column: 1 / -1;
}
body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset.checkboxes > .form-check {
  margin: 0;
  min-height: 30px;
}
@media (max-width: 767.98px) {
  body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) { grid-template-columns: 1fr; }
  body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group { grid-column: auto; }
  body:is(.view-profile.layout-edit, .view-login, .view-reset, .view-remind) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form) fieldset:has(> .control-group [name^="jform[com_fields]"]) > .control-group:has(#jform_com_fields_interests0) { grid-column: auto; }
}

/* ============================================================================
   END USER PROFILE EDIT
   ============================================================================ */


/* ============================================================================
   ============================================================================
   LOGIN PAGE (com_users / view-login)
   Layout: centered narrow card (440px wide) on the slate-50 page bg,
   with "Login" h1 centered above and the form fields stacked.
   Form-control / input-group / password-toggle / password-strength
   chrome is shared with the Profile Edit and account-recovery pages
   (see § SHARED USER-FORM CHROME above). Rules
   below only add the login-specific layout + the bespoke pieces
   (Passkey login button, Login submit, login-helper bottom links).
   ============================================================================
   ============================================================================ */

body.view-login {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-800);
  font-family: var(--gr-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Outer wrapper — narrow centered column. */
body.view-login .com-users-login {
  max-width: 440px;
  margin: 24px auto;
  padding: 0 16px;
}
/* Defeat the Bootstrap `.row .justify-content-center > .col-lg-4`
   that's currently constraining the form to 1/3 of a 12-column grid;
   we want the centered .com-users-login wrapper above to drive width. */
body.view-login .com-users-login > .row {
  margin: 0;
}
body.view-login .com-users-login > .row > [class*="col-"] {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  padding: 0;
}

/* Page heading "Login" */
body.view-login .com-users-login .page-header {
  margin: 0 0 20px 0;
  padding: 0;
  border: none;
  text-align: center;
}
body.view-login .com-users-login .page-header h1 {
  margin: 0;
  font-family: var(--gr-font-display);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gr-slate-900);
}

/* The form itself = a white card. Selector uses the form's ID so it
   beats the widened profile-form rule above (which is :is(.view-profile,
   .view-login) :is(.com-users-profile__edit-form, .com-users-login__form, .grm-account-form)
   = 3 classes, and explicitly sets padding:0 because profile-edit
   wants each fieldset to be its own card — not what we want here). */
body.view-login #com-users-login__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 28px 24px 28px;
  margin: 0;
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* Labels inside the login form — Joomla uses bare <label> not
   wrapped in .control-label here, and emits each field as a `.mb-3`
   block with the <label> as a direct child. */
body.view-login .com-users-login__form > .mb-3 > label,
body.view-login .com-users-login__form .mb-3 > label {
  display: block;
  margin: 0 0 6px 0;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
body.view-login .com-users-login__form label.required .star {
  color: var(--gr-green-dark);
  margin-left: 2px;
}

/* The Joomla form-horizontal/well shell — strip the inherited
   Bootstrap-2 chrome (already done by the design-system form rules
   but emphasise here for clarity). */
body.view-login .com-users-login__form.form-horizontal,
body.view-login .com-users-login__form.well {
  background: #ffffff;
  border: 1px solid var(--gr-slate-100);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* "Remember me" row. */
body.view-login .com-users-login__remember {
  margin: 4px 0;
}
body.view-login .com-users-login__remember .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}
body.view-login .com-users-login__remember .form-check-input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gr-green);
  cursor: pointer;
}
body.view-login .com-users-login__remember .form-check-label {
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}

/* Submit buttons: the primary "Log in" + the secondary "Sign in
   with a passkey". Joomla emits each in its own .control-group >
   .mb-3 wrapper. */
body.view-login .com-users-login__submit {
  margin: 4px 0 0 0;
}
body.view-login .com-users-login__submit .mb-3 {
  margin: 0;
}
body.view-login .com-users-login__submit + .com-users-login__submit {
  margin-top: 8px;
}
body.view-login .com-users-login__submit .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  width: 100%;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--gr-radius-full);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
}
body.view-login .com-users-login__submit .btn-primary {
  background-color: var(--gr-green);
  color: #ffffff;
  border-color: var(--gr-green);
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
}
body.view-login .com-users-login__submit .btn-primary:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
}
/* Passkey button — outline ghost style with the passkey SVG icon
   sized properly. */
body.view-login .com-users-login__submit .plg_system_webauthn_login_button,
body.view-login .com-users-login__submit .btn-secondary {
  background-color: #ffffff;
  color: var(--gr-slate-700);
  border-color: var(--gr-slate-200);
  box-shadow: none;
}
body.view-login .com-users-login__submit .plg_system_webauthn_login_button:hover,
body.view-login .com-users-login__submit .btn-secondary:hover {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-900);
  border-color: var(--gr-slate-300);
}
body.view-login .com-users-login__submit .plg_system_webauthn_login_button svg {
  width: 18px;
  height: 18px;
  min-height: 18px;     /* defeat any inherited line-height-driven stretch */
  max-height: 18px;
  fill: currentColor;
  flex: 0 0 18px;
  align-self: center;
  display: inline-block;
}
/* The plugin's CSS sets `fill: white` on the inner <g> and shape
   children to suit its default coloured button. Override with
   currentColor so the icon takes the button's text colour
   (slate-700 on the outline-ghost variant). */
body.view-login .com-users-login__submit .plg_system_webauthn_login_button svg g,
body.view-login .com-users-login__submit .plg_system_webauthn_login_button svg circle,
body.view-login .com-users-login__submit .plg_system_webauthn_login_button svg path {
  fill: currentColor;
}

/* Reverse the visual order so "Sign in with a passkey" sits below
   the primary "Log in" button (the markup renders passkey FIRST). */
body.view-login .com-users-login__form {
  /* The form is already display:flex / column. Reorder via flex order. */
}
body.view-login .com-users-login__form .com-users-login__submit:has(.btn-primary) {
  order: 10;
}
body.view-login .com-users-login__form .com-users-login__submit:has(.plg_system_webauthn_login_button) {
  order: 20;
}

/* Helper "Forgot your username / password? · Don't have an account?"
   list — Joomla renders these as a <ul class="com-users-login__options
   list-group"> with each <li><a class="...__reset/__remind/__register
   list-group-item"></li>. Strip the BS list-group chrome and stack
   them centered below the form. */
body.view-login .com-users-login__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
}
body.view-login .com-users-login__options > li,
body.view-login .com-users-login__options .list-group-item {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  list-style: none;
  text-align: center;
}
body.view-login .com-users-login__options a {
  display: inline;
  color: var(--gr-green-dark);
  text-decoration: none;
  font-weight: 500;
  background: transparent;
  padding: 0;
}
body.view-login .com-users-login__options a:hover {
  text-decoration: underline;
}

/* ============================================================================
   END LOGIN PAGE
   ============================================================================ */


/* ============================================================================
   ============================================================================
   TILES MANAGEMENT DASHBOARD (mapboxfrontendlistview)
   --------------------------------------------------------------------------
   The markup in components/com_trfgrn/views/mapboxfrontendlistview/tmpl/
   markup.php is Bootstrap-5 native (.card / .nav-tabs / .btn / .alert /
   .list-group). The JS hooks off those class names so we don't rewrite the
   markup — we re-skin BS5 inside body.view-mapboxfrontendlistview only.
   ============================================================================
   ============================================================================ */

body.view-mapboxfrontendlistview #tiles_admin_dashboard {
  margin-top: 1.5rem !important;
  margin-bottom: 2rem !important;
}

/* Card shell */
body.view-mapboxfrontendlistview #tiles_admin_dashboard .card {
  background: #fff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-lg);
  box-shadow: var(--gr-shadow-glass);
  overflow: hidden;
}

/* Card header */
body.view-mapboxfrontendlistview #tiles_admin_dashboard .card-header {
  background: var(--gr-slate-50) !important;
  border-bottom: 1px solid var(--gr-slate-200);
  padding: 1.25rem 1.5rem;
}
body.view-mapboxfrontendlistview #tiles_admin_dashboard .card-header h4 {
  color: var(--gr-slate-900);
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}
body.view-mapboxfrontendlistview #tiles_admin_dashboard .card-header .text-muted {
  color: var(--gr-slate-500) !important;
  font-family: var(--gr-font-sans);
}

/* Limbo-status badge in card-header */
body.view-mapboxfrontendlistview #tiles_admin_dashboard .card-header .badge.bg-secondary {
  background: var(--gr-green-soft) !important;
  color: var(--gr-green-dark) !important;
  border: 1px solid var(--gr-green-soft-2);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.4em 0.85em;
  border-radius: var(--gr-radius-full);
  font-family: var(--gr-font-sans);
}

/* Tabs strip */
body.view-mapboxfrontendlistview #tileTabs.nav-tabs {
  border-bottom: 1px solid var(--gr-slate-200);
  padding: 0.5rem 1.5rem 0;
  margin: 0;
  gap: 0.25rem;
}
body.view-mapboxfrontendlistview #tileTabs .nav-link {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--gr-slate-500);
  font-family: var(--gr-font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 0;
  margin-bottom: -1px;
  transition: color 0.12s ease, border-color 0.12s ease;
}
body.view-mapboxfrontendlistview #tileTabs .nav-link:hover {
  color: var(--gr-green-dark);
  border-bottom-color: var(--gr-green-soft-2);
}
body.view-mapboxfrontendlistview #tileTabs .nav-link.active {
  color: var(--gr-green-dark);
  background: transparent;
  border-bottom-color: var(--gr-green);
}
body.view-mapboxfrontendlistview #tileTabs .nav-link i {
  color: inherit;
}

/* Tab content body */
body.view-mapboxfrontendlistview .tab-content {
  padding: 1.75rem !important;
}
body.view-mapboxfrontendlistview .tab-content h5 {
  color: var(--gr-slate-900);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
body.view-mapboxfrontendlistview .tab-content p.text-muted {
  color: var(--gr-slate-600) !important;
  font-family: var(--gr-font-sans);
}

/* Status alert (#tiles_rebuild_status) */
body.view-mapboxfrontendlistview #tiles_rebuild_status {
  border: 1px solid;
  border-radius: var(--gr-radius-md);
  padding: 1rem 1.25rem;
  box-shadow: none !important;
  font-family: var(--gr-font-sans);
}
body.view-mapboxfrontendlistview #tiles_rebuild_status.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
body.view-mapboxfrontendlistview #tiles_rebuild_status.alert-success {
  background: var(--gr-green-soft);
  border-color: var(--gr-green-soft-2);
  color: var(--gr-green-dark);
}
body.view-mapboxfrontendlistview #tiles_rebuild_status.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
body.view-mapboxfrontendlistview #tiles_rebuild_status .spinner-border {
  color: currentColor;
}
body.view-mapboxfrontendlistview #tiles_rebuild_status .badge {
  background: rgba(255, 255, 255, 0.6) !important;
  color: inherit !important;
  border: 1px solid currentColor;
  font-family: var(--gr-font-sans);
}
body.view-mapboxfrontendlistview #tiles_rebuild_status .text-muted {
  color: currentColor !important;
  opacity: 0.7;
}

/* "Start Full Rebuild" primary button */
body.view-mapboxfrontendlistview #tiles_rebuild_btn.btn-primary {
  background: var(--gr-green);
  border: 1px solid var(--gr-green);
  color: #fff;
  font-family: var(--gr-font-sans);
  font-weight: 600;
  border-radius: var(--gr-radius-full);
  padding: 0.8rem 1.75rem !important;
  font-size: 1rem !important;
  box-shadow: var(--gr-shadow-sm);
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}
body.view-mapboxfrontendlistview #tiles_rebuild_btn.btn-primary:hover:not(:disabled) {
  background: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  box-shadow: 0 4px 12px var(--gr-green-soft-2);
  transform: translateY(-1px);
}
body.view-mapboxfrontendlistview #tiles_rebuild_btn.btn-primary:disabled {
  background: var(--gr-slate-300);
  border-color: var(--gr-slate-300);
  cursor: not-allowed;
  opacity: 0.8;
  transform: none;
  box-shadow: none;
}
body.view-mapboxfrontendlistview #tiles_rebuild_btn.btn-primary:focus-visible {
  outline: 3px solid var(--gr-green-soft-2);
  outline-offset: 2px;
}

/* Details sidebar (.bg-light box) */
body.view-mapboxfrontendlistview .tab-pane .bg-light {
  background: var(--gr-slate-50) !important;
  border: 1px solid var(--gr-slate-200) !important;
  border-radius: var(--gr-radius-md) !important;
  padding: 1.25rem !important;
}
body.view-mapboxfrontendlistview .tab-pane .bg-light h6 {
  color: var(--gr-slate-700);
  font-family: var(--gr-font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
body.view-mapboxfrontendlistview .tab-pane .bg-light ul li {
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gr-slate-200);
}
body.view-mapboxfrontendlistview .tab-pane .bg-light ul li:last-child {
  border-bottom: 0;
}
body.view-mapboxfrontendlistview .tab-pane .bg-light .text-muted {
  color: var(--gr-slate-500) !important;
}
body.view-mapboxfrontendlistview .tab-pane .bg-light .fw-bold {
  color: var(--gr-slate-800);
  font-variant-numeric: tabular-nums;
}

/* History list (#tiles_rebuild_history) */
body.view-mapboxfrontendlistview #tiles_rebuild_history_wrap {
  border: 1px solid var(--gr-slate-200) !important;
  border-radius: var(--gr-radius-md) !important;
  box-shadow: none !important;
  overflow: hidden;
}
body.view-mapboxfrontendlistview #tiles_rebuild_history .list-group-item {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--gr-slate-200);
  padding: 1rem 1.25rem;
}
body.view-mapboxfrontendlistview #tiles_rebuild_history .list-group-item:last-child {
  border-bottom: 0;
}
body.view-mapboxfrontendlistview #tiles_rebuild_history .list-group-item:hover {
  background: var(--gr-slate-50);
}
body.view-mapboxfrontendlistview #tiles_rebuild_history .fw-bold {
  color: var(--gr-slate-800);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
}
body.view-mapboxfrontendlistview #tiles_rebuild_history .text-muted {
  color: var(--gr-slate-500) !important;
  font-family: var(--gr-font-sans);
}

/* Rollback button */
body.view-mapboxfrontendlistview .tiles_rollback_btn.btn-outline-warning {
  background: #fff;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-family: var(--gr-font-sans);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--gr-radius-full);
  box-shadow: none !important;
  transition: background 0.12s ease, color 0.12s ease;
}
body.view-mapboxfrontendlistview .tiles_rollback_btn.btn-outline-warning:hover {
  background: #fef3c7;
  color: #78350f;
  border-color: #f59e0b;
}
body.view-mapboxfrontendlistview #tiles_rebuild_history .p-4.text-center {
  color: var(--gr-slate-500);
  padding: 1.5rem !important;
}

/* Card footer */
body.view-mapboxfrontendlistview #tiles_admin_dashboard .card-footer {
  background: var(--gr-slate-50) !important;
  border-top: 1px solid var(--gr-slate-200);
  color: var(--gr-slate-500) !important;
  font-family: var(--gr-font-sans);
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
}

/* Bootstrap tooltip — use design-system look */
body.view-mapboxfrontendlistview ~ .tooltip .tooltip-inner,
body.view-mapboxfrontendlistview .tooltip .tooltip-inner {
  background: var(--gr-slate-900);
  font-family: var(--gr-font-sans);
  font-size: 0.82rem;
  border-radius: var(--gr-radius-sm);
  max-width: 360px;
  padding: 0.6rem 0.8rem;
  line-height: 1.45;
}

/* Limbo Table tab — Bootstrap 5 .table sat inside a wrapper
   div.border.rounded.bg-white.shadow-sm. Reskin both to use the
   design-system tokens. */
body.view-mapboxfrontendlistview #limbo .border.rounded {
  border: 1px solid var(--gr-slate-200) !important;
  border-radius: var(--gr-radius-md) !important;
  box-shadow: var(--gr-shadow-sm) !important;
  background: #ffffff !important;
}
body.view-mapboxfrontendlistview #limbo .table {
  margin: 0;
  font-family: var(--gr-font-sans);
  font-size: 0.92rem;
  color: var(--gr-slate-700);
  border-collapse: separate;
  border-spacing: 0;
}
body.view-mapboxfrontendlistview #limbo .table thead.table-light th {
  background: var(--gr-slate-100);
  color: var(--gr-slate-700);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 0;
  border-bottom: 1px solid var(--gr-slate-200);
  padding: 10px 14px;
  vertical-align: middle;
}
body.view-mapboxfrontendlistview #limbo .table tbody td {
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--gr-slate-200);
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--gr-slate-700);
  vertical-align: middle;
}
body.view-mapboxfrontendlistview #limbo .table tbody tr:last-child td {
  border-bottom: 0;
}
/* Defeat Bootstrap's table-striped overlay if it's ever toggled on. */
body.view-mapboxfrontendlistview #limbo .table.table-striped tbody tr:nth-of-type(odd) td,
body.view-mapboxfrontendlistview #limbo .table.table-hover tbody tr:hover td {
  --bs-table-bg-type: transparent;
  background-image: none;
}
body.view-mapboxfrontendlistview #limbo .table.table-hover tbody tr:hover td {
  background: var(--gr-green-soft);
  color: var(--gr-slate-900);
}
/* GRMUID column — monospace + brand-green anchor for the link */
body.view-mapboxfrontendlistview #limbo .table tbody td:first-child {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 600;
}
/* Anchor links in cells carry Bootstrap utility classes `fw-bold
   text-primary` which use !important — we have to match. */
body.view-mapboxfrontendlistview #limbo .table tbody td a,
body.view-mapboxfrontendlistview #limbo .table tbody td a.text-primary {
  color: var(--gr-green-dark) !important;
  text-decoration: none;
  font-weight: 600 !important;
  transition: color 0.12s ease;
}
body.view-mapboxfrontendlistview #limbo .table tbody td a:hover,
body.view-mapboxfrontendlistview #limbo .table tbody td a.text-primary:hover {
  color: var(--gr-green) !important;
  text-decoration: underline;
}
/* Numeric / date columns get tabular-nums so they line up cleanly. */
body.view-mapboxfrontendlistview #limbo .table tbody td:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--gr-slate-500);
  font-size: 0.86rem;
  white-space: nowrap;
}

/* ============================================================================
   END TILES MANAGEMENT DASHBOARD
   ============================================================================ */


/* ============================================================================
   ============================================================================
   PER-PAGE OVERRIDES
   --------------------------------------------------------------------------
   Page-specific tweaks scoped via Joomla's body classes. Joomla adds an
   `itemid-N` class to <body> for every page; we use that to scope rules to
   a single menu item without touching its template. Add new pages as their
   own block below the homepage.
   ============================================================================
   ============================================================================ */

/* ----- Page-builder pages with members-only gating ------------------------
   Itemid=1925 (page id=42), Itemid=2010 (page id=49),
   Itemid=2011 (page id=48). Behind login so we can't live-inspect from
   a guest session; rule is broad: every button-like element gets the
   rounded-full pill radius that's now the canonical look across the site. */
body.itemid-1925 button,
body.itemid-1925 .btn,
body.itemid-1925 .sppb-btn,
body.itemid-1925 input[type="button"],
body.itemid-1925 input[type="submit"],
body.itemid-2010 button,
body.itemid-2010 .btn,
body.itemid-2010 .sppb-btn,
body.itemid-2010 input[type="button"],
body.itemid-2010 input[type="submit"],
body.itemid-2011 button,
body.itemid-2011 .btn,
body.itemid-2011 .sppb-btn,
body.itemid-2011 input[type="button"],
body.itemid-2011 input[type="submit"] {
  border-radius: var(--gr-radius-full);
}


/* ----- com_trfgrn admin/utility views: tilesusage / gpx-tool / mapbox -----
   All three were styled into design-system cards earlier. Round their
   buttons to the canonical pill shape too. Targets every BEM-named
   action button on those views plus generic .btn / button. */
body.view-tilesusagefrontendlistview button,
body.view-tilesusagefrontendlistview .btn,
body.view-tilesusagefrontendlistview .sppb-btn,
body.view-tilesusagefrontendlistview .trfgrn-tiles-usage__submit,
body.view-tilesusagefrontendlistview input[type="button"],
body.view-tilesusagefrontendlistview input[type="submit"],
body.view-gpxtoolfrontendview button,
body.view-gpxtoolfrontendview .btn,
body.view-gpxtoolfrontendview .sppb-btn,
body.view-gpxtoolfrontendview .trfgrn-gpx-tool__extract-btn,
body.view-gpxtoolfrontendview .trfgrn-gpx-tool__copy-btn,
body.view-gpxtoolfrontendview input[type="button"],
body.view-gpxtoolfrontendview input[type="submit"],
body.view-mapboxfrontendlistview button,
body.view-mapboxfrontendlistview .btn,
body.view-mapboxfrontendlistview .sppb-btn,
body.view-mapboxfrontendlistview input[type="button"],
body.view-mapboxfrontendlistview input[type="submit"] {
  border-radius: var(--gr-radius-full);
}
/* Exception: the JSON/WKT/CSV segmented toggle on the GPX tool is
   a tight 3-button pill group inside a single track — fully round
   would split the segments visually. Keep the small inner radius. */
body.view-gpxtoolfrontendview .trfgrn-gpx-tool__display-btn {
  border-radius: calc(var(--gr-radius-sm) - 2px);
}
/* Same logic for the GPX tool's file-input dashed dropzone — it's
   a container, not a button. Restore its design-token radius. */
body.view-gpxtoolfrontendview .trfgrn-gpx-tool__file-input {
  border-radius: var(--gr-radius-sm);
}
/* And the mapbox dashboard's tab nav-links — they live under
   .nav-tabs and have a bottom-border underline indicator, not a pill
   shape. Keep them rectangular. */
body.view-mapboxfrontendlistview #tileTabs .nav-link {
  border-radius: 0;
}


/* ----- Homepage (Itemid=101) ------------------------------------------------ */

/* All buttons on the homepage use the rounded-full pill radius — matches
   the brand "Register" header pill the user wants as the canonical look. */
body.itemid-101 button,
body.itemid-101 .btn,
body.itemid-101 .sppb-btn,
body.itemid-101 input[type="button"],
body.itemid-101 input[type="submit"] {
  border-radius: var(--gr-radius-full);
}

/* The green "The Project" / section-label pills used as inline headings.
   The legacy rule renders these as `display: inline`, so the border-radius
   wouldn't visibly round the corners — bump to inline-block for it to land. */
body.itemid-101 .reversed-boxed {
  display: inline-block;
  border-radius: 10px;
}

/* ----- TRF Registration (Itemid=1493 / com_rsform / formId=3) -------------
   Mirrors the com_users login page treatment: slate-50 page bg, centred
   Arvo heading, fields packaged into a white card with slate-100 border
   and a subtle shadow. The form has TWO sections (TRF Members + Guest
   Members), each with its own H4 and submit — so each section gets its
   own card stacked vertically. */

/* Page chrome */
body.itemid-1493 {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-800);
  font-family: var(--gr-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* "Register to start" page heading */
body.itemid-1493 #userForm > h2 {
  font-family: var(--gr-font-display);
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px 0;
  color: var(--gr-slate-900);
}

/* Section heading "TRF Members" / "Guest Members" — emits inside the card */
body.itemid-1493 #userForm h4 {
  font-family: var(--gr-font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--gr-slate-900);
}

/* Constrain + centre the form. The legacy markup nests inside
   .sppb-row-container.registration-members → .row → .sppb-col-md-12
   → .sppb-column.max-900 — we keep that as our centred wrapper but
   tighten its max-width. */
body.itemid-1493 #userForm .registration-members {
  max-width: 720px;
  margin: 0 auto;
}
body.itemid-1493 #userForm .registration-members .max-900 {
  max-width: 100%;
}

/* Each "section" of the form lives inside an sppb-addon-wrapper that
   contains a chain of .form-row blocks. We make THAT the white card,
   so the H4 + fields + submit for one user type sit together. */
body.itemid-1493 #userForm .sppb-addon-wrapper {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
  padding: 28px 28px 24px 28px;
  margin: 0 0 24px 0;
}

/* Stack ALL field rows as a single column (the legacy markup pairs
   First Name + Surname / Email + Confirm Email into col-md-6 cells,
   which doesn't match the login form's stacked look the user asked
   for). Force every column to full width so each label+input lives
   on its own row. */
body.itemid-1493 #userForm .form-row {
  display: block;
  margin: 0 0 4px 0;
  padding: 0;
}
body.itemid-1493 #userForm .form-row > [class*="col-"],
body.itemid-1493 #userForm .form-row > .col-md-6,
body.itemid-1493 #userForm .form-row > .col-md-12 {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
  padding: 0;
}

/* Vertical breathing room between each label+input block. Uses
   .rsform-block.form-group (Joomla emits both classes on the same
   element) so the rule's specificity beats anything keyed off either
   class alone. */
body.itemid-1493 #userForm .rsform-block.form-group {
  margin: 0 0 16px 0;
}
/* Section "title" rows (the H4 holders) take a slightly larger gap. */
body.itemid-1493 #userForm .rsform-block-title-member-form.form-group,
body.itemid-1493 #userForm .rsform-block-title-guest-form.form-group {
  margin-bottom: 18px;
}
/* The submit row sits at the end of each card — no extra bottom gap. */
body.itemid-1493 #userForm .rsform-block-register.form-group,
body.itemid-1493 #userForm .rsform-block-greg.form-group {
  margin: 6px 0 0 0;
}

/* Labels — 11px uppercase Inter, slate-500. Identical to login. */
body.itemid-1493 #userForm .formControlLabel {
  display: block;
  flex: none;
  max-width: none;
  width: auto;
  margin: 0 0 6px 0;
  padding: 0;
  font-family: var(--gr-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gr-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: left;
}
/* The label sits inside a `.row .col-sm-3` — defeat the Bootstrap
   col-sm-3 width so the label sits ABOVE the input, not beside it. */
body.itemid-1493 #userForm .form-group.row > .formControlLabel {
  flex: 0 0 100%;
  max-width: 100%;
}
body.itemid-1493 #userForm .form-group.row > .formControls,
body.itemid-1493 #userForm .form-group.row > [class*="col-sm-"] {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0;
}

/* Inputs / passwords / selects / textareas — same chrome as
   profile-edit/login. Overrides the Guest section's white-on-light
   invisible border too. */
body.itemid-1493 #userForm .rsform-input-box,
body.itemid-1493 #userForm .rsform-password-box,
body.itemid-1493 #userForm .rsform-select-box,
body.itemid-1493 #userForm input.form-control,
body.itemid-1493 #userForm select.form-control,
body.itemid-1493 #userForm textarea.form-control {
  display: block;
  width: 100%;
  height: auto;
  padding: 9px 12px;
  margin: 0;
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-sm);
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gr-slate-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
              background-color 0.15s ease;
}
body.itemid-1493 #userForm input.form-control:focus,
body.itemid-1493 #userForm select.form-control:focus,
body.itemid-1493 #userForm textarea.form-control:focus,
body.itemid-1493 #userForm .rsform-input-box:focus,
body.itemid-1493 #userForm .rsform-password-box:focus,
body.itemid-1493 #userForm .rsform-select-box:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft);
}
body.itemid-1493 #userForm input.form-control::placeholder,
body.itemid-1493 #userForm textarea.form-control::placeholder {
  color: var(--gr-slate-400);
  opacity: 1;
}

/* Checkboxes (T&Cs / cookies) */
body.itemid-1493 #userForm .form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  margin: 6px 0;
}
body.itemid-1493 #userForm .form-check-input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px 0 0 0;
  border-radius: 4px;
  accent-color: var(--gr-green);
  cursor: pointer;
}
body.itemid-1493 #userForm .form-check-label {
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-700);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
  cursor: pointer;
}

/* Validation message — hide the inert "Invalid Input" placeholder
   until rsform flips it to .formError on submit. */
body.itemid-1493 #userForm .formValidation .formNoError {
  display: none;
}
body.itemid-1493 #userForm .formValidation .formError {
  display: inline-block;
  font-family: var(--gr-font-sans);
  font-size: 12px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 4px 10px;
  margin-top: 6px;
}

/* Every button on the page gets the rounded-full pill radius — submit,
   sppb-btn, anchor-as-button, native button. Matches the "Register"
   header pill the user wants as the canonical button look. */
body.itemid-1493 button,
body.itemid-1493 .btn,
body.itemid-1493 .sppb-btn,
body.itemid-1493 input[type="button"],
body.itemid-1493 input[type="submit"] {
  border-radius: var(--gr-radius-full);
}

/* Submit "Register" — full-width green pill matching login.
   (The register column wrapper is widened via the general "every
   col-md-* in the form-row becomes 100%" rule above.) */
body.itemid-1493 #userForm .rsform-submit-button.btn.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 18px;
  margin-top: 4px;
  background-color: var(--gr-green);
  border: 1px solid var(--gr-green);
  color: #ffffff;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--gr-radius-full);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
body.itemid-1493 #userForm .rsform-submit-button.btn.btn-primary:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}
body.itemid-1493 #userForm .rsform-submit-button.btn.btn-primary:focus-visible {
  outline: 3px solid var(--gr-green-soft-2);
  outline-offset: 2px;
}

/* "Public vs Members" comparison list-group (#sppb-addon-1607136640862).
   It's a <ul.list-group> of <li> rows with 3 columns inside (Feature /
   Public / Members). We turn the whole list into a single rounded card
   with zebra rows and a typed-table feel — keeping the existing mustard
   header colour as the brand cue. */
body.itemid-1493 #sppb-addon-1607136640862 .list-group {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-md);
  overflow: hidden;
  box-shadow: var(--gr-shadow-sm);
  background: #ffffff;
}
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--gr-slate-200);
  padding: 12px 16px;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  color: var(--gr-slate-800);
}
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item:last-child {
  border-bottom: 0;
}
/* Header row "Feature / Public / Members" */
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item-mustard {
  background-color: #e7a753;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Zebra rows — keep grey alternating but soften to slate-50 */
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item-secondary {
  background-color: var(--gr-slate-50);
  color: var(--gr-slate-800);
}
/* The inner container/row inherits Bootstrap container padding which
   adds horizontal gutters that misalign the columns. Flatten. */
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item > .container {
  padding: 0;
  margin: 0;
  max-width: none;
}
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item .row {
  margin: 0;
  align-items: center;
}
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item [class*="col-"] {
  padding: 0 6px;
}
/* X marks (the only content in the Public / Members columns) — centred
   and slightly emphasized so they read as ticks. */
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item .col-3 {
  text-align: center;
  font-weight: 600;
  color: var(--gr-green-dark);
}
body.itemid-1493 #sppb-addon-1607136640862 .list-group-item-mustard .col-3 {
  color: #ffffff;
}


/* FAQ accordion (section-id-1599767691379) — design-system polish, brand
   green retained. The legacy look was a flat green box with a 1px grey
   border, cramped 5px header padding, no radius, Roboto bold 14px text,
   and a static chevron that never rotated. */
body.itemid-101 #section-id-1599767691379 .sppb-panel.sppb-panel-modern {
  border: 0;
  border-radius: 10px;
  margin: 0 0 12px;
  overflow: hidden;                 /* clip the button hover bg to the radius */
  box-shadow: var(--gr-shadow-sm);
  transition: box-shadow 0.15s ease;
}
body.itemid-101 #section-id-1599767691379 .sppb-panel.sppb-panel-modern:hover {
  box-shadow: var(--gr-shadow-glass);
}

/* Question button */
body.itemid-101 #section-id-1599767691379 .sppb-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  font-family: var(--gr-font-sans);
  background: transparent;          /* parent panel carries the colour */
  border: 0;
  border-radius: 0;                 /* defer corners to the parent panel */
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}
body.itemid-101 #section-id-1599767691379 .sppb-panel-heading:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
body.itemid-101 #section-id-1599767691379 .sppb-panel-heading:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: -2px;
}

/* Question text */
body.itemid-101 #section-id-1599767691379 .sppb-panel-title {
  font-family: var(--gr-font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  padding: 0;
  color: #ffffff;
}

/* Chevron — rotates 90° when the panel is open */
body.itemid-101 #section-id-1599767691379 .sppb-toggle-direction {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0.85;
  transition: transform 0.25s ease;
}
body.itemid-101 #section-id-1599767691379 .sppb-panel-heading[aria-expanded="true"] .sppb-toggle-direction {
  transform: rotate(90deg);
}

/* Answer body — soft top divider so the boundary reads when expanded.
   Background stays inherited (green) so the existing white answer text
   continues to render on brand colour as before. */
body.itemid-101 #section-id-1599767691379 .sppb-panel-body {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--gr-font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
}
body.itemid-101 #section-id-1599767691379 .sppb-panel-body p,
body.itemid-101 #section-id-1599767691379 .sppb-panel-body .sppb-addon-content {
  font-family: var(--gr-font-sans);
}

/* ============================================================================
   END PER-PAGE OVERRIDES
   ============================================================================ */


/* ============================================================================
   UNIFIED MAP SEARCH
   ----------------------------------------------------------------------------
   #map-search lives inside the #search-modal-new modal on both map views.
   One input + a segmented mode control (Location / GRMUID / USRN). The
   guest map renders no mode control — location-only. Driven by mapSearch.js.
   ============================================================================ */

#map-search {
  max-width: 420px;
  margin: 0 auto;
  font-family: var(--gr-font-sans);
}

/* Segmented mode control */
#map-search .map-search__modes {
  display: flex;
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-md);
  overflow: hidden;
}

#map-search .map-search__mode {
  flex: 1;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--gr-slate-500);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

#map-search .map-search__mode + .map-search__mode {
  border-left: 1px solid var(--gr-slate-200);
}

#map-search .map-search__mode:hover {
  background: var(--gr-slate-50);
}

#map-search .map-search__mode.is-active {
  background: var(--gr-green);
  color: #ffffff;
}

/* Input */
#map-search .map-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-md);
  font-family: var(--gr-font-sans);
  font-size: 15px;
  color: var(--gr-slate-700);
}

#map-search .map-search__input::placeholder {
  color: var(--gr-slate-400);
}

#map-search .map-search__input:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: 0 0 0 3px var(--gr-green-soft-2);
}

/* Results list */
#map-search .map-search__results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--gr-slate-200);
  border-radius: var(--gr-radius-md);
}

#map-search .map-search__results[hidden] {
  display: none;
}

#map-search .map-search__result {
  padding: 9px 12px;
  font-size: 14px;
  color: var(--gr-slate-700);
  cursor: pointer;
  border-top: 1px solid var(--gr-slate-100);
}

#map-search .map-search__result:first-child {
  border-top: 0;
}

#map-search .map-search__result:hover,
#map-search .map-search__result.is-highlighted {
  background: var(--gr-green);
  color: #ffffff;
}

#map-search .map-search__msg {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--gr-slate-400);
}


/* ============================================================================
   GUEST MAP SEARCH MODAL
   ----------------------------------------------------------------------------
   The shared modal block above is scoped to the member / single-record /
   list views — not the guest map. This block gives the guest map's
   #search-modal-new the same design-system white-card look, so the guest
   and member search modals match. Scoped to that one modal (and high
   enough specificity to beat the guest map's legacy grey rules) so other
   guest-map modals are untouched.
   ============================================================================ */

body.view-grrfrontendguestmapview #search-modal-new .modal-dialog {
  width: auto;
  max-width: 460px;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-content {
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.18),
              0 4px 12px -2px rgba(15, 23, 42, 0.08);
  font-family: var(--gr-font-sans);
  color: var(--gr-slate-700);
  overflow: hidden;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gr-slate-100);
  background-color: #ffffff;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-title {
  font-family: var(--gr-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gr-slate-900);
  margin: 0;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-title i {
  margin-right: 6px;
  color: var(--gr-green-dark);
  font-size: 13px;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-header .close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: -4px -4px -4px auto;
  border: none;
  border-radius: var(--gr-radius-sm);
  background-color: transparent;
  color: var(--gr-slate-500);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  opacity: 1;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-header .close:hover {
  color: var(--gr-slate-900);
  background-color: var(--gr-slate-100);
}

body.view-grrfrontendguestmapview #search-modal-new .modal-header .close span {
  display: block;
  line-height: 1;
}

body.view-grrfrontendguestmapview #search-modal-new .modal-body {
  padding: 20px;
}


/* ----------------------------------------------------------------------------
   MOBILE MENU (rebuilt 2026-07-17 for Helix 2.2.9)
   Helix 2.2.9 stopped rendering the offcanvas open-toggler for our menu config
   (menu_type=mega_offcanvas + predefined_header=1 gate off BOTH of its toggler
   code paths). So plg_system_grmdesign injects its own burger (.grm-burger, via
   media/plg_system_grmdesign/js/mobile-menu.js) and opens Helix's own drawer.
   Here we style that burger (mobile-only) and keep the desktop megamenu hidden
   on mobile (Helix already does this via d-none d-lg-block on the <ul>; this is
   a belt-and-braces safety net). The old 2.2.2 CSS-only reveal — which targeted
   #offcanvas-toggler:not(.offcanvas-toggler-secondary) — is gone: 2.2.9 no
   longer renders that element, so there was nothing to reveal.
   ---------------------------------------------------------------------------- */
.grm-burger { display: none; } /* desktop: hidden (megamenu shown) */

@media (max-width: 991.98px) {
  /* the offcanvas provides nav on mobile — hide the desktop megamenu */
  #sp-header .sp-megamenu-wrapper { display: none !important; }

  /* show our injected burger */
  #sp-header .grm-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 44px;
    margin-left: auto;
    cursor: pointer;
    color: var(--gr-slate-800, #1e293b);
  }
  #sp-header .grm-burger:hover { color: var(--gr-green-dark, #166534); }
}

/* Hamburger icon — three stacked bars (self-contained; no dependency on Helix's
   own .burger-icon styling). */
.grm-burger__icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 17px;
}
.grm-burger__icon > span {
  display: block;
  height: 2.5px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
}


/* ----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
   MOBILE OFFCANVAS MENU — dashboard-sidebar style on BLACK (2026-07-09)
   Modelled on a modern app sidebar: roomy icon-led rows, a rounded brand-green
   active pill, section grouping + divider — on a solid #000 drawer. Per-item
   icons via Font Awesome 5 (loaded site-wide). Scoped to .offcanvas-menu so
   desktop is untouched.
   ---------------------------------------------------------------------------- */

/* Panel */
.offcanvas-menu {
  background: #000 !important;
  color: #fff;
  border: 0 !important;
  box-shadow: 8px 0 48px rgba(0, 0, 0, .55);
  font-family: var(--gr-font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Top bar / close (X) */
.offcanvas-menu > .d-flex { padding: 1.1rem 1.15rem 1rem !important; border-bottom: 0; }
.offcanvas-menu .close-offcanvas { opacity: .85; }
.offcanvas-menu .close-offcanvas:hover { opacity: 1; }
.offcanvas-menu .close-offcanvas .burger-icon span { background: #fff !important; }

/* Hide admin frontend-edit clutter */
.offcanvas-menu .jmodedit,
.offcanvas-menu [id^="tip-"],
.offcanvas-menu .header-modules:empty { display: none !important; }

.offcanvas-menu .offcanvas-inner { padding: 1rem 0 2rem !important; }
.offcanvas-menu .sp-module,
.offcanvas-menu .sp-module-content { background: transparent !important; padding: 0 !important; }

/* Menu list */
.offcanvas-menu ul.menu,
.offcanvas-menu ul.menu ul { list-style: none; margin: 0; padding: 0; }
.offcanvas-menu ul.menu > li { position: relative; border: 0 !important; }

/* Nav rows — icon + label, roomy, rounded (for hover/active pills) */
.offcanvas-menu ul.menu > li > a,
.offcanvas-menu ul.menu > li > span {
  display: flex !important; align-items: center !important; gap: .9rem;
  margin: 3px .6rem !important; padding: 13px 1.15rem !important; border-radius: 12px;
  color: #fff !important;
  font-size: 1.02rem; font-weight: 500; line-height: 1.25;
  text-decoration: none !important; background: transparent !important;
  transition: background .15s ease, color .15s ease;
}

/* Per-item Font Awesome icons */
.offcanvas-menu ul.menu > li > a::before,
.offcanvas-menu ul.menu > li > span::before {
  font-family: "Font Awesome 5 Free"; font-weight: 900;
  font-size: 1.02rem; width: 22px; flex: 0 0 22px; text-align: center;
  color: rgba(255, 255, 255, .9); transition: color .15s ease;
}
.offcanvas-menu li.item-180  > a::before    { content: "\f007"; } /* My Profile — user */
.offcanvas-menu li.item-542  > a::before    { content: "\f0ca"; } /* RCH — list */
.offcanvas-menu li.item-1186 > a::before    { content: "\f279"; } /* Map - member — map */
.offcanvas-menu li.item-1694 > a::before    { content: "\f2f5"; } /* Logout — sign-out */
.offcanvas-menu li.item-1924 > span::before { content: "\f2b5"; } /* Partners — handshake */
.offcanvas-menu li.item-2126 > span::before { content: "\f013"; } /* Admin — cog */

/* Hover */
.offcanvas-menu ul.menu > li > a:hover,
.offcanvas-menu ul.menu > li > a:focus {
  background: rgba(255, 255, 255, .07) !important; color: #fff !important;
}
.offcanvas-menu ul.menu > li > a:hover::before { color: #fff !important; }

/* Active / current — rounded WHITE pill with dark text */
.offcanvas-menu ul.menu li.active > a,
.offcanvas-menu ul.menu li.current > a {
  background: #fff !important; color: #000 !important; font-weight: 600;
}
.offcanvas-menu ul.menu li.active > a::before,
.offcanvas-menu ul.menu li.current > a::before { color: #000 !important; }

/* Section rows (Partners / Admin) — same row look, chevron on the right */
/* Section chevron — positioned relative to the ROW (span) so the divider
   padding on the first section can't misalign it; both sections match. */
.offcanvas-menu ul.menu > li.menu-parent > span { cursor: default; position: relative; }
.offcanvas-menu ul.menu li.menu-parent .menu-toggler {
  position: absolute; right: .35rem; top: 0; bottom: 0; margin: auto 0;
  width: 40px; height: 40px; padding: 0;
  border: 0 !important; background: transparent !important;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.offcanvas-menu ul.menu li.menu-parent .menu-toggler::before {
  content: "\f078"; font-family: "Font Awesome 5 Free"; font-weight: 900;
  font-size: .78rem; color: rgba(255, 255, 255, .7); display: inline-block;
  transition: transform .2s ease;
}
/* Kill Helix's default tofu caret (renders as an empty □ next to ours) */
.offcanvas-menu ul.menu li.menu-parent .menu-toggler::after { content: none !important; display: none !important; }
.offcanvas-menu ul.menu li.menu-parent.menu-parent-open .menu-toggler::before { transform: rotate(180deg); }

/* Divider before the section group (like the reference's split) */
.offcanvas-menu ul.menu > li.item-1924 {
  margin-top: .6rem; padding-top: .6rem;
  border-top: 1px solid rgba(255, 255, 255, .09) !important;
}

/* Submenu (children) — indented, quieter, no icon */
.offcanvas-menu ul.menu ul.menu-child { margin: 2px 0 6px !important; }
.offcanvas-menu ul.menu ul.menu-child > li { border: 0 !important; }
.offcanvas-menu ul.menu ul.menu-child > li > a {
  padding: 9px 1rem 9px 3.35rem !important; margin: 1px .75rem; border-radius: 10px;
  font-size: .94rem; font-weight: 400; color: rgba(255, 255, 255, .6) !important;
}
.offcanvas-menu ul.menu ul.menu-child > li > a::before { content: none !important; }
.offcanvas-menu ul.menu ul.menu-child > li > a:hover {
  color: #fff !important; background: rgba(255, 255, 255, .06) !important;
}

/* Guest-only login / register — CTA pills on black (no icon) */
.offcanvas-menu ul.menu > li > a.nav-login-only-guest,
.offcanvas-menu ul.menu > li > a.nav-register-only-guest {
  justify-content: center; margin: .4rem .75rem; padding: 12px 1rem;
  border-radius: var(--gr-radius-full); font-weight: 600;
}
.offcanvas-menu ul.menu > li > a.nav-login-only-guest::before,
.offcanvas-menu ul.menu > li > a.nav-register-only-guest::before { content: none !important; }
.offcanvas-menu ul.menu > li > a.nav-login-only-guest { background: var(--gr-green) !important; color: #04220f !important; }
.offcanvas-menu ul.menu > li > a.nav-register-only-guest {
  background: transparent !important; color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .35) !important;
}
/* Stock Helix wraps the component output in <main id="sp-main">. We used to
   DELETE that wrapper in index.php (a template customisation a Helix update
   clobbers) because it broke the full-height member map's height chain. Instead
   keep the stock wrapper and make it generate no layout box: display:contents
   is byte-for-byte equivalent to "no wrapper" on every page (the <main> has no
   other CSS), so the map height chain is preserved AND index.php stays stock.
   See docs/helix-customisations-migration.md item 2. */
#sp-main { display: contents; }

/* Hide the guest-only CTAs (Login / Register) for logged-in users. Lives HERE
   (the plugin's design-system.css, loaded with version=auto under BOTH
   templates) rather than each template's custom.css: custom.css is enqueued
   with NO cache-busting version, so a change there wouldn't reach already-cached
   browsers on deploy. The `html.user-loggedin` class is stamped on <html> by
   plg_system_grmdesign (was a Helix index.php <body> override — see
   docs/helix-customisations-migration.md item 1). Header megamenu pills: */
html.user-loggedin #sp-header .sp-megamenu-parent .nav-login-only-guest,
html.user-loggedin #sp-header .sp-megamenu-parent .nav-register-only-guest { display: none !important; }
/* Offcanvas (mobile) menu — needs the extra specificity to beat the row's
   display:flex !important above. */
html.user-loggedin .offcanvas-menu ul.menu > li > a.nav-login-only-guest,
html.user-loggedin .offcanvas-menu ul.menu > li > a.nav-register-only-guest { display: none !important; }


/* ============================================================================
   ============================================================================
   RCH VIEWS — PHONE LAYOUT (below Bootstrap's md, 768px)
   Views: grrfrontendlistview, mcrgrrfrontendlistview, and the six
   *frontendsingleview siblings (road details / access / docs-images / notes /
   reports / history). These run on the SEPARATE `ultimate-rch` template
   (Helix 2.2.2, older than the main site's 2.2.9) — but design-system.css is
   loaded sitewide by plg_system_grmdesign, so one block covers both templates.

   Placed at the END of the file deliberately: the desktop rules these override
   use the same `:is(...) .record-view-details #record-sub-tabs` selector and
   therefore the same specificity, so SOURCE ORDER is what makes these win.
   Moving this block earlier silently disables it.
   ============================================================================
   ============================================================================ */
@media (max-width: 767.98px) {

  /* --------------------------------------------------------------------
     RECORD SUB-TABS — wrap instead of scrolling off-screen.
     --------------------------------------------------------------------
     The desktop rule is `flex-wrap: nowrap` + `overflow-x: auto`, commented
     "graceful scroll if it ever does overflow". On desktop it never does; on
     a phone it always does — the six tabs need ~653px against ~390px of
     viewport (measured 2026-08-19 on a real device).

     The strip DOES scroll (verified: clientWidth 366 vs scrollWidth 673), so
     the tabs were reachable — but nothing said so. Mobile hides scrollbars,
     and there is no fade, arrow or peek, so the row just looks chopped
     mid-word at "Documents/Photo…" and the last three tabs (Records Notes,
     Reports, History) appear not to exist.

     For NAVIGATION that trade is wrong: these are links to sibling views, and
     a user cannot choose what they cannot see. Wrapping shows all six at
     once, costs a row or two of height, and needs no affordance to teach.
     It also matches the sibling strip on the same page — `.nav-tabs.main`
     (Dashboard / List View / FAQ) already wraps.
     -------------------------------------------------------------------- */
  :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)
    .record-view-details #record-sub-tabs {
    flex-wrap: wrap;
    overflow-x: visible;   /* no longer a scroller, so drop the clip */
    row-gap: 6px;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  /* Slightly tighter pills so more fit per row. The labels are long —
     "Documents/Photos/Videos" alone is ~197px — so even at this size the
     strip lands on THREE rows at 390px (measured: 123px tall, all six tabs
     inside the strip, no scrolling). Two rows would need either shorter
     labels or an icon-only treatment, both of which change content rather
     than layout, so they are a separate decision. Three visible rows still
     beats one row with half the tabs hidden behind an invisible scroll. */
  :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)
    .record-view-details #record-sub-tabs .nav-link {
    padding: 8px 12px;
    font-size: 12.5px;
  }


  /* --------------------------------------------------------------------
     RECORD FORM — stack the two columns.
     --------------------------------------------------------------------
     The road-details and access views lay their form out as two Bootstrap
     `col-6` columns: text fields on the left, checkbox cards (Highway
     Classification / Protected Landscape / Surface Type) on the right.

     `col-6` is NOT responsive — unlike `col-md-6` it is `width: 50%` at
     EVERY breakpoint and never stacks. So on a phone both columns stayed
     side by side at ~180px each: the right column's cards overlapped and
     clipped the left column's inputs, and values were truncated mid-string
     ("BOAT 349041/U3218 101…", "https://wmfc.highway-ia…"). Reported from a
     real device 2026-08-19.

     Only these two views are affected — a survey of all eight RCH views
     found `col-6` in grrfrontendsingleview and grraccessfrontendsingleview
     only. `col-12` in the access and notes views is harmless (already full
     width at every breakpoint).

     Fixed in CSS rather than by editing `col-6` → `col-md-6` in the markup
     because the same two files also carry the desktop layout that works; a
     CSS override keeps the change reversible and in one place with the rest
     of the mobile work. If the markup is ever revisited, `col-md-6` is the
     better fix and this rule can go.

     Scoped to the record card, NOT global: `col-6` is a Bootstrap utility
     and a deliberate 2-up at phone width is legitimate elsewhere.
     Specificity (0,3,1) beats Bootstrap's `.col-6` (0,1,0), so no
     !important is needed.
     -------------------------------------------------------------------- */
  :is(body[class*="frontendsingleview"]) .record-view-details .col-6 {
    flex: 0 0 auto;
    width: 100%;
  }


  /* --------------------------------------------------------------------
     LET THE CONTENT CARD SHRINK — the fix that makes .gr-table-scroll work.
     --------------------------------------------------------------------
     Symptom: on the docs/images and reports views the whole card was wider
     than the phone screen, so the PAGE scrolled sideways and everything —
     tabs, table headers, buttons — was clipped at the right edge. The tables
     already had `.gr-table-scroll` (overflow-x:auto) wrappers, which looked
     like it should have prevented exactly this.

     Cause is the flexbox min-width:auto rule, not the overflow:

         .col-lg-9.bg-grey     display: flex   min-width: auto
           └─ .record-view-details   flex: 1 1 auto   min-width: auto

     A FLEX ITEM defaults to `min-width: auto`, which means "never shrink
     below min-content". The card is a flex item of .col-lg-9, and .col-lg-9
     is itself a flex item of .row with the same default — so neither could
     narrow, and the widest table dragged the whole card out to 747px at a
     390px viewport. The scroll wrapper never got the chance to scroll,
     because nothing ever constrained it.

     `min-width: 0` opts both out of that floor. Measured at a 390px
     constraint: card 747px -> 293px, and all three .gr-table-scroll wrappers
     switch from pushing the layout to genuinely scrolling (clientWidth 185
     vs scrollWidth ~414).

     Same trap as the route-planner panel body — see the min-height:0 note in
     the ROUTE PLANNER block above. Worth recognising on sight: a scroll
     container that refuses to scroll usually means an ancestor flex item is
     refusing to shrink, not that the overflow is wrong.

     Scoped to the mobile block for a small blast radius, though `min-width:0`
     on these two is arguably correct at every width — on desktop there is
     simply enough room for it never to matter.
     -------------------------------------------------------------------- */
  :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)
    :is(.bg-grey, .record-view-details) {
    min-width: 0;
  }


  /* --------------------------------------------------------------------
     CARD HEADER — put the action buttons UNDER the title.
     --------------------------------------------------------------------
     `.gr-list-card__header` is a nowrap row of title + toolbar with
     `justify-content: space-between`. There is room for that on desktop; on
     a phone the title takes what it needs and the toolbar is squeezed into
     the remainder (~149px), so its own `flex-wrap: wrap` stacks the buttons
     into a narrow right-hand column. The result reads as buttons floating
     beside the heading rather than belonging to the card — and it drags
     "Featured Images" / "YouTube Links" onto two lines to make room.

     Stacking the header puts the title on its own line with a full-width
     button row beneath it, which is both tidier and gives the buttons room
     to sit side by side instead of stacking.

     `:has(.gr-doc-toolbar)` is doing real work here, not decoration: the
     SAME header class is used in the list views with only an "i"
     info-trigger beside the title. Stacking those would drop a lone icon
     onto its own line, which is worse than the row it replaces. This way
     only headers that actually carry a button toolbar restack. Verified on
     the docs/images view: 3 headers, all matched, none carrying an
     info-trigger.
     -------------------------------------------------------------------- */
  :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)
    .gr-list-card__header:has(.gr-doc-toolbar) {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  /* Full width so the buttons lay out left-to-right across the card rather
     than inheriting the cramped column they were squeezed into. */
  :is(body[class*="frontendsingleview"], body.view-grrfrontendlistview, body.view-mcrgrrfrontendlistview, body.view-reportssummaryfrontendlistview, body.view-addlanefrontendview, body.view-lanereviewfrontendlistview)
    .gr-list-card__header:has(.gr-doc-toolbar) .gr-doc-toolbar {
    width: 100%;
    justify-content: flex-start;
  }


  /* --------------------------------------------------------------------
     HISTORY DIFF TABLES — stop field names shattering.
     --------------------------------------------------------------------
     The audit-log diff tables (Field / Old / New) are built in JS by
     grrhistoryfrontendsingleview. Their field names are raw column
     identifiers with no spaces — `no_through_route` — and the inherited
     `word-break: break-word` from the generic table rules has nothing to
     break ON, so it splits them character-by-character. On a phone the
     column squeezed to ~57px and rendered as "NO_T / HROU / GH_R / OUTE",
     which is unreadable (reported 2026-08-19).

     Two halves to the fix. The table now has a `.gr-table-scroll` wrapper
     (added in the view's markup — it was the only table across all eight RCH
     views without one), so it is finally allowed to be wider than the screen
     and scroll. This rule then lets the field name stay on one line and use
     that width.

     Only the field-name cell gets `nowrap`. The old/new VALUE cells keep
     wrapping normally — a long free-text value forced onto one line would
     make the scroll enormous for no benefit.
     -------------------------------------------------------------------- */
  :is(body[class*="frontendsingleview"]) table.diff tbody th {
    word-break: normal;
    overflow-wrap: normal;
    white-space: nowrap;
  }

  /* A min-width so the table SCROLLS rather than crushing its value columns.
     Fixing the field name alone was not enough: with the name held on one
     line (~147px) the remaining ~90px of a 238px card was split between Old
     and New, giving them ~37px each — so "No (0)" shattered vertically into
     "N / o / ( / 0 / )", swapping one unreadable column for two.

     An auto-layout table compresses columns to fit its container rather than
     overflowing, so `overflow-x: auto` on the wrapper never engages unless
     the table is given a reason to be wider. 320px is that reason.

     Chosen by measuring the alternatives at a 390px viewport (238px of card):
       none   value cols  37px  — the bug
       300px              76px  ·  78px of scroll
       320px             ~85px  ·  ~98px of scroll   <- chosen
       380px             109px  · 158px of scroll
     ~85px comfortably fits the common values — booleans, counts, and dates
     like "2016-11-10" (~70px) — without making the sideways scroll dominate.
     Longer free text still wraps inside its column, which is what we want. */
  :is(body[class*="frontendsingleview"]) table.diff {
    min-width: 320px;
  }
}

/* ============================================================================
   ROAD-DETAILS PHOTO CAROUSEL — visible prev/next controls (2026-09-09)
   ----------------------------------------------------------------------------
   Members could not see the arrows. Cause was NOT the colour: Bootstrap ships a
   white chevron at `opacity: .5` with no backdrop, and these are daylight photos
   of green lanes, so ANY flat colour disappears against some images — white
   vanishes against a bright sky, dark would vanish against woodland.

   Fix is to give the chevron its own contrast rather than pick a better colour:
   a dark translucent disc behind it, which works whatever is underneath. Same
   approach Google Photos and Airbnb use.

   Lives here rather than in the member-map stylesheet or custom.css because
   this file is enqueued with `version => auto` (mtime-pinned), so an edit
   actually reaches members who already have the old file cached. custom.css
   carries no version param at all and is hard-cached.

   Selectors are id-scoped, so they beat Bootstrap's on specificity and do not
   depend on source order.

   Paired markup change in grrfrontendmembermapview/tmpl/markup.php (grep
   "carousel-control-prev"): the controls were <a> with NO href, which are not
   keyboard focusable and carry no button semantics — so the arrows could not be
   reached by keyboard and were announced as nothing. They are now <button> with
   a .visually-hidden label, which is Bootstrap 5's own documented markup.
   Note the rationale lives HERE and not beside that markup: it sits inside a JS
   template literal in a <script> block, and the production comment-strip in
   default.php preserves script blocks verbatim — an HTML comment there would
   ship to every member's view-source.
   ============================================================================ */

#carouselExampleControls .carousel-control-prev,
#carouselExampleControls .carousel-control-next {
  /* Bootstrap's .5 is the whole problem. The disc supplies the contrast now,
     so the control itself is fully opaque. */
  opacity: 1;
  /* BS 5.3 applies var(--bs-carousel-control-icon-filter) here; if a theme ever
     sets it to invert for dark mode it would flip our white chevron to dark on
     a dark disc. Pin it. */
  filter: none;
}

#carouselExampleControls .carousel-control-prev-icon,
#carouselExampleControls .carousel-control-next-icon {
  /* 44px is the Apple HIG / Material minimum touch target, and matches the
     sizing used by the map toolbar after the 2026-08 mobile pass. */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  /* Bootstrap sets background-size: 100% 100%, which would stretch the chevron
     to fill the whole disc. Shrink it so the glyph sits INSIDE the disc. */
  background-size: 18px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
}

#carouselExampleControls .carousel-control-prev:hover .carousel-control-prev-icon,
#carouselExampleControls .carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.78);
  transform: scale(1.06);
}

/* Keyboard focus must be visible on ANY photo, hence a white ring with a dark
   outer outline — one of the two always contrasts. :focus-visible so a mouse
   click does not leave a ring behind. */
#carouselExampleControls .carousel-control-prev:focus-visible .carousel-control-prev-icon,
#carouselExampleControls .carousel-control-next:focus-visible .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.78);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 0, 0, 0.6);
}

#carouselExampleControls .carousel-control-prev:focus,
#carouselExampleControls .carousel-control-next:focus {
  outline: none; /* the ring above replaces it, and reads on any background */
}

@media (prefers-reduced-motion: reduce) {
  #carouselExampleControls .carousel-control-prev-icon,
  #carouselExampleControls .carousel-control-next-icon {
    transition: none;
  }
  #carouselExampleControls .carousel-control-prev:hover .carousel-control-prev-icon,
  #carouselExampleControls .carousel-control-next:hover .carousel-control-next-icon {
    transform: none;
  }
}

/* ============================================================================
   ROUTE PLANNER — SHARED ROUTES (2026-09-16) · docs/features/shared-routes.md
   ----------------------------------------------------------------------------
   The Shared grid reuses the My Routes card. These add only what a shared card
   needs: a state pill, a creator line, and the editor's moderation buttons.
   The two phone :has() rules above were widened to include the Shared toggle,
   otherwise the bottom sheet would not collapse for it (they key on the
   toggle's literal id — see docs/mobile-responsive-layer.md §3).
   ============================================================================ */
.route-planner-card__state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; line-height: 1.6;
  border: 1px solid transparent; white-space: nowrap;
}
.route-planner-card__state--review      { background: #fff4d6; border-color: #e0b64b; color: #7a5200; }
.route-planner-card__state--published   { background: #e6f4ea; border-color: #86c39a; color: #1e6b3a; }
.route-planner-card__state--unpublished { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.route-planner-card__state--deleted { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.route-planner-card__creator {
  font-size: 12px; color: var(--gr-slate-600, #475569); margin-top: -2px;
}
.route-planner-card__creator strong { font-weight: 600; color: var(--gr-slate-800, #1e293b); }
/* "Also runs through …" under the creator line (shared-routes §12.18). */
.route-planner-card__counties { font-size: 12px; color: var(--gr-slate-500, #64748b); margin-top: -2px; }
/* §12.19 — the red "N reports" flag beside the state pill (only rendered for
   someone who may read the reports), and the Report / Reported action. */
.route-planner-card__reports {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; line-height: 1.6; white-space: nowrap; cursor: pointer;
  background: #fef2f2; border: 1px solid #f87171; color: #b91c1c;
}
.route-planner-card__reports:hover { background: #fee2e2; }
.route-planner-card__reports:focus-visible { outline: 2px solid #b91c1c; outline-offset: 2px; }
.route-planner-card__report:disabled { opacity: .7; cursor: default; }

/* §12.19 — the Report dialog and the editor's Reports dialog. */
.route-planner-dialog-backdrop {
  position: fixed; inset: 0; z-index: 1100; padding: 16px;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
}
.route-planner-dialog {
  background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
  padding: 20px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; font-family: inherit;
}
.route-planner-dialog--wide { max-width: 560px; }
.route-planner-dialog__title { margin: 0 0 6px; font-size: 16px; }
.route-planner-dialog__lead { margin: 0 0 12px; font-size: 13px; color: #475569; line-height: 1.45; }
.route-planner-dialog__buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
/* Send stays disabled under the 10-character minimum; it has to look it, or a click seems to do nothing. */
.route-planner-dialog .route-planner-card__btn:disabled,
.route-planner-dialog .route-planner-card__btn:disabled:hover { opacity: .45; cursor: not-allowed; box-shadow: none; }
.route-planner-dialog .route-planner-card__btn--primary:disabled:hover { background: var(--gr-green, #2f855a); border-color: var(--gr-green, #2f855a); }
.route-planner-reports { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #334155; }
.route-planner-reports__item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.route-planner-reports__item.is-open { border-color: #fca5a5; background: #fffafa; }
.route-planner-reports__item.is-done { opacity: .75; }
.route-planner-reports__head { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.route-planner-reports__head strong { color: #1e293b; }
.route-planner-reports__msg { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.route-planner-reports__foot { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #64748b; }
/* Moderation buttons sit in the same actions row, after Load. */
.route-planner-card__btn--publish   { background: var(--gr-green, #2f855a); border-color: var(--gr-green, #2f855a); color: #fff; }
.route-planner-card__btn--publish:hover { background: var(--gr-green-dark, #276749); border-color: var(--gr-green-dark, #276749); }
.route-planner-card__btn--unpublish { background: #fff; border-color: #cbd5e1; color: #475569; }
.route-planner-card__btn--unpublish:hover { background: #f1f5f9; }
/* Share dialog (built by openShareDialog(); mirrors the convert dialog's inline
   styling so it needs no extra rules here beyond the select). */
.route-planner-share-select {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font: inherit; font-size: 14px; background: #fff;
}

/* Shared button badge — count of routes awaiting this editor's review that
   arrived since they last opened the Shared tab. Hidden at zero; cleared by
   opening the tab (the client records "seen" then). Red is deliberate: it is
   a notification count, not a road-line colour, and it never sits on the map. */
.route-planner-shared-btn { position: relative; }
.route-planner-myroutes-btn__badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}
.route-planner-myroutes-btn.is-active .route-planner-myroutes-btn__badge { display: none; } /* tab open = seen */

/* ---- Shared Routes v2 (2026-09-27, docs/features/shared-routes.md §12) ----------------
   The shared-mode block replaces the create tab while Shared is on; the share
   dialog gains name / description / image; cards gain an image, description and
   a published line; the map view adds numbered clusters and a popup. */
.route-planner-shared-mode { display: flex; flex-direction: column; gap: 12px; font-family: var(--gr-font-sans); }
.route-planner-shared-view label { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.route-planner-shared-filters { border: 1px solid var(--gr-slate-200, #e2e8f0); border-radius: var(--gr-radius-md, 10px); background: #fff; }
.route-planner-shared-filters > summary {
  list-style: none; cursor: pointer; padding: 8px 12px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gr-slate-500, #64748b);
}
.route-planner-shared-filters > summary::-webkit-details-marker { display: none; }
.route-planner-shared-filters > summary::after { content: "\25BE"; margin-left: auto; transition: transform .15s ease; }
.route-planner-shared-filters[open] > summary::after { transform: rotate(180deg); }
.route-planner-shared-filters__active {
  display: inline-block; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; text-transform: none; letter-spacing: 0;
  background: var(--gr-green, #2f855a); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}
.route-planner-shared-filters__body { display: grid; gap: 10px; padding: 4px 12px 12px; border-top: 1px solid var(--gr-slate-100, #f1f5f9); }
.route-planner-shared-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.route-planner-shared-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
/* The shared filters use the RCH list-view filter sizes (.gr-filter / .gr-filter__select):
   13px / 500 inputs, 11px uppercase labels. Scoped under #route-planner-panel because
   template.css's `input[type="text"]:not(.form-control), select:not(.form-control)…`
   (0,2,1) out-ranks a lone class and forces 1rem (16px) + `padding: .5rem !important` —
   the padding can only be beaten by !important, so it carries one here and nothing else does. */
#route-planner-panel .route-planner-shared-input {
  display: block; width: 100%; min-width: 0; margin: 0;
  padding: 8px 12px !important; border: 1px solid var(--gr-slate-200, #e2e8f0); border-radius: var(--gr-radius-sm, 8px);
  font-family: var(--gr-font-sans); font-size: 13px; font-weight: 500; line-height: 1.4;
  background-color: #fff; color: var(--gr-slate-900, #0f172a);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#route-planner-panel select.route-planner-shared-input {
  height: auto; padding-right: 32px !important; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
#route-planner-panel .route-planner-shared-input::placeholder { color: var(--gr-slate-400, #94a3b8); font-weight: 400; }
#route-planner-panel .route-planner-shared-input:focus { outline: none; border-color: var(--gr-green, #2f855a); box-shadow: 0 0 0 3px var(--gr-green-soft, #e6f4ea); }
.route-planner-shared-field .route-planner-options-label { font-size: 11px; line-height: 1.2; }
.route-planner-shared-mine, .route-planner-shared-reported { font-size: 13px; padding-bottom: 6px; }
.route-planner-shared-nearme { justify-self: start; }
.route-planner-shared-count { font-size: 12px; color: var(--gr-slate-600, #475569); padding: 0 2px; }
.route-planner-shared-count strong { color: var(--gr-slate-900, #0f172a); }
.route-planner-shared-more { grid-column: 1 / -1; display: flex; justify-content: center; padding: 6px 0 12px; }
.route-planner-shared-more__btn { min-width: 200px; justify-content: center; }
.route-planner-shared-more__count { color: var(--gr-slate-500, #64748b); font-weight: 400; margin-left: 4px; }
/* Green roads on a route card (§12.11): "N green roads" or "NO GR DATA", each with
   a tooltip. The tip is positioned against the whole stats row (the button is
   deliberately NOT positioned), so it spans the card and never runs off its edge. */
.route-planner-card__stats { position: relative; }
.route-planner-grdata {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; cursor: help;
  font: inherit; color: inherit; border-bottom: 1px dotted var(--gr-slate-400, #94a3b8); line-height: 1.3;
}
.route-planner-grdata--none { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--gr-slate-500, #64748b); }
.route-planner-grdata__q { font-size: 11px; color: var(--gr-slate-400, #94a3b8); }
.route-planner-grdata:focus-visible { outline: 2px solid var(--gr-green, #2f855a); outline-offset: 2px; border-radius: 3px; }
/* Three classes deep on purpose: Joomla's system-j4.min.css styles every
   `[role="tooltip"]:not(.show)` (0,2,0) as its own white popover (right: 5em, margin,
   border, black text), so every property it sets is reset here. */
.route-planner-card__stats .route-planner-grdata .route-planner-grdata__tip {
  display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 5;
  margin: 0; max-width: none; border: 0;
  padding: 10px 12px; border-radius: var(--gr-radius-sm, 8px); background: var(--gr-slate-900, #0f172a); color: #fff;
  font-size: 12px; font-weight: 400; letter-spacing: 0; line-height: 1.45; text-transform: none; text-align: left;
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, .35); white-space: normal; cursor: default;
}
.route-planner-grdata__tip strong { display: block; font-weight: 600; margin-bottom: 4px; }
.route-planner-grdata__tip ul { margin: 0 0 6px; padding-left: 16px; max-height: 140px; overflow-y: auto; }
.route-planner-grdata__tip em { display: block; font-style: normal; color: var(--gr-slate-300, #cbd5e1); font-size: 11px; }
.route-planner-card__stats .route-planner-grdata:hover .route-planner-grdata__tip,
.route-planner-card__stats .route-planner-grdata:focus-visible .route-planner-grdata__tip,
.route-planner-card__stats .route-planner-grdata.is-open .route-planner-grdata__tip { display: block; }
/* Paging (§12.9): a filter change keeps the old cards, dimmed, until page one lands. */
.route-planner-saved-grid.is-shared-loading .route-planner-card { opacity: .45; transition: opacity .15s; pointer-events: none; }
.route-planner-shared-results__hint { font-size: 12px; color: var(--gr-slate-500, #64748b); padding: 10px 12px; background: var(--gr-slate-50, #f8fafc); border: 1px dashed var(--gr-slate-200, #e2e8f0); border-radius: var(--gr-radius-md, 10px); }
.route-planner-shared-results__list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.route-planner-shared-results__list .route-planner-card { padding: 12px 12px 10px; }
.route-planner-shared-results__list .route-planner-card__map { height: 110px; }
/* §12.15 — card ↔ line hover. The card being pointed at (or whose line the pointer is on) gets a green ring. */
.route-planner-shared-results__list .route-planner-card { transition: box-shadow .15s ease, border-color .15s ease; }
.route-planner-shared-results__list .route-planner-card:hover,
.route-planner-shared-results__list .route-planner-card:focus-within,
.route-planner-shared-results__list .route-planner-card.is-map-hover { border-color: var(--gr-green, #2f855a); box-shadow: 0 0 0 2px var(--gr-green-soft, #e6f4ea), 0 4px 12px -2px rgba(15, 23, 42, .08); }

/* Cards: the sharer's image, description and the published line. */
/* The photo is stored as a 900×450 (2:1) auto-cropped thumb, so the box is 2:1 too — no CSS crop needed, nothing to load beyond the thumb. */
.route-planner-card__image { display: block; width: 100%; aspect-ratio: 2 / 1; height: auto; object-fit: cover; border-radius: var(--gr-radius-md, 10px); border: 1px solid var(--gr-slate-200, #e2e8f0); background: var(--gr-slate-100, #f1f5f9); cursor: zoom-in; }
.route-planner-card__desc { font-size: 12.5px; line-height: 1.45; color: var(--gr-slate-700, #334155); margin: -4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.route-planner-card__desc.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.route-planner-card__desc-more { font-size: 12px; color: var(--gr-green-dark, #276749); background: none; border: 0; padding: 0; cursor: pointer; align-self: flex-start; margin-top: -8px; }
.route-planner-card__published { font-size: 12px; color: var(--gr-slate-500, #64748b); margin-top: -6px; }
.route-planner-card__published strong { color: var(--gr-slate-700, #334155); font-weight: 600; }

/* Share dialog fields (built by openShareDialog). */
.route-planner-share-field { display: block; margin: 0 0 12px; }
.route-planner-share-field > span { display: block; font-size: 12px; font-weight: 600; margin: 0 0 4px; color: var(--gr-slate-700, #334155); }
.route-planner-share-field > span small { font-weight: 400; color: var(--gr-slate-500, #64748b); }
.route-planner-share-input, .route-planner-share-textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 14px; background: #fff;
}
.route-planner-share-textarea { min-height: 84px; resize: vertical; }
.route-planner-share-input:focus, .route-planner-share-textarea:focus { outline: none; border-color: var(--gr-green, #2f855a); box-shadow: 0 0 0 3px var(--gr-green-soft, #e6f4ea); }
.route-planner-share-image { display: flex; align-items: center; gap: 12px; }
.route-planner-share-image__thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #cbd5e1; background: var(--gr-slate-100, #f1f5f9); display: none; }
.route-planner-share-image__thumb.is-set { display: block; }
.route-planner-share-image__ctl { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--gr-slate-500, #64748b); }
.route-planner-share-image__ctl input[type="file"] { font-size: 12px; max-width: 240px; }
.route-planner-share-count { font-size: 11px; color: var(--gr-slate-500, #64748b); text-align: right; margin-top: 2px; }
/* §12.17 — the county is worked out from the route: one county shows as a fixed
   line (no select), several as a select of just those, with a one-line note. */
.route-planner-share-fixed { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: var(--gr-slate-100, #f1f5f9); color: var(--gr-slate-700, #334155); }
.route-planner-share-note { font-size: 12px; color: var(--gr-slate-500, #64748b); margin-top: 4px; line-height: 1.4; }

/* Map-view popup (an OL overlay on the main map). */
.route-planner-shared-popup {
  position: relative; width: 260px; background: #fff; border: 1px solid var(--gr-slate-200, #e2e8f0); border-radius: 14px;
  box-shadow: 0 12px 30px -8px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.08); padding: 12px 12px 10px; font-family: var(--gr-font-sans); font-size: 12.5px;
}
.route-planner-shared-popup::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; background: #fff; border-right: 1px solid var(--gr-slate-200, #e2e8f0); border-bottom: 1px solid var(--gr-slate-200, #e2e8f0); transform: translateX(-50%) rotate(45deg); }
.route-planner-shared-popup__img { width: 100%; aspect-ratio: 2 / 1; height: auto; object-fit: cover; border-radius: 8px; margin-bottom: 8px; display: block; background: var(--gr-slate-100, #f1f5f9); cursor: zoom-in; }
.route-planner-shared-popup__title { font-family: var(--gr-font-display); font-size: 14px; font-weight: 700; color: var(--gr-slate-900, #0f172a); margin: 0 24px 2px 0; line-height: 1.3; }
.route-planner-shared-popup__meta { color: var(--gr-slate-600, #475569); margin-bottom: 8px; }
.route-planner-shared-popup__counties { color: var(--gr-slate-500, #64748b); font-size: 12px; margin: -6px 0 8px; }
.route-planner-shared-popup__close { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--gr-slate-100, #f1f5f9); color: var(--gr-slate-600, #475569); cursor: pointer; font-size: 14px; line-height: 24px; }
.route-planner-shared-popup__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Full-size image lightbox (card image click). */
.route-planner-lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.82); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.route-planner-lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.route-planner-lightbox img { max-width: 100%; max-height: calc(100vh - 96px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.route-planner-lightbox__caption { color: #fff; font-family: var(--gr-font-sans); font-size: 14px; opacity: .85; }
.route-planner-lightbox__close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 24px; line-height: 36px; cursor: pointer; }
.route-planner-lightbox__close:hover { background: rgba(255,255,255,.3); }
/* The compact card's photo button (shared_route_card_photo = icon, the default): sits in the head after the title. */
.route-planner-card__photo-btn {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gr-slate-200, #e2e8f0); background: #fff;
  color: var(--gr-green-dark, #276749); font-size: 12px; cursor: zoom-in; display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.route-planner-card__photo-btn:hover { background: var(--gr-green-soft, #e6f4ea); border-color: var(--gr-green, #2f855a); }
.route-planner-card__photo-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gr-green-soft, #e6f4ea); }


/* Protected landscape on the RCH Road-details tab (1.0.51, 2026-09-20): a derived
   status with an explicit human override, replacing two free checkboxes that wrote
   a value the next backend save destroyed. */
.gr-protected-area__status { margin: 4px 0 2px; font-size: 14px; }
.gr-protected-area__tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: #fef3c7; color: #92400e; vertical-align: middle; }
.gr-protected-area__tag--auto { background: #e6f4ea; color: #076633; }
.gr-protected-area__reason { margin: 0 0 6px; font-size: 12.5px; color: var(--gr-slate-600); font-style: italic; }
.gr-protected-area__override { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--gr-slate-200); }
.gr-protected-area__override label { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--gr-slate-700); }
.gr-protected-area__override select, .gr-protected-area__override input[type="text"] { margin-bottom: 6px; }
.gr-protected-area__hint { margin: 0; font-size: 12px; color: var(--gr-slate-500); }
/* What the status means, for everyone (2026-10-15: a tester asked what the override is for). */
.gr-protected-area__what { margin: 0 0 4px; font-size: 12px; line-height: 1.45; color: var(--gr-slate-600); }

/* ----------------------------------------------------------------------------
   PUBLIC MEMBER UPSELL TOOLBAR (2026-09-20)
   Greyed look-alikes of the six member buttons a Public Member does not get.
   Markup: components/com_trfgrn/views/grrfrontendmembermapview/tmpl/markup.php
   Registry: components/com_trfgrn/helpers/upsell.php

   ⚠️ Source order is load-bearing in this file. These rules override
   `.vertical-wrapper-controls > *` (~line 445), so they must stay AFTER it —
   do not move this block earlier.

   The design intent is the reason the icons are grouped rather than mixed in:
   six greyed buttons scattered through the stack read as a broken toolbar,
   whereas the same six below a divider read as a locked section. KJ chose the
   full set of six over a curated four (2026-09-20), so the grouping is what
   keeps it looking deliberate.
   ---------------------------------------------------------------------------- */

/* The group is a container, not a button — undo the 36x36 child sizing. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .grm-upsell-group {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  padding: 0;
  margin: 0;
}
/* …and it must not take the sibling hover highlight. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls > .grm-upsell-group:hover {
  background-color: transparent;
}

/* Divider: separates "what you can use" from "what membership adds". */
body.view-grrfrontendmembermapview .grm-upsell-divider {
  display: block;
  width: 24px;
  height: 1px;
  margin: 5px 0 3px;
  background-color: var(--gr-slate-200, #e2e8f0);
}

/* The greyed icon itself. Still a real button — it opens the modal — so it keeps
   a pointer cursor and a hover state. Muted, not disabled-looking to the point
   of being invisible. */
body.view-grrfrontendmembermapview .vertical-wrapper-controls .grm-upsell-icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--gr-radius-sm, 8px);
  color: var(--gr-slate-400, #94a3b8);
  opacity: 0.75;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls .grm-upsell-icon:hover,
body.view-grrfrontendmembermapview .vertical-wrapper-controls .grm-upsell-icon:focus-visible {
  color: var(--gr-green, #076633);
  background-color: var(--gr-slate-50, #f8fafc);
  opacity: 1;
}
body.view-grrfrontendmembermapview .vertical-wrapper-controls .grm-upsell-icon .material-icons-outlined {
  font-size: 19px;
  line-height: 1;
}

/* Small lock badge, so the grey reads as "locked" rather than "not working". */
body.view-grrfrontendmembermapview .grm-upsell-icon .grm-upsell-lock {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #ffffff;
  color: var(--gr-slate-400, #94a3b8);
  pointer-events: none;
}
body.view-grrfrontendmembermapview .grm-upsell-icon .grm-upsell-lock i {
  font-size: 7px;
  line-height: 1;
}
body.view-grrfrontendmembermapview .grm-upsell-icon:hover .grm-upsell-lock {
  color: var(--gr-green, #076633);
}

/* The modal. Deliberately small and plain — it is an explanation plus one link,
   not a sales page. */
.grm-upsell-modal .modal-dialog.modal-sm-custom { max-width: 420px; }
.grm-upsell-modal .modal-content {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.grm-upsell-modal .modal-header {
  border-bottom: 1px solid var(--gr-slate-100, #f1f5f9);
  padding: 16px 20px 12px;
}
.grm-upsell-modal .modal-title { font-size: 17px; font-weight: 700; color: #0f172a; }
.grm-upsell-modal .modal-body { padding: 16px 20px; }
.grm-upsell-modal .grm-upsell-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--gr-slate-700, #334155);
  margin: 0 0 12px;
}
.grm-upsell-modal .grm-upsell-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gr-slate-500, #64748b);
  margin: 0;
}
.grm-upsell-modal .modal-footer {
  border-top: 1px solid var(--gr-slate-100, #f1f5f9);
  padding: 12px 20px 16px;
  gap: 8px;
}
.grm-upsell-modal .grm-upsell-cta {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background-color: #076633;
  border-radius: 9999px;
  padding: 10px 20px;
  text-decoration: none;
}
.grm-upsell-modal .grm-upsell-cta:hover,
.grm-upsell-modal .grm-upsell-cta:focus-visible { background-color: #054d26; color: #ffffff; }

/* Phone: the toolbar shrinks, so the badge would crowd the glyph. */
@media (max-width: 767.98px) {
  body.view-grrfrontendmembermapview .grm-upsell-icon .grm-upsell-lock { display: none; }
  .grm-upsell-modal .modal-dialog.modal-sm-custom { max-width: calc(100% - 24px); }
}

/* Optional demo video inside the Public Member upsell modal (2026-09-20).
   The iframe only exists while the modal is open — see the comment in
   grrfrontendmembermapview/tmpl/markup.php for why. */
.grm-upsell-modal .grm-upsell-video { margin: 0 0 12px; }
.grm-upsell-modal .grm-upsell-video[hidden] { display: none; }
.grm-upsell-modal .grm-upsell-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 10px;
  background: #000;
}
/* Optional photo (2026-10-21), between the text and the video. Kept whole —
   contain, not cover — so a screenshot of a feature is never cropped. */
.grm-upsell-modal .grm-upsell-photo {
  display: block;
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
  margin: 0 0 12px;
  border-radius: 10px;
  background: #f1f5f9;
}
.grm-upsell-modal .grm-upsell-photo[hidden] { display: none; }


/* ============================================================================
   ============================================================================
   ACCOUNT RECOVERY PAGES (com_users / view-reset · view-remind) — 2026-09-24
   --------------------------------------------------------------------------
   The four pages between Login and Register:
     view=remind                  "Forgot your username?"
     view=reset                   "Forgot your password?"
     view=reset&layout=confirm    "Enter your verification code"
     view=reset&layout=complete   "Choose a new password"

   Helix ships them unstyled, so they rendered full-bleed with a grey Submit
   button. This gives them the LOGIN PAGE's shape — same 440px centred column,
   same white card, same green pill button, same helper-link list — so the
   whole signed-out journey reads as one design.

   Markup: templates/shaper_helixultimate/overrides/com_users/
           _grm_account_page.php (required by the four layouts beside it).

   The form chrome itself is NOT here: labels, inputs, focus ring, the password
   toggle and the strength meter all come from § SHARED USER-FORM CHROME above,
   which .grm-account-form was added to for exactly that reason. Only the
   page-level layout lives below. Keep it that way — a second copy of the input
   styling is how these pages drift away from Login again.
   ============================================================================
   ============================================================================ */

/* Outer wrapper — the same narrow centred column as body.view-login. */
.grm-account-page {
  max-width: 440px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

.grm-account-head {
  margin: 0 0 20px 0;
  text-align: center;
}
.grm-account-title {
  margin: 0;
  font-family: var(--gr-font-display);
  /* The login page leaves its h1 at the template's 40px/48px, which suits the
     single word "Login". These headings are three or four words in a 408px
     column, so 40px wraps to two heavy lines — step it down rather than let the
     same rule produce a different result. */
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gr-slate-900);
}
/* The explanatory sentence. Core renders it as a <legend> inside the fieldset;
   the override lifts it out to sit above the card as body copy, because it is
   an instruction to read before starting, not a label for a group of fields. */
.grm-account-lead {
  margin: 10px 0 0 0;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gr-slate-600);
}

/* The card. Values deliberately identical to body.view-login
   #com-users-login__form — if one changes, change both.

   Selected by ID for the same reason the login card is: the shared chrome rule
   above sets display:flex / padding:0 / background:transparent / border:none on
   the form, because profile-edit wants each <fieldset> to be its own card. That
   selector is (0,3,1) and no single class can beat it, so the card silently did
   not render. display:block undoes the flex column — field spacing here comes
   from .control-group margins, not from a gap. */
#grm-account-form.grm-account-form {
  display: block;
  padding: 28px 28px 24px 28px;
  margin: 0;
  background-color: #ffffff;
  border: 1px solid var(--gr-slate-100);
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04),
              0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* Field spacing comes from the shared .control-group rule (14px bottom
   margin), so the card is a plain block rather than a flex column — two
   spacing mechanisms would double the gaps. */
.grm-account-field {
  margin: 0 0 14px 0;
}

/* ALTCHA sits in the reset + remind forms as an ordinary field. An unknown
   element is display:inline by default; make it a block so it owns its row.
   Its inner .altcha box keeps the plugin's own 260px max-width — the sign-up
   form leaves that alone too, so the captcha is the same size on all three. */
.grm-account-form altcha-widget {
  display: block;
}

/* Submit — the green pill, full width, same as the login button. */
.grm-account-submit {
  margin: 18px 0 0 0;
}
.grm-account-submit .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  background-color: var(--gr-green);
  border: 1px solid var(--gr-green);
  border-radius: var(--gr-radius-full);
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease;
}
.grm-account-submit .btn:hover,
.grm-account-submit .btn:focus-visible {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}

/* Helper links under the card — the login page's __options list, so a visitor
   who lands on the wrong recovery page can cross to the right one. */
.grm-account-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 0 0;
  padding: 0;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  text-align: center;
}
.grm-account-links a {
  color: var(--gr-green-dark);
  text-decoration: none;
  font-weight: 500;
}
.grm-account-links a:hover {
  text-decoration: underline;
}

/* ============================================================================
   END ACCOUNT RECOVERY PAGES
   ============================================================================ */

/* ============================================================================
   MEMBER MAP ON PHONES — header hidden, floating burger + GRM mark, toolbar
   fixed to the BOTTOM (KJ, 2026-09-28).
   ----------------------------------------------------------------------------
   Supersedes the 2026-08-19 "strip under the site header" layout above (that
   block still runs first and does the row reflow; this one only re-anchors it).
   Kept at the END of the file on purpose: several rules here share a selector
   — and so a specificity — with the ones they override, and win by source
   order alone (docs/mobile-responsive-layer.md §3.1).

   The layout, top to bottom, at ≤ 767.98px on body.view-grrfrontendmembermapview:
     • #sp-header hidden. Its two jobs move onto the map as floating circles:
       .grm-mark (logo, top-left, links home) and .grm-burger--float (top-right,
       opens the same offcanvas drawer). Both are injected by mobile-menu.js.
     • the map fills the viewport.
     • the side-pane bottom sheet rises from the TOP of the toolbar, not the
       screen edge, so the toolbar is reachable with a road or the planner open.
     • .vertical-wrapper-controls, the horizontal scrolling strip, is FIXED to
       the bottom edge (viewport-anchored like the sheet, for the same reason:
       #map2's bottom overshoots the window by the height of any chrome above
       .body-innerwrapper).
   The strip is a FLOATING PILL, not a flush bar (KJ on a real iPhone,
   2026-09-28): flush to the screen edge, a swipe that starts on it begins in
   the OS's bottom-edge gesture zone — iOS turns it into the app switcher,
   and Android gesture navigation has the same zone. So it is lifted
   --grm-phone-toolbar-inset (16px, plus the home-indicator inset on phones
   that report one) off the edge and inset from the sides; what is under it
   is plain map, and the lowest touch point is well clear of the edge.
   --grm-phone-toolbar-h is the ONE number the sheet, the My Routes grid and
   the OS-cost panel all clear: inset + the pill (6 + 44 + 6 + 2px border =
   58px) + an 8px gap above it. (env() is 0 until the viewport meta carries
   viewport-fit=cover — it does not today.)
   ============================================================================ */
@media (max-width: 767.98px) {
  body.view-grrfrontendmembermapview {
    --grm-phone-toolbar-inset: calc(16px + env(safe-area-inset-bottom, 0px));
    --grm-phone-toolbar-h: calc(var(--grm-phone-toolbar-inset) + 58px + 8px);
  }
  body.view-grrfrontendmembermapview #sp-header {
    display: none;
  }

  /* The strip: same element, same row reflow, re-anchored as a floating pill. */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls {
    position: fixed;
    top: auto;
    bottom: var(--grm-phone-toolbar-inset);
    left: 12px;
    right: 12px;
    z-index: 1040;                         /* over the map, under the sheet (1050) — the sheet stops 8px above it */
    padding: 6px 10px;                     /* 10px ends so the first/last button clears the curve */
    border: 1px solid var(--gr-slate-100, #f1f5f9);
    border-radius: var(--gr-radius-full, 999px);   /* overflow-x:auto clips the scrolling row to the pill */
    background-color: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    box-shadow: var(--gr-shadow-glass, 0 1px 2px rgba(15,23,42,.06)), 0 10px 28px -10px rgba(15, 23, 42, .35);
  }

  /* No zoom buttons and no fullscreen on phones (KJ, 2026-09-28): pinch is
     how you zoom a map on a phone, and fullscreen is meaningless there. Both
     are OpenLayers controls targeted into the strip (index.ol.js for .ol-zoom,
     fullscreen.js for .ol-fullscreen); hiding them here keeps the desktop
     column untouched and the strip two buttons shorter.
     !important is required, not stylistic: grrfrontendmembermapview.css's
     legacy "beat OpenLayers" block declares `.ol-control { display: flex
     !important }`, and only another !important can beat it (the row reflow
     above needed the same for flex-direction). Verified 2026-09-28. */
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-zoom,
  body.view-grrfrontendmembermapview .vertical-wrapper-controls > .ol-fullscreen {
    display: none !important;
  }

  /* The sheet rises from 8px above the pill (the token includes the gap). */
  body.view-grrfrontendmembermapview .side-pane-dock {
    bottom: var(--grm-phone-toolbar-h);
  }

  /* My Routes / Shared grid (absolute in #map2): keep top:64px — it now clears
     the two floating circles instead of the old top strip — and clear the strip
     at the bottom. The collapsed-sheet variant adds the strip to its 160px. */
  body.view-grrfrontendmembermapview .route-planner-saved-grid {
    bottom: calc(var(--grm-phone-toolbar-h) + 8px);
  }
  body.view-grrfrontendmembermapview
    #map2:has(#route-planner-myroutes-toggle[aria-pressed="true"])
    .route-planner-saved-grid,
  body.view-grrfrontendmembermapview
    #map2:has(#route-planner-shared-toggle[aria-pressed="true"])
    .route-planner-saved-grid {
    bottom: calc(160px + var(--grm-phone-toolbar-h));
  }

  /* OpenLayers' attribution (bottom-right of #map2) would sit under the strip. */
  body.view-grrfrontendmembermapview #map2 > .ol-viewport .ol-attribution {
    bottom: var(--grm-phone-toolbar-h);
  }
  /* The superuser OS-tiles cost panel (osCostTracker.js, bottom-centre) styles
     itself from an injected <style> at bottom:16px; #map2 in the selector
     out-ranks that so it rides above the strip. */
  body.view-grrfrontendmembermapview #map2 .os-cost-tracker {
    bottom: calc(var(--grm-phone-toolbar-h) + 4px);
  }

  /* The GRM mark — top-left floating circle, phones only (the header, with
     its own logo, is back from 768px up). */
  .grm-mark {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    z-index: 1100;                         /* above the sheet (1050), below the offcanvas drawer (10000) */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 5px;
    border-radius: var(--gr-radius-full, 999px);
    background: #ffffff;
    border: 1px solid var(--gr-slate-100, #f1f5f9);
    box-shadow: var(--gr-shadow-sm, 0 1px 2px rgba(15,23,42,.06)), 0 6px 16px -4px rgba(15, 23, 42, .18);
    overflow: hidden;
  }
  .grm-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;                   /* the mark is 200×270 portrait — never crop it */
  }
  .grm-mark:focus-visible { outline: 2px solid var(--gr-green, #2f855a); outline-offset: 2px; }
}
.grm-mark { display: none; }               /* default: not rendered; the block above shows it on phones */
@media (max-width: 767.98px) { .grm-mark { display: flex; } }

/* The toolbar "peek" bubble (mobile-menu.js hintToolbarScroll): a dark
   speech bubble centred above the pill for the ~1.5s the strip is nudged.
   Lives on <body> (so the pill's overflow clipping cannot cut it), reads the
   inset token the body sets, and sits between the pill (1040) and the sheet
   (1050) — with the sheet open at load it is simply behind it. */
.grm-toolbar-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--grm-phone-toolbar-inset, 16px) + 58px + 12px);
  z-index: 1045;
  transform: translate(-50%, 6px);
  padding: 7px 14px;
  border-radius: var(--gr-radius-full, 999px);
  background: var(--gr-slate-900, #0f172a);
  color: #fff;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.grm-toolbar-hint::after {                  /* the tail, pointing at the pill */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.grm-toolbar-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* The floating burger (member map only, injected by mobile-menu.js). Shown
   wherever the megamenu is not — up to 991.98px, the same breakpoint as the
   in-header burger — because between 768 and 991px the header IS visible but
   holds no burger on this page (the element lives on <body> instead). There
   it floats in the header band's right-hand end, where the in-header burger
   would have sat. */
@media (max-width: 991.98px) {
  .grm-burger--float {
    position: fixed;
    top: 6px;                              /* centred in the 56px header band */
    right: 12px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--gr-radius-full, 999px);
    background: #ffffff;
    border: 1px solid var(--gr-slate-100, #f1f5f9);
    box-shadow: var(--gr-shadow-sm, 0 1px 2px rgba(15,23,42,.06)), 0 6px 16px -4px rgba(15, 23, 42, .18);
    color: var(--gr-slate-800, #1e293b);
    cursor: pointer;
  }
  .grm-burger--float:hover { color: var(--gr-green-dark, #166534); }
  .grm-burger--float:focus-visible { outline: 2px solid var(--gr-green, #2f855a); outline-offset: 2px; }
}
@media (max-width: 767.98px) {
  .grm-burger--float {
    top: calc(12px + env(safe-area-inset-top, 0px));   /* no header band: match the mark */
    width: 48px;
    height: 48px;
  }
  /* Local and dev only: plg_system_envmetatag injects a fixed 29px
     "<ENV> ENVIRONMENT" banner (.env-env-banner, z-index 10000) across the
     top, which would cover the top of both circles. Production has no banner,
     so this rule never fires there. The 29px is that banner's rendered height
     (measured 2026-09-28); nothing else depends on it. */
  body:has(.env-env-banner) .grm-mark,
  body:has(.env-env-banner) .grm-burger--float {
    top: calc(12px + 29px + env(safe-area-inset-top, 0px));
  }
}



/* ============================================================================
   Lane review banner — views/_partials/record_tabs.php (2026-10-05,
   docs/features/new-lane-submission.md). Shown under the tab strip on every
   record tab while a lane is draft / in review / rejected. Sitewide file
   because the partial is included by seven views on the ultimate-rch template.
   ============================================================================ */
.lane-review-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--gr-radius-lg, 12px); border: 1px solid var(--gr-slate-200, #e2e8f0); background: #fff; font-family: var(--gr-font-sans, Inter, sans-serif); font-size: 14px; color: var(--gr-slate-700, #334155); }
.lane-review-banner--draft     { border-color: #cbd5e1; background: #f8fafc; }
.lane-review-banner--in_review { border-color: #e0b64b; background: #fff8e6; }
.lane-review-banner--rejected  { border-color: #ef9a9a; background: #fdecea; }
.lane-review-banner__status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #e2e8f0; color: #1e293b; }
.lane-review-banner--in_review .lane-review-banner__status { background: #e0b64b; color: #2a1d00; }
.lane-review-banner--rejected  .lane-review-banner__status { background: #c62828; color: #fff; }
.lane-review-banner__text { flex: 1 1 260px; min-width: 0; line-height: 1.45; }
.lane-review-banner__text strong { color: var(--gr-slate-900, #0f172a); }
.lane-review-banner__reason { display: block; margin-top: 4px; padding: 6px 10px; border-left: 3px solid #c62828; background: rgba(255,255,255,.7); white-space: pre-line; }
.lane-review-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lane-review-banner__btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--gr-slate-300, #cbd5e1); background: #fff; color: var(--gr-slate-800, #1e293b); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lane-review-banner__btn:hover:not(:disabled) { border-color: #076633; color: #076633; }
.lane-review-banner__btn:disabled { opacity: .5; cursor: default; }
.lane-review-banner__btn--primary { background: #076633; border-color: #076633; color: #fff; }
.lane-review-banner__btn--primary:hover:not(:disabled) { background: #05522a; color: #fff; }
.lane-review-banner__btn--danger { border-color: #c62828; color: #c62828; }
.lane-review-banner__btn--danger:hover:not(:disabled) { background: #c62828; color: #fff; }
/* The pressed button while its request runs (the outcome email is sent before the page answers):
   full strength rather than the greyed :disabled look, a turning icon, and a busy cursor. */
.lane-review-banner__btn.is-working:disabled { opacity: 1; cursor: progress; }
.lane-review-banner__btn.is-working .material-icons-outlined { animation: lane-review-spin 1s linear infinite; }
@keyframes lane-review-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lane-review-banner__btn.is-working .material-icons-outlined { animation: none; } }
.lane-review-banner__link { font-size: 13px; color: #076633; text-decoration: underline; }
.lane-review-banner__form { flex-basis: 100%; display: none; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.lane-review-banner__form.is-open { display: flex; }
.lane-review-banner__form textarea { flex: 1 1 320px; min-height: 64px; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--gr-slate-300, #cbd5e1); border-radius: 8px; }
.lane-review-banner__err { flex-basis: 100%; color: #7f1d1d; font-size: 13px; }
@media (max-width: 767.98px) { .lane-review-banner { padding: 10px 12px; } .lane-review-banner__actions { flex-basis: 100%; } }

/* RCH dashboard — the Green Road Record card's action buttons (Add a lane / review queue), 2026-10-05.
   Restyled 2026-10-06 to the design system's pills: they rendered as the ultimate-rch template's flat
   mustard .bg-mustard, because the green-pill rule for these same classes covers card FOOTERS only.
   "+ Add a lane" = the primary green pill (as View more), here and in the review queue's sidebar;
   "Lanes awaiting review" = the secondary white pill (as the lane-review banner's buttons). */
.gr-list-card__header--actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.lane-dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
:is(body.view-grrfrontendlistview .lane-dash-actions, body.view-lanereviewfrontendlistview .gpx-sidebar-note) .gr-btn.btn-primary.bg-mustard {
  display: inline-flex;
  flex-wrap: wrap; /* on a phone the badges drop under the label as a group… */
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap; /* …rather than "Lanes awaiting / review" and "Drafts / 2" */
  padding: 9px 18px;
  font-family: var(--gr-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  background-color: var(--gr-green);
  border: 1px solid var(--gr-green);
  border-radius: var(--gr-radius-full);
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
:is(body.view-grrfrontendlistview .lane-dash-actions, body.view-lanereviewfrontendlistview .gpx-sidebar-note) .gr-btn.btn-primary.bg-mustard:hover {
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #ffffff;
}
:is(body.view-grrfrontendlistview .lane-dash-actions, body.view-lanereviewfrontendlistview .gpx-sidebar-note) .gr-btn.btn-primary.bg-mustard:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gr-green-soft), 0 1px 2px 0 rgba(34, 197, 94, 0.18);
}
body.view-grrfrontendlistview .lane-dash-actions .gr-btn.btn-primary.bg-mustard.lane-dash-actions__queue {
  color: var(--gr-slate-800);
  background-color: #ffffff;
  border-color: var(--gr-slate-300);
  box-shadow: none;
}
body.view-grrfrontendlistview .lane-dash-actions .gr-btn.btn-primary.bg-mustard.lane-dash-actions__queue:hover {
  color: var(--gr-green-dark);
  background-color: #ffffff;
  border-color: var(--gr-green-dark);
}
@media (prefers-reduced-motion: reduce) {
  :is(body.view-grrfrontendlistview .lane-dash-actions, body.view-lanereviewfrontendlistview .gpx-sidebar-note) .gr-btn.btn-primary.bg-mustard { transition: none; }
}
.lane-dash-actions__count { display: inline-block; min-width: 20px; padding: 3px 7px; border-radius: 999px; background: #c62828; color: #fff; font-size: 11px; font-weight: 600; line-height: 1; text-align: center; white-space: nowrap; }
/* Two badges since 2026-10-06 (TrfgrnLaneReview::dashboardCounts): "Drafts N" is the viewer's own unfinished
   work, so it is neutral; "Submitted N" keeps the red because it is waiting on someone. */
.lane-dash-actions__count--drafts { background: var(--gr-slate-700, #334155); }

/* ============================================================================
   SITE OFFLINE PAGE — login button (KJ, 2026-10-28)
   Helix's stock templates/shaper_helixultimate/offline.php renders a square
   Bootstrap `.btn.btn-success.login`. Restyled here, not in that file, because a
   Helix update overwrites it. The brand-green pill of the login page
   (body.view-login .com-users-login__submit .btn-primary). `.coming-soon-login`
   only exists on the offline page.
   ============================================================================ */
.coming-soon-login #form-login .btn.login {
  padding: 11px 22px;
  font-family: var(--gr-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  background-color: var(--gr-green);
  border: 1px solid var(--gr-green);
  border-radius: var(--gr-radius-full);
  box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.18);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.coming-soon-login #form-login .btn.login:hover {
  color: #ffffff;
  background-color: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
}
.coming-soon-login #form-login .btn.login:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gr-green-soft), 0 1px 2px 0 rgba(34, 197, 94, 0.18);
}
@media (prefers-reduced-motion: reduce) {
  .coming-soon-login #form-login .btn.login { transition: none; }
}
