/**
 * SOAPBOX ENGAGE MODERN TEMPLATE v1.0.0
 * css/template.css
 *
 * Load order: reset -> bootstrap -> font-awesome -> soapbox-bootstrap ->
 *             zozo-accordion -> soapboxTypography -> [bootstrap-responsive] ->
 *             [soapbox-responsive-bootstrap] -> THIS FILE
 *
 * Phases:
 *   2 -- CSS variables, body, header, nav, content, footer, mobile chrome
 *   3 -- Global typography + button normalization
 *   4 -- Auctions-derived form/interaction system (inputs, radio, checkbox, validation)
 *   5 -- Per-app normalization (Donations, Events, Shop, Forms, Directories, Actions, Petitions)
 *   6 -- Mobile QA: touch targets, table scroll, Directories filter stacking
 */

/*
 * RESPONSIVE STRATEGY
 *
 * Convention: max-width media queries (desktop-first).
 * Rationale: Bootstrap 2 and soapbox-responsive-bootstrap.min.css both use
 * max-width queries. Mixing conventions would create specificity conflicts
 * with system stylesheets. All breakpoints in this file use max-width.
 *
 * Breakpoints -- two only:
 *   768px  Primary layout breakpoint. Matches Bootstrap 2 / Soapbox platform.
 *          Used for: nav collapse, content card radius reduction, vertical
 *          stacking of multi-column chrome (footer), main padding reduction.
 *   480px  Phone-specific adjustments only. Reserved for cases where the
 *          768px rules still leave something too large for tight phones.
 *          Must not be added to freely -- prefer fluid solutions first.
 *
 * Fluid-first principle:
 *   Prefer clamp(), flex-wrap, percentage widths, and auto margins over
 *   additional breakpoints. A layout that reflows naturally needs fewer rules.
 *
 *   clamp() is used for:
 *     - Heading font sizes (scale between min and max across viewport widths)
 *     - Content card padding (avoids a media query for padding alone)
 *
 * Input font sizes: MUST NOT drop below 16px (1rem) on any screen size.
 * iOS Safari zooms the viewport when a focused input is smaller than 16px.
 * --sbx-font-size-input is fixed at 1rem and must never be overridden smaller.
 */


/* ===========================================================================
   DESIGN SYSTEM -- CSS CUSTOM PROPERTIES
   =========================================================================== */
:root {

  /* -- Primary Color -------------------------------------------------------- */
  --sbx-primary:           rgb(55, 86, 148);     /* #375694                   */
  --sbx-primary-rgb:       55, 86, 148;           /* for rgba() usage          */
  --sbx-primary-dark:      rgb(40, 63, 110);     /* ~15% darker -- hover/press */
  --sbx-primary-darker:    rgb(28, 44, 78);      /* ~30% darker -- active/dark */
  --sbx-primary-light:     rgb(91, 120, 178);    /* ~20% lighter              */
  --sbx-primary-pale:      rgb(220, 228, 243);   /* tint -- bg highlights      */

  /* -- Semantic Colors ------------------------------------------------------ */
  --sbx-success:           #2e7d32;
  --sbx-success-rgb:       46, 125, 50;
  --sbx-success-bg:        #e8f5e9;
  --sbx-success-text:      #1b4d1e;
  --sbx-error:             #c62828;
  --sbx-error-rgb:         198, 40, 40;
  --sbx-error-bg:          #fff0f0;
  --sbx-error-text:        #7f1515;
  --sbx-warning:           #92400e;
  --sbx-warning-rgb:       146, 64, 14;
  --sbx-warning-bg:        #fffbeb;
  --sbx-warning-text:      #6b3700;
  --sbx-info:              var(--sbx-primary);
  --sbx-info-bg:           var(--sbx-primary-pale);

  /* -- Accent / Secondary Support Tone ------------------------------------- */
  /*
   * NOT a second brand color. A muted slate-blue that supports the primary
   * without competing. Used for: secondary buttons, inactive pills, muted
   * chip hover states. Passes WCAG AA (4.8:1 on white) at full opacity.
   */
  --sbx-accent:            rgb(88, 109, 140);    /* #586d8c -- cool slate     */
  --sbx-accent-rgb:        88, 109, 140;
  --sbx-accent-soft:       rgb(234, 239, 247);   /* #eaeff7 -- accent wash    */

  /* -- Surfaces & Neutrals -------------------------------------------------- */
  --sbx-bg-page:           #ffffff;
  --sbx-surface:           #ffffff;
  /* The alternate surface and its hairline follow the BRAND, not a fixed cool
     grey. Both were #f5f7fb / #e8ebf3 — blue-greys that read as foreign objects
     on a warm brand, which is visible on every table header, well and panel in
     the template, not only on the Card pattern where it was first noticed.

     6% and 13% were chosen by matching the previous tokens' luminance rather
     than by eye: measured against five brand colors (warm orange, slate, blue,
     green, magenta) 6% lands within 0.03 of the old 0.9290 in every case, and
     body-text contrast holds at 12.6–13.0:1 against the old 13.02:1. 4% was too
     light to keep the deliberate distinction from white the old comment records.

     DECLARED TWICE ON PURPOSE. A browser without color-mix drops the second
     declaration and keeps the literal, which is the only fallback mechanism a
     custom property has. Do not collapse these into one line. */
  --sbx-surface-alt:       #f5f7fb;
  --sbx-surface-alt:       color-mix(in srgb, var(--sbx-primary) 6%, #fff);
  --sbx-surface-muted:     rgb(241, 244, 250);   /* #f1f4fa -- intentional muted surface */
  --sbx-surface-control:   rgb(218, 223, 237);   /* #dadeee -- interactive control track + card bg */
  --sbx-surface-dark:      rgb(28, 44, 78);      /* footer, dark sections     */
  --sbx-border-color:      #e0e4ed;
  --sbx-border-strong:     #b8c1d4;
  --sbx-border-subtle:     rgb(232, 235, 243);   /* #e8ebf3 -- hairline on white cards */
  --sbx-border-subtle:     color-mix(in srgb, var(--sbx-primary) 13%, #fff);

  /* -- Text ----------------------------------------------------------------- */
  --sbx-text-body:         #2c2c2c;
  --sbx-text-muted:        #6b7280;
  --sbx-text-heading:      #1a1f2e;
  --sbx-page-title-color:  var(--sbx-text-heading); /* overridden per-variant by token renderer */
  --sbx-text-on-primary:   #ffffff;
  --sbx-text-on-dark:      #d0d8ec;              /* body text on dark bg      */
  --sbx-text-link:         var(--sbx-primary);
  --sbx-text-link-hover:   var(--sbx-primary-dark);

  /* -- Typography: Families ------------------------------------------------- */
  /* Lato loaded via Google Fonts in index.php                                */
  --sbx-font-body:         'Lato', helvetica, arial, sans-serif;
  --sbx-font-heading:      'Lato', helvetica, arial, sans-serif;
  --sbx-font-ui:           var(--sbx-font-body);

  /* -- Typography: Sizes ---------------------------------------------------- */
  --sbx-font-size-base:    16px;
  --sbx-font-size-xs:      0.75rem;              /* 12px                      */
  --sbx-font-size-sm:      0.875rem;             /* 14px                      */
  --sbx-font-size-lg:      1.125rem;             /* 18px                      */
  /* clamp(min, fluid, max): headings scale fluidly between viewport extremes  */
  --sbx-font-size-h1:      clamp(1.75rem, 4vw, 2.5rem);     /* 28px -> 40px  */
  --sbx-font-size-h2:      clamp(1.25rem,  3vw,   1.5rem);   /* 20px -> 24px  */
  --sbx-font-size-h3:      1.25rem;              /* 20px -- fixed; fine at all sizes */
  --sbx-font-size-btn:     1rem;                 /* 16px                      */
  /* MUST NOT be reduced below 1rem (16px): iOS Safari auto-zooms on focus   */
  --sbx-font-size-input:   1rem;                 /* 16px -- iOS zoom floor     */
  --sbx-font-size-label:   0.8125rem;            /* 13px -- uppercase labels   */

  /* -- Spacing -------------------------------------------------------------- */
  --sbx-space-xs:          0.25rem;              /* 4px                       */
  --sbx-space-sm:          0.5rem;               /* 8px                       */
  --sbx-space-md:          1rem;                 /* 16px                      */
  --sbx-space-lg:          1.5rem;               /* 24px                      */
  --sbx-space-xl:          2rem;                 /* 32px                      */

  /* -- Border Radius -------------------------------------------------------- */
  --sbx-radius-sm:         4px;
  --sbx-radius-input:      6px;
  --sbx-radius-btn:        6px;
  --sbx-radius-card:       10px;
  --sbx-radius-check:      4px;                  /* checkbox corners          */
  --sbx-radius-radio:      50%;                  /* radio -- always circular   */
  --sbx-radius-pill:       999px;

  /* -- Buttons -------------------------------------------------------------- */
  --sbx-btn-primary-bg:    var(--sbx-primary);
  --sbx-btn-primary-text:  var(--sbx-text-on-primary);
  --sbx-btn-padding:       0.75rem 1.5rem;       /* 12px 24px                 */
  --sbx-btn-padding-sm:    0.5rem 1rem;          /* 8px 16px                  */
  --sbx-btn-height:        48px;
  --sbx-btn-height-sm:     36px;

  /* -- Forms / Inputs ------------------------------------------------------- */
  --sbx-input-bg:          #ffffff;
  --sbx-input-border:      #c8cedb;
  --sbx-input-padding:     0.625rem 0.875rem;    /* 10px 14px                 */
  --sbx-input-height:      48px;                 /* matches btn height        */
  --sbx-label-color:       var(--sbx-text-muted);

  /* -- Layout --------------------------------------------------------------- */
  --sbx-content-width:       1140px;
  --sbx-content-width-wide:  1320px;   /* expanded variant (future wide-layout pages)   */
  --sbx-content-width-text:  720px;    /* comfortable prose reading width               */
  --sbx-header-height:       80px;  /* updated v134: 60px logo + 10px clearance each side; Auctions renders 77px */
  /* Header inner padding. 3.4rem = 54.4px = Auctions' measured auction-app-header-wrapper
   * padding at 1440px. 3.78vw reaches that value exactly at 1440px viewport. */
  --sbx-header-padding-x:    clamp(1rem, 3.78vw, 3.4rem);

  /* -- Shadows -------------------------------------------------------------- */
  --sbx-shadow-sm:         0 1px 3px rgba(0, 0, 0, 0.08);
  --sbx-shadow-header:     0 1px 4px rgba(0, 0, 0, 0.10);
  --sbx-shadow-card:       0 2px 8px rgba(55, 86, 148, 0.08),
                           0 1px 2px rgba(0, 0, 0, 0.05);
  --sbx-shadow-card-hover: 0 8px 24px rgba(55, 86, 148, 0.15),
                           0 2px 6px rgba(0, 0, 0, 0.08);
  --sbx-shadow-focus:      0 0 0 3px rgba(var(--sbx-primary-rgb), 0.22);
  --sbx-shadow-dialog:     0 20px 60px rgba(0, 0, 0, 0.25);

  /* -- Transitions ---------------------------------------------------------- */
  --sbx-transition:        150ms ease;
  --sbx-transition-slow:   300ms ease;

  /* -- Skeleton / Loading States ------------------------------------------- */
  --sbx-skel-base:     #eaecef;   /* slightly blue-tinted gray -- matches border tints  */
  --sbx-skel-shimmer:  #f4f5f7;   /* barely lighter -- 4% lightness delta = very subtle */
  --sbx-skel-speed:    1.8s;      /* slow cycle = elegant; avoids "loading spinner" feel */
  --sbx-skel-radius:   var(--sbx-radius-input);

  /* -- Motion tokens (extended from --sbx-transition) ---------------------- */
  --sbx-motion-fast:   120ms;
  --sbx-motion-base:   220ms;
  --sbx-motion-slow:   360ms;
  --sbx-motion-ease:   cubic-bezier(0.4, 0, 0.2, 1);  /* material standard    */
  --sbx-motion-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* gentle overshoot  */

  /* -- Auctions Integration Point ------------------------------------------- */
  /*
   * Auctions reads --sbx-live-base for its primary color.
   * Assigning it here feeds the unified brand color into the Auctions SPA
   * without touching any Auctions component code or CSS.
   *
   * The Auctions app hides the site template chrome intentionally:
   *   #header, #portalmenu { display: none !important; }
   * This is expected -- Auctions provides its own app header.
   * The template does not attempt to override that behavior.
   */
  --sbx-live-base:         var(--sbx-primary);

  /* -- P2P: empty-state gradient (no-image card / fundraiser placeholder) --- */
  --sbx-p2p-gradient-empty: linear-gradient(
    135deg,
    color(srgb 0.95 0.96784 0.98314),
    color(srgb 0.88 0.92282 0.95953) 45%,
    color(srgb 0.92 0.94855 0.97302)
  );

  /* -- Overlay / photo gradient base ---------------------------------------- */
  /*
   * Deep navy for dark overlays over photos (hero banners, team headers).
   * Not derived from --sbx-primary: overlays need neutral darkness, not brand tint.
   * Usage: rgba(var(--sbx-overlay-rgb), opacity).
   * Note: #sbox-overlay uses rgba(10, 15, 35, ...) — a slightly deeper shade,
   * tuned separately for modal backdrop darkness; left as a raw value there.
   */
  --sbx-overlay-rgb:        20, 28, 50;
}


/* ===========================================================================
   BASE
   =========================================================================== */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family:      var(--sbx-font-body);
  font-size:        var(--sbx-font-size-base);
  color:            var(--sbx-text-body);
  background-color: var(--sbx-bg-page);
  line-height:      1.6;
  margin:           0;
  padding:          0;
}


/* ===========================================================================
   OUTER WRAPPER
   =========================================================================== */
#wrapper {
  display:        flex;
  flex-direction: column;
  min-height:     100vh;
}

/* v172 (S19): Bootstrap 2's .container class sets width:940px as a fixed value with
 * no large-viewport expansion in the system bootstrap-responsive.min.css.
 * This has capped all desktop layouts at 940px, making --sbx-content-width:1140px
 * ineffective. Override here so #wrapper fills the viewport; all inner elements
 * (#mainbody, #footerinner, etc.) retain their own max-width centering. */
#wrapper.container {
  width:     100%;
  max-width: none;
}


/* ===========================================================================
   HEADER
   =========================================================================== */
#header {
  background:   var(--sbx-surface);
  border-bottom: 1px solid #dee2e6;  /* matches Auctions' Bootstrap border-bottom utility */
  position:     sticky;
  top:          0;
  z-index:      100;
  width:        100%;
  flex-shrink:  0;
}

/* v172 (S19 refined): #header is full-viewport-width chrome; #headerinner is the
 * content wrapper.
 *
 * THE CENTRED 1320px CAP IS GONE (v255). It existed so "header and body share the
 * same centered spatial system", and that premise stopped being true when the
 * aside split was reworked: on a page with a photo panel the body no longer
 * centres in a container at all -- the panel reaches the viewport edge and the
 * content centres in what is left. The header went on centring in 1320px, so at
 * 1920 the logo sat 354px from the edge above a layout that ran edge to edge,
 * and the nav on the right was pulled the same distance inward.
 *
 * Padding alone now sets the gutter, which is what --sbx-header-padding-x was
 * for: clamp(1rem, 3.78vw, 3.4rem), so 16px at 320 and 54.4px from 1440 up. The
 * reference implementation uses a flat 28px at every width; this is the same
 * idea with our own scale.
 *
 * NOTHING BELOW 1320px MOVES. The cap only bound above its own value, so every
 * viewport narrower than that already used padding alone and renders identically
 * -- verified at 1280.
 *
 * Applied on every page, not only pages with an aside. The header is persistent
 * chrome and a logo that jumps 60px when you navigate between two kinds of page
 * is worse than a header that is wider than the content beneath it, which is an
 * ordinary arrangement. */
#headerinner {
  max-width:   none;
  margin:      0 auto;
  padding:     0 var(--sbx-header-padding-x);
  height:      var(--sbx-header-height);
  display:     flex;
  align-items: center;
}

#logo {
  margin:      0;
  padding:     0;
  line-height: 1;
  font-size:   1rem;                             /* reset Bootstrap h1 sizing */
  border:      none;
}

#logo a {
  display:     inline-flex;
  align-items: center;
  text-decoration: none;
}

#logo img {
  max-height: 60px;  /* matches Auctions logo render height (224px source → 60px rendered) */
  max-width:  300px; /* guards against SVGs with no valid viewBox defaulting to 300px wide */
  width:      auto;  /* scale proportionally from height; SVG must have intrinsic dimensions */
  height:     auto;
  display:    block;
}


/* ===========================================================================
   HEADER NAVIGATION — portalmenu
   Scoped to ul.portalUserMenu-menu-sfx (Extended Menu module class suffix).
   #portalmenu retains flex positioning only; all item styles use the suffix.
   =========================================================================== */

/* portalmenu nav: flex child of #headerinner, pushed right */
#portalmenu {
  display:     flex;
  align-items: center;
  gap:         1rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Top-level list: horizontal flex row.
 * list-style: none + display: flex (not list-item) eliminates ::marker in all browsers.
 * ::before / ::after suppressed: the system clearfix class injects both pseudo-elements;
 * each becomes a flex item and adds a phantom gap in the flex row. */
ul.portalUserMenu-menu-sfx {
  list-style:  none !important;
  display:     flex;
  align-items: center;
  gap:         1rem;
  margin:      0 !important;
  padding:     0 !important;
  flex-wrap:   nowrap;
}
ul.portalUserMenu-menu-sfx::before,
ul.portalUserMenu-menu-sfx::after {
  display: none !important;
}

/* display:flex removes ::marker; background-image:none kills the system bullet PNG */
ul.portalUserMenu-menu-sfx > li {
  display:          flex;
  align-items:      center;
  list-style:       none !important;
  background-image: none !important;
  margin:           0;
  padding:          0;
  position:         relative;
}

/* Top-level links: 38px tall to match Auctions nav item height */
ul.portalUserMenu-menu-sfx > li > a {
  display:         inline-flex;
  align-items:     center;
  height:          38px;
  padding:         0 0.75rem;
  color:           var(--sbx-text-muted);
  text-decoration: none;
  font-family:     var(--sbx-font-ui);
  font-size:       1rem;
  font-weight:     600;
  white-space:     nowrap;
  border-radius:   var(--sbx-radius-input);
  transition:      color var(--sbx-transition), background var(--sbx-transition);
}

ul.portalUserMenu-menu-sfx > li > a:hover {
  color:      var(--sbx-primary);
  background: var(--sbx-accent-soft);
}

/* Active / current page */
ul.portalUserMenu-menu-sfx > li.active > a,
ul.portalUserMenu-menu-sfx > li.current > a {
  color:       var(--sbx-primary);
  font-weight: 700;
}

/* -- Home: 38×38 square icon link, fa-home via ::before, text hidden ----- */
ul.portalUserMenu-menu-sfx a[title="Home"] .menu-title {
  display: none;
}
ul.portalUserMenu-menu-sfx a[title="Home"] {
  width:           38px;
  height:          38px;
  padding:         0;
  justify-content: center;
}
ul.portalUserMenu-menu-sfx a[title="Home"]::before {
  font-family: FontAwesome;
  content:     "\f015";
  font-size:   1.5rem;  /* 24px; FA4 renders lighter than FA6 Solid at equal size — +4px closes the visual gap */
  line-height: 1;
  color:       var(--sbx-text-muted);
  transition:  color var(--sbx-transition);
}
ul.portalUserMenu-menu-sfx a[title="Home"]:hover::before {
  color: var(--sbx-primary);
}

/* -- Sign In: text button, primary color, no bg (matches Auctions btn-link) */
.sbx-usermenu-signin-btn {
  height:          38px !important;
  padding:         0 0.5rem !important;
  background:      transparent !important;
  border:          none !important;
  color:           var(--sbx-primary) !important;
  font-family:     var(--sbx-font-ui) !important;
  font-size:       1rem !important;
  font-weight:     600 !important;
  border-radius:   var(--sbx-radius-input) !important;
  transition:      color var(--sbx-transition), background var(--sbx-transition) !important;
  white-space:     nowrap;
  cursor:          pointer;
}
.sbx-usermenu-signin-btn:hover {
  color:      var(--sbx-primary-dark) !important;
  background: var(--sbx-accent-soft) !important;
  border:     none !important;
}

/* -- Sign Up: filled primary button (matches Auctions btn-primary px-3) --- */
ul.portalUserMenu-menu-sfx a[title="Sign Up"] {
  background:    var(--sbx-primary) !important;
  color:         var(--sbx-btn-primary-text) !important;
  padding:       0 1rem !important;
  font-weight:   600;
  border-radius: var(--sbx-radius-btn) !important;
}
ul.portalUserMenu-menu-sfx a[title="Sign Up"]:hover {
  background:      var(--sbx-primary-dark) !important;
  color:           var(--sbx-btn-primary-text) !important;
  text-decoration: none;
}

/* -- Profile: 38×38 circular avatar (logged-in, Registered access only) --
 * display:flex on the <li> removes list-item context; explicit dimensions
 * override any flex-stretch; icon via ::before, text hidden.
 */
ul.portalUserMenu-menu-sfx a[title="Profile"] .menu-title {
  display: none;
}
ul.portalUserMenu-menu-sfx a[title="Profile"] {
  width:           38px;
  height:          38px;
  min-width:       38px;
  padding:         0;
  border-radius:   50%;
  /* neutral avatar bg/border — no exact token match; nearest: --sbx-surface-muted / --sbx-border-subtle */
  background:      rgb(240, 240, 240);
  border:          1px solid #dddddd;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  color:           var(--sbx-text-muted);
  transition:      border-color var(--sbx-transition), background var(--sbx-transition);
}
ul.portalUserMenu-menu-sfx a[title="Profile"]:hover,
ul.portalUserMenu-menu-sfx li.havechild.sbx-open > a[title="Profile"] {
  /* neutral hover: no exact token match; nearest: --sbx-surface-control / --sbx-border-strong */
  background:   rgb(225, 225, 225);
  border-color: #bbbbbb;
}
ul.portalUserMenu-menu-sfx a[title="Profile"]::before {
  font-family: FontAwesome;
  content:     "\f007";
  font-size:   var(--sbx-font-size-lg);
  line-height: 1;
  color:       var(--sbx-text-muted);
}

/* -- Dropdown submenu: Auctions-style white card ------------------------- */
ul.portalUserMenu-menu-sfx ul {
  display:       none;
  list-style:    none !important;
  margin:        0 !important;
  padding:       var(--sbx-space-xs) 0 !important;
  position:      absolute;
  top:           calc(100% + 6px);
  right:         0;
  left:          auto;
  z-index:       300;
  background:    var(--sbx-surface);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  box-shadow:    var(--sbx-shadow-dialog);
  min-width:     180px;
}

/* CSS-only fallback (no JS): hover shows dropdown */
ul.portalUserMenu-menu-sfx li:hover > ul {
  display: block;
}
/* When JS is running, disable CSS :hover so click-to-toggle works correctly */
body.sbx-js ul.portalUserMenu-menu-sfx li:hover > ul {
  display: none;
}
body.sbx-js ul.portalUserMenu-menu-sfx li.havechild.sbx-open > ul {
  display: block;
}

/* display:block removes ::marker; background-image:none kills the system bullet PNG */
ul.portalUserMenu-menu-sfx ul > li {
  display:          block;
  list-style:       none !important;
  background-image: none !important;
  margin:           0;
  padding:          0;
}

/* Dropdown item links */
ul.portalUserMenu-menu-sfx ul > li > a {
  display:         block;
  padding:         0.5rem var(--sbx-space-md);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     500;
  color:           var(--sbx-text-body);
  text-decoration: none;
  white-space:     nowrap;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}
ul.portalUserMenu-menu-sfx ul > li > a:hover {
  background: var(--sbx-surface-muted);
  color:      var(--sbx-primary);
}

/* -- Sign Out (item2): divider + white-bg button with icon --------------- */
ul.portalUserMenu-menu-sfx ul > li.item2 {
  border-top:  1px solid var(--sbx-border-color);
  margin-top:  var(--sbx-space-xs);
  padding-top: var(--sbx-space-xs);
}
ul.portalUserMenu-menu-sfx ul > li.item2 > a {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             0.4rem;
  margin:          0 var(--sbx-space-xs);
  padding:         0.4rem var(--sbx-space-sm);
  border-radius:   var(--sbx-radius-btn);
  border:          1px solid var(--sbx-border-color);
  background:      var(--sbx-surface);
  color:           var(--sbx-text-body);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     400;
  text-align:      center;
  white-space:     nowrap;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition), color var(--sbx-transition);
}
ul.portalUserMenu-menu-sfx ul > li.item2 > a::before {
  font-family: FontAwesome;
  content:     "\f08b";
  font-size:   0.8125rem;
  line-height: 1;
  flex-shrink: 0;
}
ul.portalUserMenu-menu-sfx ul > li.item2 > a:hover {
  /* #555555: neutral dark gray, no exact token match */
  background:   #555555;
  border-color: #555555;
  color:        var(--sbx-text-on-primary);
}


/* ===========================================================================
   MAIN CONTENT AREA
   =========================================================================== */
/* body-shell alignment: gap removed per ADR 22 / body-alignment pass */
#main {
  flex:    1;
  padding: 0;
}

#mainbody {
  max-width: var(--sbx-content-width);
  margin:    0 auto;
  padding:   0 var(--sbx-space-md);
}

/* v220: borders and shadow removed at every breakpoint, completing the
   direction set out in ADR 23. The radius went in v187 and the top border in
   v188, both to align the body shell with the Auctions app shell, which is
   flush and square-cornered; ADR 23 explicitly rejected the "card within a
   page" treatment these borders produced. The side borders and shadow were
   already suppressed at <=1024px, so only desktop still carried them.

   Nothing is lost as a boundary: #header supplies its own border-bottom above,
   and #footer is a dark surface with a 3px brand rule sitting flush against the
   content (measured gap: 0px). The bottom border in particular was invisible.

   Padding is deliberately untouched — 11 negative-margin escapes mirror
   clamp(1rem, 3vw, 2rem) exactly to break content out of this box, and changing
   it would misalign every one of them. */
#content {
  background:    var(--sbx-surface);
  border:        none;
  box-shadow:    none;
  /* Fluid padding: 1rem at narrow viewports, scales to 2rem at wide ones.
     Eliminates a breakpoint rule for padding alone. */
  padding:       clamp(1rem, 3vw, 2rem);
  min-height:    200px;
}

/* -- Content area: base link color -------------------------------------------
 * Scoped to #content only so nav, footer, and button links are unaffected.
 *
 * Specificity of #content a is 0,1,0,1 (101pts) -- higher than Bootstrap's
 * a (0,0,0,1 = 1pt) so it overrides the default blue, but also higher than
 * Phase 3 button rules like a.btn.btn-primary (0,0,2,1 = 21pts). The :not()
 * exclusions prevent this rule from matching button and icon-link elements
 * entirely, so there is no specificity conflict with them.
 *
 * Excluded:
 *   .btn      -- a.btn.btn-primary link-buttons (Phase 3)
 *   .readon   -- a.readon secondary CTA (Phase 3)
 *   .button   -- Soapbox generic button class
 *   .share-link -- 44px icon circle links inside Actions/Petitions (Phase 5)
 *   .modal    -- SqueezeBox trigger links (e.g. Campaign Lookup "Select" button)
 */
#content a:not(.btn):not(.readon):not(.button):not(.share-link):not(.modal) {
  color:                 var(--sbx-text-link);
  text-decoration:       underline;
  text-underline-offset: 2px;
}

#content a:not(.btn):not(.readon):not(.button):not(.share-link):not(.modal):hover {
  color:           var(--sbx-text-link-hover);
  text-decoration: underline;
}


/* ===========================================================================
   FOOTER
   =========================================================================== */
#footer {
  background:  var(--sbx-surface-dark);
  color:       var(--sbx-text-on-dark);
  border-top:  3px solid var(--sbx-primary);  /* v172: visual anchor; ties footer to brand color */
  padding:     var(--sbx-space-xl) 0;
  flex-shrink: 0;
}

/* v218: stacked and centered rather than a left-aligned row. The logo takes its
   own line with the identity below it, which reads as a deliberate sign-off
   instead of a masthead, and holds up at any width without the brand and org
   columns fighting for space. */
#footerinner {
  max-width:       var(--sbx-content-width);
  margin:          0 auto;
  padding:         0 var(--sbx-space-md);
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  text-align:      center;
  gap:             var(--sbx-space-lg);
}

.footer-brand {
  flex-shrink: 0;
  padding-top: 0;
}

/* Invert the logo to white on the dark footer background.
   v219: constrained by WIDTH rather than height, so the mark reads at a
   consistent size across logos of different proportions. The height cap is the
   safety net for a tall or square mark, which a width-only rule would let grow
   unreasonably. */
.footer-logo {
  max-width:  140px;
  max-height: 56px;
  width:      auto;
  height:     auto;
  display:    block;
  opacity:    0.9;
  filter:     brightness(0) invert(1);
}

/* No longer a flex column competing with the brand — it sits under the logo and
   takes only the width its text needs. */
.footer-org {
  flex:      0 1 auto;
  min-width: 0;
}

/* Same weight as the address below it: at this size the heavier weight read as
   a heading rather than the first line of an address block. */
.footer-org-name {
  font-weight:   400;
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-on-primary);
  margin:        0 0 var(--sbx-space-xs) 0;
  font-family:   var(--sbx-font-heading);
}

.footer-address {
  font-style:  normal;
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-on-dark);
  line-height: 1.75;
  margin:      0;
  padding:     0;
  border:      none;
}

.footer-address a {
  color:           var(--sbx-primary-pale);
  text-decoration: none;
}

.footer-address a:hover {
  text-decoration: underline;
}

.footer-legal {
  width:        100%;
  padding-top:  var(--sbx-space-lg);
  border-top:   1px solid rgba(255, 255, 255, 0.10);
}

/* Column flow: flex-basis no longer stretches a child, so the band wrapper needs
   an explicit width or published footer content would shrink to its text. */
.footer-extra {
  width: 100%;
}

.footer-copyright {
  font-size: var(--sbx-font-size-xs);
  color:     rgba(255, 255, 255, 0.45);
  margin:    0;
}


/* ===========================================================================
   PLATFORM SYSTEM MESSAGES  (Phase 9)
   Covers two message containers:
     dl#system-message     — page-level system messages (jdoc:include type="message")
     dl#component-message  — Soapbox app inline messages (Donations, Events, etc.)
   soapbox-bootstrap uses dotted borders + harsh reds + 1.7em centered text.
   These rules replace that entirely.
   =========================================================================== */

/* Container */
dl#system-message,
dl#component-message {
  margin:     0 0 var(--sbx-space-md);
  padding:    0;
  border:     none;
  background: none;
  width:      100%;
}

/* DT: message-type label — visible on page-level system messages */
dl#system-message dt {
  display:         block;
  padding:         0.3125rem var(--sbx-space-md);
  font-size:       var(--sbx-font-size-xs);
  font-weight:     700;
  letter-spacing:  0.09em;
  text-transform:  uppercase;
  border-radius:   var(--sbx-radius-sm) var(--sbx-radius-sm) 0 0;
  border-left:     3px solid;
  border-top:      1px solid;
  border-right:    1px solid;
  border-bottom:   none;
}

/* App component-message DT hidden by soapbox-bootstrap — keep it hidden */
dl#component-message dt {
  display: none;
}

/* DD: message body */
dl#system-message dd,
dl#component-message dd {
  margin:        0 0 var(--sbx-space-sm);
  padding:       0.6875rem var(--sbx-space-md);
  border-left:   3px solid;
  border-top:    1px solid;
  border-right:  1px solid;
  border-bottom: 1px solid;
  border-radius: var(--sbx-radius-sm);
  font-size:     var(--sbx-font-size-sm);
  line-height:   1.55;
}

/* When preceded by a visible dt, flatten the top radius on dd */
dl#system-message dt + dd {
  border-top:           none;
  border-radius:        0 0 var(--sbx-radius-sm) var(--sbx-radius-sm);
}

/* UL/LI inside message body — reset soapbox-bootstrap overrides.
 * soapbox-bootstrap's per-state ul rules (#system-message dd.error ul)
 * have specificity (1,1,2); per-state li rules (1,2,1).
 * We match/exceed both by listing explicit state classes (giving 1,2,2). */
#system-message       dd.error   ul, #component-message   dd.error   ul,
#system-message       dd.message ul, #component-message   dd.message ul,
#system-message       dd.notice  ul, #component-message   dd.notice  ul,
#system-message       dd.warning ul, #component-message   dd.warning ul,
#system-messageDetail dd.error   ul,
#system-messageDetail dd.message ul,
#system-messageDetail dd.notice  ul,
#system-messageDetail dd.warning ul {
  margin:      0;
  padding:     0;
  list-style:  none;
  background:  none;
  border:      none;
}

#system-message       dd.error   ul li,
#component-message    dd.error   ul li,
#system-message       dd.message ul li,
#component-message    dd.message ul li,
#system-message       dd.notice  ul li,
#component-message    dd.notice  ul li,
#system-message       dd.warning ul li,
#component-message    dd.warning ul li,
#system-messageDetail dd.error   ul li,
#system-messageDetail dd.message ul li,
#system-messageDetail dd.notice  ul li,
#system-messageDetail dd.warning ul li {
  background:  none;
  padding:     0.125rem 0;
  margin:      0;
  font-size:   var(--sbx-font-size-sm);
  font-weight: 500;
  color:       inherit;
  text-align:  left;
  line-height: 1.55;
  height:      auto;
  width:       auto;
}

/* ── Error ──────────────────────────────────────────────────── */
dl#system-message dt.error {
  background:    rgba(var(--sbx-error-rgb), 0.07);
  color:         var(--sbx-error-text);
  border-color:  var(--sbx-error);
}

dl#system-message dd.error,
dl#component-message dd.error {
  background:    var(--sbx-error-bg);
  border-color:  var(--sbx-error);
  color:         var(--sbx-error-text);
}

/* ── Success / message ──────────────────────────────────────── */
dl#system-message dt.message {
  background:    rgba(var(--sbx-success-rgb), 0.07);
  color:         var(--sbx-success-text);
  border-color:  var(--sbx-success);
}

dl#system-message dd.message,
dl#component-message dd.message {
  background:    var(--sbx-success-bg);
  border-color:  var(--sbx-success);
  color:         var(--sbx-success-text);
}

/* dd.error.message: Donations app sets both classes on error DDs (the
 * .message class drives the MooTools fade animation, not the semantic state).
 * This combined-class rule (specificity 1,3,1) wins over both dd.error and
 * dd.message (each 1,2,1) and always renders the error semantic correctly. */
dl#system-message dd.error.message,
dl#component-message dd.error.message {
  background:   var(--sbx-error-bg);
  border-color: var(--sbx-error);
  color:        var(--sbx-error-text);
}

/* ── Notice / warning ───────────────────────────────────────── */
dl#system-message dt.notice,
dl#system-message dt.warning {
  background:    rgba(var(--sbx-warning-rgb), 0.07);
  color:         var(--sbx-warning-text);
  border-color:  var(--sbx-warning);
}

dl#system-message dd.notice,
dl#system-message dd.warning,
dl#component-message dd.notice,
dl#component-message dd.warning {
  background:    var(--sbx-warning-bg);
  border-color:  var(--sbx-warning);
  color:         var(--sbx-warning-text);
}

/* ── Info (fallback for any unknown type) ───────────────────── */
dl#system-message dt.info {
  background:    rgba(var(--sbx-primary-rgb), 0.07);
  color:         var(--sbx-primary-dark);
  border-color:  var(--sbx-primary);
}

dl#system-message dd.info,
dl#component-message dd.info {
  background:    var(--sbx-info-bg);
  border-color:  var(--sbx-info);
  color:         var(--sbx-primary-dark);
}


/* ===========================================================================
   RESPONSIVE -- MOBILE  (<= 767px)
   max-width convention. Primary layout breakpoint.
   Aligns with Bootstrap 2 and soapbox-responsive-bootstrap.min.css.
   =========================================================================== */
/* The <=1024px block that removed #content's side borders and shadow is gone:
   as of v220 they are not applied at any breakpoint, so there is nothing to
   undo here. */

@media (max-width: 767px) {

  /* body-shell alignment: gap removed per ADR 22 / body-alignment pass */
  #main {
    padding: 0;
  }

  /* Mobile header: single-row — logo + nav on one line at all sizes (390→320px).
   * Previous behavior: flex-wrap:wrap pushed portalmenu to a second row at ≤767px.
   * Now: fixed height preserved; logo shrinks to 32px; nav items compact to fit. */
  #headerinner {
    height:      var(--sbx-header-height);
    align-items: center;
    /* flex-wrap defaults to nowrap — explicit wrap intentionally removed */
  }

  #logo img {
    max-height: 48px; /* 48px vs 60px desktop; preserves nav space at 320px while matching visual scale */
    width:      auto;
    height:     auto;
  }

  /* portalmenu stays right-aligned on same row; no full-width stacking */
  #portalmenu {
    overflow-x: auto; /* safety valve for sites with many nav items */
    padding:    0;
  }

  ul.portalUserMenu-menu-sfx {
    gap: 0.5rem; /* tighter than desktop 1rem; saves width at 320px */
  }

  ul.portalUserMenu-menu-sfx > li > a {
    padding: 0 0.5rem; /* 8px sides vs desktop 12px; ~8px saved per item */
  }

  /* Icon buttons: 36px on mobile vs 38px desktop */
  ul.portalUserMenu-menu-sfx a[title="Home"],
  ul.portalUserMenu-menu-sfx a[title="Profile"] {
    width:     36px;
    height:    36px;
    min-width: 36px;
  }

  /* Dropdown on mobile: fixed to avoid clipping inside the single-row header */
  ul.portalUserMenu-menu-sfx ul {
    position: fixed;
    right:    var(--sbx-space-sm);
    top:      auto;
    left:     auto;
  }

  /* Footer: stack brand, org, and legal vertically */
  #footerinner {
    flex-direction: column;
    gap:            var(--sbx-space-lg);
  }

  /* Secondary CTA: bump touch target to 44px on mobile */
  a.readon {
    min-height: 44px;
  }

  /* Responsive tables: horizontal scroll rather than overflow clip.
   * display:block allows overflow-x to take effect on the table element.
   * Child thead/tbody/tr/td retain their table display roles implicitly. */
  .com_sbxEvents table.resultsTBL.tickets-tbl,
  table.store-cart {
    display:   block;
    overflow-x: auto;
  }
}


/* ===========================================================================
   RESPONSIVE -- NARROW PHONE  (<= 480px)
   Phone-specific only. Prefer fluid solutions above; add here sparingly.
   =========================================================================== */
@media (max-width: 480px) {

  /* Directories: stack horizontal filter items to full-width on narrow phones.
   * At 767px the horizontal layout is fine; only tight phones need stacking.
   * flex-wrap:wrap (already set) does the stacking once items are width:100%. */
  .com_jsfSearch .compList-formHorz > li {
    width: 100%;
  }

  .com_jsfSearch li#liFilterBtns {
    width: 100%;
  }
}


/* ===========================================================================
   PHASE 3 -- GLOBAL TYPOGRAPHY NORMALIZATION
   =========================================================================== */

/*
 * Specificity note:
 *   Our selectors are (0,1,1)–(0,2,1). Bootstrap 2 bare heading rules (0,0,1)
 *   are overridden by our class selectors. soapbox-bootstrap.min.css uses
 *   class+element selectors too — see conflict notes below where we must match
 *   specificity. customCSS uses !important, so per-site overrides always win.
 */

/* -- H1: Page / component titles ------------------------------------------- */
/*
 *   h1.componentheading -- Events calendar, Login, My Transactions, My Orders
 *   h1.title            -- Donations core, Actions, Petitions
 *
 * soapbox-bootstrap sets: font-size:2em; font-weight:bold; margin:0 0 20px;
 * padding:0 0 15px — same specificity (0,1,1); template.css loads last, we win.
 * padding:0 here clears that residual padding.
 */
h1.componentheading,
h1.title,
div.componentheading {
  font-family:   var(--sbx-font-heading);
  font-size:     var(--sbx-font-size-h1);   /* clamp(1.75rem, 4vw, 2.5rem) */
  font-weight:   700;
  color:         var(--sbx-page-title-color);
  line-height:   1.3;
  margin-top:    0;
  margin-bottom: var(--sbx-space-lg);
  padding:       0;           /* clear soapbox-bootstrap padding: 0 0 15px */
  border-bottom: none;
}

/* -- Heading top margin: 1.6em -> 1.2em (v253) ----------------------------- */
/*
 * soapboxTypography.min.css sets `h1..h6 { margin-top: 1.6em }`, which is a
 * SYSTEM stylesheet and not ours to edit -- so it is overridden here at the
 * same specificity, winning on source order because template.css loads last.
 *
 * 1.6em is proportional, so the gap grows with the heading: 64px above an H1,
 * 51px above an H2. In authored content -- a Page Intro, an Outro, a band block
 * -- that reads as a break between sections rather than as a heading attached
 * to the text beneath it. 1.2em is the same relationship, 25% tighter.
 *
 * ONLY headings that inherit the system default move. Everything the template
 * places itself already sets margin-top explicitly (h1.title, .compSect-title
 * h3, .section-header h3 and the rest all set 0), so this reaches exactly the
 * authored-content headings it is aimed at -- verified by diffing every
 * non-zero heading margin on the lane before and after.
 */
h1, h2, h3, h4, h5, h6 { margin-top: 1.2em; }

/* -- H2: Content / item headings ------------------------------------------- */
/*
 *   h2.contentheading -- Events detail + subevent (inside .article-title)
 *   h2.product-title  -- Shop product detail (inside .product-store-wrapper)
 * These apps use h2 because the site logo occupies the h1 slot on the page.
 * No border-bottom — these sit inside content cards, not at page level.
 */
h2.contentheading,
h2.product-title {
  font-family:   var(--sbx-font-heading);
  font-size:     var(--sbx-font-size-h2);    /* clamp(1.25rem, 3vw, 1.5rem) */
  font-weight:   700;
  color:         var(--sbx-text-heading);
  line-height:   1.3;
  margin-top:    0;
  margin-bottom: var(--sbx-space-md);
  border-bottom: none;
}

/* soapbox-bootstrap conflict: .article-title h2.contentheading (0,2,1)
 * sets font-weight:normal; font-size:2em; margin:0 — beats our (0,1,1) above.
 * Match specificity; template.css loads last → we win.
 * font-size normalized to h1 canonical (40px max) — 2em resolved to ~38px,
 * oversized relative to all other page titles (Events list, Actions: 40px).
 */
.article-title h2.contentheading {
  font-size:     var(--sbx-font-size-h1);
  font-weight:   700;
  margin-bottom: var(--sbx-space-md);
  /* This IS the page title for a content item — .article-title wraps the item's
     own top-level heading, which is why it is already sized and weighted like
     one. It was inheriting the generic heading color from the h2.contentheading
     rule above, so Page Title Color appeared to do nothing on content pages.
     Item headings elsewhere (Events detail, Directory results) are NOT page
     titles and deliberately keep the generic color. */
  color:         var(--sbx-page-title-color);
}

/* -- Empty item heading: collapse it (v253) -------------------------------- */
/*
 * com_user's login layout emits the item-title wrapper whenever `show_login_title`
 * is on, whether or not `header_login` has any text in it:
 *
 *     <div class="article-title clearfix"><h2 class="contentheading"></h2></div>
 *
 * With the parameter empty -- which is the shipped state -- that is an empty
 * 40px heading and a wrapper existing only to hold it, and the pair pushes the
 * form roughly 48px further down than the same title area on any other page.
 * Measured on the lane: title bottom 165, content top 236.
 *
 * FIXED HERE AND NOT IN com_user, deliberately. The component file is shared,
 * the parameter is a legitimate feature when an admin fills it in, and a
 * template must not decide that. Collapsing an EMPTY one costs nothing and
 * fixes it for every site.
 *
 * The h2 is genuinely empty -- no whitespace between the tags, because PHP
 * echoes the empty parameter directly -- so :empty matches. The wrapper needs
 * :has, and is only collapsed when the empty heading is ALL it holds:
 * .article-title also carries .buttonheading (email/print) on other views, and
 * hiding that would lose real controls.
 */
.article-title h2.contentheading:empty { display: none; }

@supports selector(:has(*)) {
  .article-title:has(> h2.contentheading:empty):not(:has(> :not(h2.contentheading:empty))) {
    display: none;
  }
}

/* -- H3: Section headings -------------------------------------------------- */
/*
 *   h3.title          -- Donations + Shop section headers, Petitions form title
 *   h3.section-title  -- Actions section labels, Petitions section labels
 *   .compSect-title h3 -- Events section headings (text inside a child <span>)
 *   .section-header h3 -- Donations inner section headers
 *
 * Excluded: h3.accordion-petition-header -- Petitions mobile accordion trigger.
 * The accordion uses Zozo CSS and icon-chevron state classes; restyling its h3
 * would break the accordion's open/close indicators.
 */
h3.title,
h3.section-title,
.compSect-title h3,
.section-header h3 {
  font-family:   var(--sbx-font-heading);
  font-size:     var(--sbx-font-size-h3);    /* 1.25rem -- fixed */
  font-weight:   600;
  color:         var(--sbx-text-heading);
  line-height:   1.4;
  margin-top:    0;
  margin-bottom: var(--sbx-space-sm);
  border-bottom: none;
}

/* -- Brand rule under section headings (v238) ------------------------------ */
/*
 * Gated on html.sbx-section-rule, emitted by index.php from the `section_rule`
 * token. DEFAULTS ON: a variant saved before the token existed has no key, and
 * index.php falls back to '1' so it still gets the rule.
 *
 * A CLASS, NOT A ZERO-WIDTH BORDER. The obvious alternative — a custom property
 * driving border-bottom-width — leaves the padding-bottom behind when the width
 * is 0, so switching the rule off would silently keep the space it reserved.
 * The class removes both together.
 *
 * Applied to the same four selectors the heading rule above already unifies, so
 * Donations, Shop, Actions, Petitions and Events get one treatment rather than
 * five. It inherits that rule's exclusion of h3.accordion-petition-header for
 * the same reason: the Zozo accordion keys its open/close indicator off that
 * element, and a border there fights the chevron.
 *
 * Auctions is also excluded — .auction-filter-dialog-section-header is a
 * Bootstrap 5 dialog heading, not a page section, and a brand rule inside a
 * filter popover reads as a mistake.
 */
/* --sbx-rule-color is emitted only when the admin chose one; the fallback is
   the action color, which is what this rule always used. That keeps the default
   free of a declaration and means a palette slot deleted after the fact returns
   the rule to the action color instead of dropping it. */
html.sbx-section-rule h3.title,
html.sbx-section-rule h3.section-title,
html.sbx-section-rule .compSect-title h3,
html.sbx-section-rule .section-header h3 {
  border-bottom:  2px solid var(--sbx-rule-color, var(--sbx-primary));
  padding-bottom: var(--sbx-space-sm);
  margin-bottom:  var(--sbx-space-md);
}

/* The rule belongs to the section, so it spans the content rather than hugging
   the text — which is what it does already, h3 being a block. Stated because a
   future inline-block change here would silently shorten every rule on the site. */

/* Events wraps h3 text in <span>; ensure it inherits without doubling up */
.compSect-title h3 > span {
  font-size:   inherit;
  font-weight: inherit;
  color:       inherit;
  display:     inline;
}

/* -- Bare headings in WYSIWYG-authored content areas ----------------------- */
/*
 * WYSIWYG editors and the CMS emit bare h1–h6 without Soapbox class
 * selectors. Phase 3 targets class-qualified selectors only; bare headings
 * fall outside that coverage. Scoped to known WYSIWYG wrappers — never
 * applied globally to avoid clobbering app structural headings.
 *
 * Container coverage:
 *   .article-content    — CMS article body
 *   .item-introdesc     — Page Intro (Donations all views, Events orders)
 *   .item-outrodesc     — Page Outro (Donations all views, Events orders)
 *   .section-formfooter — Donations Form Footer
 *   .petition-pageintro — Petitions Page Description
 *   .action-pageintro   — Actions Page Description
 *
 * Scale: H1 uses --sbx-font-size-h1 (40px max). H2 bridges to H3 via a
 * static clamp (32px max). H3 reuses --sbx-font-size-h2 (24px max). H4–H6
 * use a static intentional scale that corrects the Bootstrap 1.2× modular
 * cascade, which otherwise inverts H4 above H3 when token overrides stop at H3.
 */
:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--sbx-font-heading);
  color:       var(--sbx-text-heading);
}

:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) h1 {
  font-size:   var(--sbx-font-size-h1);  /* clamp(1.75rem, 4vw, 2.5rem): 28px→40px */
  font-weight: 700;
  line-height: 1.3;
}
:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) h2 {
  font-size:   clamp(1.5rem, 3vw, 2rem); /* 24px→32px; between H1 (40px) and H3 (24px) */
  font-weight: 700;
  line-height: 1.3;
}
:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) h3 {
  font-size:   var(--sbx-font-size-h2);  /* clamp(1.25rem, 3vw, 1.5rem): 20px→24px */
  font-weight: 700;
  line-height: 1.4;
}
:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) h4 {
  font-size:   var(--sbx-font-size-lg);  /* 1.125rem = 18px */
  font-weight: 600;
  line-height: 1.4;
}
:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) h5 {
  font-size:   1rem;                     /* 16px — floor at body size */
  font-weight: 600;
  line-height: 1.4;
}
:is(.article-content, .item-introdesc, .item-outrodesc,
    .section-formfooter, .petition-pageintro, .action-pageintro) h6 {
  font-size:   var(--sbx-font-size-sm);  /* 0.875rem = 14px */
  font-weight: 600;
  line-height: 1.4;
}

/* -- Intro / outro body text ----------------------------------------------- */
/*
 * Actions and Petitions output intro/outro sections above and below the form.
 * These are user-authored text blocks that benefit from slightly larger,
 * softer styling to distinguish them from form fields.
 */
.action-pageintro,
.petition-pageintro,
div.pageintro {
  font-family:   var(--sbx-font-body);
  font-size:     var(--sbx-font-size-lg);
  color:         var(--sbx-text-muted);
  line-height:   1.65;
  margin-bottom: var(--sbx-space-lg);
}


/* ===========================================================================
   PHASE 3 -- BUTTON NORMALIZATION
   =========================================================================== */

/*
 * Specificity note:
 *   Our primary button rules sit at 0,0,2,1 (2 classes + 1 element).
 *   Bootstrap 2 .btn-primary is 0,0,1,0 -- our rules win.
 *   customCSS uses #btnDonate, #btnSubmit etc. at 0,1,0,0 -- customCSS wins.
 *   This is the intended cascade: template provides the floor, customCSS wins.
 *
 * Selector coverage:
 *   button.btn.btn-primary        -- Donations, Actions, Petitions toggle+submit
 *   button.button.btn-submit      -- Forms app (btnSubmit)
 *   button.button[type="submit"]  -- Events register (btnRegister),
 *                                   Shop add-to-cart (btnAddToCart),
 *                                   Login (button.button), Petitions
 *   a.btn.btn-primary             -- Bootstrap link-buttons in some views
 *
 * Not targeted here (handled by customCSS or app-specific Phase 5 rules):
 *   button.button.add-to-cart -- also caught by [type="submit"], but disabled
 *     on page load; the disabled rule below preserves that visual state.
 */

/* -- Primary button base --------------------------------------------------- */
button.btn.btn-primary,
button.button.btn-submit,
button.button[type="submit"],
button.button.s-button,
a.btn.btn-primary {
  -webkit-appearance: none;
  display:       inline-flex;
  align-items:   center;
  justify-content: center;
  background:    var(--sbx-btn-primary-bg);
  color:         var(--sbx-btn-primary-text);
  border:        none;
  border-radius: var(--sbx-radius-btn);
  font-family:   var(--sbx-font-ui);
  font-size:     var(--sbx-font-size-btn);
  font-weight:   700;
  line-height:   1;
  padding:       var(--sbx-btn-padding);
  min-height:    var(--sbx-btn-height);
  text-decoration: none;
  white-space:   nowrap;
  cursor:        pointer;
  transition:    background var(--sbx-transition),
                 box-shadow  var(--sbx-transition),
                 transform   var(--sbx-transition);
}

/* -- Primary button: hover ------------------------------------------------- */
button.btn.btn-primary:hover,
button.button.btn-submit:hover,
button.button[type="submit"]:hover,
button.button.s-button:hover,
a.btn.btn-primary:hover {
  background:     var(--sbx-primary-dark);
  color:          var(--sbx-btn-primary-text);
  text-decoration: none;
}

/* -- Primary button: focus (Auctions-derived ring pattern) ---------------- */
button.btn.btn-primary:focus,
button.button.btn-submit:focus,
button.button[type="submit"]:focus,
button.button.s-button:focus,
a.btn.btn-primary:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

/* -- Primary button: active / pressed ------------------------------------- */
button.btn.btn-primary:active,
button.button.btn-submit:active,
button.button[type="submit"]:active,
button.button.s-button:active {
  background: var(--sbx-primary-darker);
  transform:  translateY(1px);
  box-shadow: none;
}

/* -- Disabled state -- preserve app-managed disabled appearance ------------- */
/*
 * Several buttons are disabled on page load (Shop add-to-cart, Actions submit
 * before validation) and re-enabled by app JS. We must not fight that logic.
 * pointer-events:none is safe here -- HTML disabled already blocks events;
 * this just enforces the not-allowed cursor in CSS.
 */
button[disabled],
button.btn[disabled],
button.button[disabled] {
  opacity:        0.45;
  cursor:         not-allowed;
  pointer-events: none;
}

button[disabled]:hover,
button.btn[disabled]:hover,
button.button[disabled]:hover {
  background: var(--sbx-btn-primary-bg);  /* no hover color shift when disabled */
  transform:  none;
}

/* -- Secondary: link-style CTAs (a.readon) --------------------------------- */
/*
 * Events "Read more >>" links are rendered as <a class="readon"><span>...</span></a>.
 * Styled as an outlined secondary button to match the visual weight of
 * real buttons on the same page without using a filled primary treatment.
 */
a.readon {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-btn-padding-sm);
  min-height:      var(--sbx-btn-height-sm);
  border:          2px solid var(--sbx-accent);
  border-radius:   var(--sbx-radius-btn);
  color:           var(--sbx-accent);
  text-decoration: none;
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  white-space:     nowrap;
  cursor:          pointer;
  transition:      background      var(--sbx-transition),
                   color           var(--sbx-transition),
                   border-color    var(--sbx-transition);
}

a.readon:hover {
  background:      var(--sbx-accent);
  color:           var(--sbx-text-on-primary);
  text-decoration: none;
}

a.readon:focus {
  outline:    none;
  box-shadow: 0 0 0 3px rgba(var(--sbx-accent-rgb), 0.25);
}

/* -- Button inner <span> inheritance --------------------------------------- */
/*
 * Every Soapbox submit button wraps its label text in a child <span>:
 *   <button class="btn btn-primary"><span>Donate Now</span></button>
 * Bootstrap 2 and legacy CSS can set font-size on the button but not the span.
 * This rule ensures the span never introduces size or color drift.
 */
.btn span,
button.button span,
a.readon span {
  font-size:   inherit;
  font-weight: inherit;
  color:       inherit;
  line-height: inherit;
}


/* ===========================================================================
   PHASE 4 -- AUCTIONS-DERIVED FORM INTERACTION SYSTEM

   Design language: Auctions app interaction patterns -- clean inputs with
   primary-color focus rings, 48px touch targets, consistent border/radius.

   Safety constraints (verified by pre-phase JS research):
   * appearance:none on radio/checkbox removes OS chrome while keeping
     the native input in the DOM: JS .checked, dispatchEvent(), and
     ondblclick all remain fully functional.
   * DO NOT set display on .state-group selects. Petitions regionDisplay()
     controls them via jQuery .css('display') inline styles; those always
     win over CSS declarations.
   * label.invalid -- MooTools validator adds this to radio GROUP labels,
     not to individual .choice labels. Target label.invalid only.
   * input.invalid -- added to text inputs by Donations blur handler
     (classList.toggle) and MooTools validator (handleResponse).
   * Donations amount buttons are <button class="btn btn-primary"> elements
     whose btn-primary class is toggled by app JS. They are NOT radio inputs.
     They are already handled correctly by Phase 3 button rules.
   * Braintree payment radios: JS sets el.checked = true directly, then
     fires a synthetic change event. appearance:none does not affect this.
   =========================================================================== */

/* -- Form labels ----------------------------------------------------------- */
/*
 * label.desc      -- Actions + Petitions field labels (above each field)
 * label.control-lb -- Donations field labels
 * .control-label  -- Bootstrap 2 horizontal form labels
 *
 * Not targeted here: labels with .choice class -- those sit adjacent to
 * radio/checkbox inputs and use body-size text, not uppercase treatment.
 */
label.desc,
label.control-lb,
.control-label {
  font-family:    var(--sbx-font-ui);
  font-size:      var(--sbx-font-size-label);    /* 13px */
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--sbx-label-color);
  margin-bottom:  var(--sbx-space-xs);
  display:        block;
}

/* -- Required field markers ------------------------------------------------ */
span.req {
  color:       var(--sbx-error);
  font-weight: 600;
  margin-left: 2px;
}

/* -- Control group spacing ------------------------------------------------- */
.control-group {
  margin-bottom: var(--sbx-space-md);
}


/* -- Text inputs -- base ---------------------------------------------------- */
/*
 * input.field.text    -- Actions, Petitions text fields
 * input.inputbox      -- Generic platform text input class
 * input.input-text    -- Forms app text field
 * Type selectors provide coverage for unlabeled inputs and Bootstrap
 * .input-block-level inputs without a Soapbox class.
 *
 * SAFE: appearance:none on text inputs removes OS chrome; no JS in this
 * codebase reads or depends on the OS appearance of text inputs.
 */
input.field.text,
input.inputbox,
input.input-text,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="password"] {
  -webkit-appearance: none;
  appearance:     none;
  display:        block;
  width:          100%;
  height:         var(--sbx-input-height);       /* 48px touch target */
  padding:        var(--sbx-input-padding);      /* 10px 14px */
  font-family:    var(--sbx-font-body);
  font-size:      var(--sbx-font-size-input);    /* 1rem -- iOS zoom floor */
  color:          var(--sbx-text-body);
  background:     var(--sbx-input-bg);
  border:         1.5px solid var(--sbx-input-border);
  border-radius:  var(--sbx-radius-input);
  box-shadow:     none;
  line-height:    1.5;
  transition:     border-color var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
  box-sizing:     border-box;
}

input.field.text:hover,
input.inputbox:hover,
input.input-text:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="password"]:hover {
  border-color: var(--sbx-border-strong);
}

input.field.text:focus,
input.inputbox:focus,
input.input-text:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
  outline:      none;
  border-color: var(--sbx-primary);
  box-shadow:   var(--sbx-shadow-focus);
}


/* -- Textarea -------------------------------------------------------------- */
textarea.field,
textarea.textarea,
textarea.input-block-level {
  -webkit-appearance: none;
  appearance:     none;
  display:        block;
  width:          100%;
  min-height:     120px;
  padding:        var(--sbx-input-padding);
  font-family:    var(--sbx-font-body);
  font-size:      var(--sbx-font-size-input);    /* 1rem -- iOS zoom floor */
  color:          var(--sbx-text-body);
  background:     var(--sbx-input-bg);
  border:         1.5px solid var(--sbx-input-border);
  border-radius:  var(--sbx-radius-input);
  box-shadow:     none;
  line-height:    1.6;
  resize:         vertical;
  transition:     border-color var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
  box-sizing:     border-box;
}

textarea.field:hover,
textarea.textarea:hover,
textarea.input-block-level:hover {
  border-color: var(--sbx-border-strong);
}

textarea.field:focus,
textarea.textarea:focus,
textarea.input-block-level:focus {
  outline:      none;
  border-color: var(--sbx-primary);
  box-shadow:   var(--sbx-shadow-focus);
}


/* -- Select ---------------------------------------------------------------- */
/*
 * Shop variant selects have IDs with spaces -- always style by class, never ID.
 * Petitions triple-select (.state-group selects): regionDisplay() hides them
 * with jQuery inline styles, which beat CSS declarations -- no conflict.
 * Custom chevron via background-image; padding-right reserves arrow space.
 */
select.select,
select.inputbox,
select.field,
select.input-block-level {
  -webkit-appearance: none;
  appearance:       none;
  display:          block;
  width:            100%;
  height:           var(--sbx-input-height);     /* 48px */
  padding:          var(--sbx-input-padding);
  padding-right:    2.5rem;
  font-family:      var(--sbx-font-body);
  font-size:        var(--sbx-font-size-input);
  color:            var(--sbx-text-body);
  background-color: var(--sbx-input-bg);
  /* chevron: %236b7280 = #6b7280 = --sbx-text-muted; var() cannot be used inside data URIs */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat:   no-repeat;
  background-position: right 0.875rem center;
  background-size:     16px 16px;
  border:           1.5px solid var(--sbx-input-border);
  border-radius:    var(--sbx-radius-input);
  box-shadow:       none;
  cursor:           pointer;
  line-height:      1.5;
  transition:       border-color var(--sbx-transition),
                    box-shadow   var(--sbx-transition);
  box-sizing:       border-box;
}

select.select:hover,
select.inputbox:hover,
select.field:hover,
select.input-block-level:hover {
  border-color: var(--sbx-border-strong);
}

select.select:focus,
select.inputbox:focus,
select.field:focus,
select.input-block-level:focus {
  outline:      none;
  border-color: var(--sbx-primary);
  box-shadow:   var(--sbx-shadow-focus);
}

select.select:disabled,
select.inputbox:disabled,
select.field:disabled,
select.input-block-level:disabled {
  cursor:  not-allowed;
  opacity: 0.45;
}

/* Multi-select: height:auto overrides the 48px fixed-height single-select rule.
 * min-height guarantees ≥3 rows visible even when size attribute is absent.
 * background-image: none removes the dropdown chevron (meaningless on multi-select). */
select[multiple].select,
select[multiple].inputbox,
select[multiple].field,
select[multiple].input-block-level {
  height:           auto;
  min-height:       calc(var(--sbx-input-height) * 3);
  padding-right:    var(--sbx-input-padding);
  background-image: none;
}


/* -- Radio buttons -- visual enhancement ----------------------------------- */
/*
 * Enhancement-over-replacement:
 *   appearance:none removes OS chrome while keeping the native input in
 *   the DOM. All of the following remain fully functional:
 *     * JS .checked read + el.checked = true (Braintree payment radios)
 *     * dispatchEvent(new Event('change')) (Braintree)
 *     * Label click (for="" association unchanged)
 *     * Keyboard navigation (Tab + Space/Arrow)
 *     * MooTools validator (reads .checked, adds invalid to GROUP label)
 *
 * NOT targeted: Donations amount buttons.
 *   Those are <button class="btn btn-primary"> with btn-primary toggled
 *   by JS. They are handled by Phase 3. They are not input[type="radio"].
 *
 * Checked visual: primary fill + 3px white inset ring (inner dot pattern).
 *   -> border:primary -> 3px white gap (inset shadow) -> primary background
 */
input[type="radio"].field,
input.radio {
  -webkit-appearance: none;
  appearance:     none;
  width:          20px;
  height:         20px;
  flex-shrink:    0;
  border:         2px solid var(--sbx-input-border);
  border-radius:  var(--sbx-radius-radio);       /* 50% -- always circular */
  background:     var(--sbx-input-bg);
  cursor:         pointer;
  vertical-align: middle;
  transition:     border-color var(--sbx-transition),
                  background   var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
  box-sizing:     border-box;
}

input[type="radio"].field:hover,
input.radio:hover {
  border-color: var(--sbx-primary-light);
}

input[type="radio"].field:checked,
input.radio:checked {
  background-color: var(--sbx-primary);
  border-color:     var(--sbx-primary);
  box-shadow:       inset 0 0 0 3px #fff;        /* white ring = inner dot */
}

input[type="radio"].field:focus,
input.radio:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

input[type="radio"].field:checked:focus,
input.radio:checked:focus {
  box-shadow: inset 0 0 0 3px #fff,
              var(--sbx-shadow-focus);
}

/* Choice labels adjacent to radio inputs */
input[type="radio"].field + label.choice,
input.radio + label.choice {
  display:     inline-flex;
  align-items: center;
  margin-left: var(--sbx-space-sm);
  cursor:      pointer;
  font-size:   1rem;
}


/* -- Checkboxes -- visual enhancement -------------------------------------- */
/*
 * Two DOM patterns in Petitions:
 *   (a) <label class="checkbox"><input type="checkbox" class="field checkbox">
 *       Label text</label>                       -- input inside wrapping label
 *   (b) <input type="checkbox" class="field checkbox"> <label class="choice">
 *       Label text</label>                       -- input + adjacent label
 *
 * appearance:none keeps the input in the DOM with full functionality:
 *   * ondblclick="this.checked=false" (Petitions double-click-to-deselect)
 *   * Space bar toggle via keyboard
 *   * Label click activation (both DOM patterns)
 *   * JS .checked property access
 *
 * Checkmark rendered via SVG background-image (no pseudo-elements on input).
 */
input[type="checkbox"].field,
input[type="checkbox"].checkbox,
label.checkbox > input[type="checkbox"] {
  -webkit-appearance: none;
  appearance:     none;
  width:          20px;
  height:         20px;
  flex-shrink:    0;
  border:         2px solid var(--sbx-input-border);
  border-radius:  var(--sbx-radius-check);       /* 4px */
  background:     var(--sbx-input-bg);
  cursor:         pointer;
  vertical-align: middle;
  transition:     border-color  var(--sbx-transition),
                  background    var(--sbx-transition),
                  box-shadow    var(--sbx-transition);
  box-sizing:     border-box;
}

input[type="checkbox"].field:hover,
input[type="checkbox"].checkbox:hover,
label.checkbox > input[type="checkbox"]:hover {
  border-color: var(--sbx-primary-light);
}

input[type="checkbox"].field:checked,
input[type="checkbox"].checkbox:checked,
label.checkbox > input[type="checkbox"]:checked {
  background-color: var(--sbx-primary);
  border-color:     var(--sbx-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8l3.5 3.5L13 4'/%3E%3C/svg%3E");
  background-size:     80%;
  background-position: center;
  background-repeat:   no-repeat;
}

input[type="checkbox"].field:focus,
input[type="checkbox"].checkbox:focus,
label.checkbox > input[type="checkbox"]:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

/* Choice labels adjacent to checkbox inputs */
input[type="checkbox"].field + label.choice,
input[type="checkbox"].checkbox + label.choice {
  display:     inline-flex;
  align-items: center;
  margin-left: var(--sbx-space-sm);
  cursor:      pointer;
  font-size:   1rem;
}

/* Wrapping label pattern: label.checkbox contains the input */
label.checkbox {
  display:     inline-flex;
  align-items: flex-start;
  gap:         var(--sbx-space-sm);
  cursor:      pointer;
}


/* -- Validation error states ----------------------------------------------- */
/*
 * Three error-state patterns across the platform:
 *
 * 1. .control-group.error (Bootstrap 2 wrapper)
 *    Added by some app-level validation JS; wraps the entire field group.
 *
 * 2. input.invalid / select.invalid / textarea.invalid
 *    Added directly to the input by Donations blur handler
 *    (classList.toggle("invalid", isInvalid)) and MooTools validator
 *    (handleResponse()) for text-type inputs.
 *
 * 3. label.invalid
 *    Added by MooTools validator to the GROUP LABEL of a radio button
 *    group when no option is selected. NOT added to individual radios
 *    or .choice labels.
 */

/* Bootstrap 2 wrapper error */
.control-group.error input.field.text,
.control-group.error input.inputbox,
.control-group.error input.input-text,
.control-group.error input[type="text"],
.control-group.error input[type="email"],
.control-group.error textarea,
.control-group.error select.select,
.control-group.error select.inputbox {
  border-color: var(--sbx-error);
  box-shadow:   0 0 0 3px rgba(var(--sbx-error-rgb), 0.18);
}

/* Direct input error class */
input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--sbx-error);
  box-shadow:   0 0 0 3px rgba(var(--sbx-error-rgb), 0.18);
}

input.invalid:focus,
select.invalid:focus,
textarea.invalid:focus {
  border-color: var(--sbx-error);
  box-shadow:   0 0 0 3px rgba(var(--sbx-error-rgb), 0.30);
}

/* Radio group label error (MooTools only, added to group label, not to inputs) */
label.invalid {
  color: var(--sbx-error);
}


/* -------------------------------------------------------------------------
   PHASE 4 QA CHECKLIST
   Run manually before shipping. Verify on Chrome + Safari (desktop + mobile).
   -------------------------------------------------------------------------

   1. DONATIONS AMOUNT RADIOS (amount selection -- btn-primary toggling)
      [ ] Buttons appear in correct layout; sizing matches Phase 3 button styles
      [ ] Clicking a button adds .btn-primary -- button fills with primary color
      [ ] Previous amount deactivates (loses .btn-primary class)
      [ ] These are <button> elements -- Phase 4 radio rules do NOT apply here
      [ ] Tab + Enter/Space activates button; focus ring visible

   2. DONATIONS PAYMENT TYPE RADIOS (credit card / ACH / etc.)
      [ ] Radio inputs render as 20px circles with input-border
      [ ] Unchecked: gray ring; hover: primary-light ring
      [ ] Checked: primary fill + white inset ring (inner dot pattern)
      [ ] Switching payment type shows/hides correct payment fields
      [ ] Braintree: hosted field activation works (el.checked = true + change
        event fired by JS); verify payment panel appears correctly
      [ ] Tab navigates between options; Space selects; focus ring visible
      [ ] On submit with no selection: label.invalid appears on group label

   3. PETITIONS CONSENT CHECKBOX
      [ ] Checkbox renders as 20x20px square with 4px border radius
      [ ] Unchecked: gray border; hover: primary-light border
      [ ] Checked: primary fill + white SVG checkmark
      [ ] Double-click clears checked state (ondblclick="this.checked=false")
      [ ] Clicking consent label text toggles the checkbox
      [ ] Tab focuses; Space toggles; focus ring visible
      [ ] Required + unchecked on submit: border turns error red

   4. ACTIONS / PETITIONS TEXT INPUTS
      [ ] All text inputs show 48px height, consistent border + border-radius
      [ ] Hover: border darkens to --sbx-border-strong
      [ ] Focus: border turns primary + focus ring (--sbx-shadow-focus)
      [ ] Font size is 1rem -- verify no iOS Safari viewport zoom on focus
      [ ] input.invalid: border + box-shadow turns error red
      [ ] span.req markers appear in error red after field label text
      [ ] Petitions triple-select (State / Province / Other field):
          - regionDisplay() show/hide still works (JS inline styles win)
          - Visible select shows correct 48px height + custom chevron
          - No layout shift when JS toggles between the three selects

   ------------------------------------------------------------------------- */


/* ===========================================================================
   PHASE 6 -- SKELETON / LOADING STATE FRAMEWORK

   Architecture:
     Layer 1 (this section): global utility classes and keyframes — reusable
       across any app by adding classes to markup or via JS toggle.
     Layer 2 (Phase 5 per-app sections): app-specific skeleton CSS that runs
       purely in CSS with no class additions required.

   Design: gradient sweep shimmer — left-to-right highlight sweep.
   Tokens: --sbx-skel-base, --sbx-skel-shimmer, --sbx-skel-speed (in :root).

   Failure-safe: all content is visible without JS. Skeletons are additive
   progressive enhancement only.
   =========================================================================== */


/* -- Keyframes -------------------------------------------------------------- */

@keyframes sbx-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes sbx-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}


/* -- Core skeleton utility -------------------------------------------------- */

.sbx-skeleton {
  background: linear-gradient(
    90deg,
    var(--sbx-skel-base)    0%,
    var(--sbx-skel-shimmer) 50%,
    var(--sbx-skel-base)    100%
  );
  background-size: 200% 100%;
  animation:       sbx-shimmer var(--sbx-skel-speed) linear infinite;
  border-radius:   var(--sbx-skel-radius);
  color:           transparent;
  pointer-events:  none;
  user-select:     none;
}

.sbx-skeleton > * { visibility: hidden; }


/* -- Shape variants --------------------------------------------------------- */

.sbx-skeleton-text {
  height:        1em;
  border-radius: 4px;
  display:       block;
}

.sbx-skeleton-card {
  height:        80px;
  border-radius: var(--sbx-radius-card);
}


/* -- Fade-in: for content that reveals after initialization ---------------- */

.sbx-fade-in {
  animation: sbx-fade-in var(--sbx-motion-slow) var(--sbx-motion-ease) both;
}

.sbx-fade-in-d1 { animation-delay:  80ms; }
.sbx-fade-in-d2 { animation-delay: 160ms; }
.sbx-fade-in-d3 { animation-delay: 240ms; }
.sbx-fade-in-d4 { animation-delay: 320ms; }
.sbx-fade-in-d5 { animation-delay: 400ms; }


/* -- JS orchestration hooks ------------------------------------------------ */
/*
 * .sbx-is-loading: applied to a container while content is initializing.
 *   Children with .sbx-reveal start at opacity 0 and transition in on ready.
 * .sbx-loading-ready: swapped in by JS on window.load; triggers reveals.
 * Usage: add .sbx-is-loading to the wrapper in PHP, then JS replaces it
 * with .sbx-loading-ready after window.load fires.
 */

.sbx-is-loading .sbx-reveal {
  opacity:    0;
  transition: opacity var(--sbx-motion-base) var(--sbx-motion-ease);
}

.sbx-loading-ready .sbx-reveal {
  opacity: 1;
}


/* -- Accessibility: disable all skeleton animations ----------------------- */

@media (prefers-reduced-motion: reduce) {
  .sbx-skeleton                    { animation: none; }
  .sbx-fade-in,
  .sbx-fade-in-d1,
  .sbx-fade-in-d2,
  .sbx-fade-in-d3,
  .sbx-fade-in-d4,
  .sbx-fade-in-d5                  { animation: none; }
  .sbx-is-loading .sbx-reveal      { opacity: 1; transition: none; }
  .sbx-loading-ready .sbx-reveal   { opacity: 1; }
}


/* ===========================================================================
   PHASE 5 -- PER-APP NORMALIZATION

   Scope model: rules are gated by the app's root wrapper class so that
   normalization for one app cannot bleed into another.

   Specificity: selectors here sit at 0,0,2,1 - 0,0,3,2. customCSS ID
   selectors (0,1,0,0) still win. Phase 3/4 global rules (0,0,1,1 -
   0,0,2,1) are overridden where a more targeted app selector is provided.
   =========================================================================== */


/* -- SHARED: compSect section scaffold --------------------------------------
 * Used by Events, Forms, Directories. Provides consistent spacing between
 * section blocks and a bordered title treatment.
 * Scoped to .sbx to avoid bleed into non-Soapbox CMS content.
 */
.sbx .compSect-wrap {
  margin-bottom: var(--sbx-space-xl);
}

.sbx .compSect-title {
  display:        flex;
  align-items:    baseline;
  gap:            var(--sbx-space-sm);
  margin-bottom:  var(--sbx-space-md);
  padding-bottom: var(--sbx-space-sm);
  border-bottom:  2px solid var(--sbx-primary);
}

.sbx .compSect-title h3 {
  margin:      0;
  font-size:   var(--sbx-font-size-h3);
  font-weight: 600;
  color:       var(--sbx-text-heading);
  line-height: 1.3;
}


/* -- SHARED: compList field lists -------------------------------------------
 * Vertical and horizontal form layouts used in Forms, Directories,
 * and some Donations sections. Sets spacing between field items.
 */
.sbx .compList {
  list-style: none;
  margin:     0;
  padding:    0;
}

.sbx .compList-formVert > li,
.sbx .compList-formHorz > li {
  margin-bottom: var(--sbx-space-md);
}


/* -- SHARED: compList button rows (.compList-btns) --------------------------
 * Submit / action button rows used in Donations, Events, Forms, Directories.
 * Flex row: button + required text side by side.
 */
.sbx .compList-btns {
  list-style:   none;
  margin:       var(--sbx-space-lg) 0 0;
  padding:      0;
  display:      flex;
  flex-wrap:    wrap;
  align-items:  center;
  gap:          var(--sbx-space-md);
}

.sbx .compList-btns > li {
  margin: 0;
}

.sbx .compList-btns .requiredtext .req,
.sbx .compList-btns li.requiredtext {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
}

/* Donations: required text moves below the submit button (full-width flex row) */
.donations .compList-btns li.requiredtext {
  order:      2;
  flex-basis: 100%;
}


/* ========================================================================== */
/* 1. DONATIONS                                                               */
/* Scope: .sbx.donations (on the #page wrapper inside .sbx)                  */
/* ========================================================================== */

/*
 * Sections inside the donation form are stacked, not separate cards.
 * Use a top border + padding to visually separate them. The first
 * visible section gets no border.
 */
.donations .item-section {
  padding-top: var(--sbx-space-lg);
}

.donations .item-section + .item-section {
  border-top: 1px solid var(--sbx-border-color);
  margin-top: var(--sbx-space-md);
}

/* Section content inner spacing */
.donations .section-content {
  padding-top: var(--sbx-space-sm);
}

/* Intro and outro text */
.donations .section-intro,
.donations .section-outro {
  font-size:     var(--sbx-font-size-lg);
  color:         var(--sbx-text-muted);
  line-height:   1.65;
  margin-bottom: var(--sbx-space-lg);
}

/* -- Donations: amount button list ----------------------------------------
 * Amounts are rendered as <button class="btn btn-primary"> inside a <ul>.
 * Phase 3 styles the buttons; here we only need the list wrapper layout.
 */
.donations ul.donation-list.compList {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--sbx-space-sm);
  padding:   0;
  margin:    0;
}

.donations ul.donation-list.compList > li {
  margin: 0;
  flex-shrink: 0;
}

/* -- Donations: payment method row ---------------------------------------
 * #sbxPayTypeContainer: flex row of payment type panels.
 * Each .span-block wraps a choice label (icon image) + radio input.
 * The radio is styled by Phase 4 input.radio rules.
 */
.donations #sbxPayTypeContainer.sbxPayType {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--sbx-space-sm);
  padding:   var(--sbx-space-sm) 0;
}

.donations .sbxPayType .span-block {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            var(--sbx-space-xs);
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  background:     var(--sbx-surface-muted);
  border:         1.5px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-input);
  cursor:         pointer;
  transition:     border-color var(--sbx-transition),
                  background   var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
}

/* Highlight the payment type panel that contains the checked radio.
 * Baseline (no :has()): the panel border stays neutral; the radio input
 * itself gets the checked ring from Phase 4's input.radio:checked rule.
 * Enhancement (browsers with :has() support): the entire panel highlights. */
@supports selector(:has(*)) {
  .donations .sbxPayType .span-block:has(input:checked) {
    border-color: var(--sbx-primary);
    box-shadow:   var(--sbx-shadow-focus);
  }
}

/* -- Donations: complex form rows (CC, eCheck, Billing Address) ----------
 * li.complex rows have a label column (.cntr-label) and field column (.cntr).
 * Just give them a consistent top border / padding as separators.
 */
.donations li.complex.border-top {
  padding-top: var(--sbx-space-lg);
  margin-top:  var(--sbx-space-md);
  border-top:  1px solid var(--sbx-border-color);
}

.donations li.complex .cntr-label > label.desc {
  margin-bottom: var(--sbx-space-xs);
}

/* Large/section labels inside complex rows (e.g., "Payment Method *") */
.donations label.descLrg {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

/* -- Confirmation / success page (shared: Donations, Shop, Events, Actions) --
 * Shared selector: .compScsMsg-wrap (used by all apps).
 * App-specific wrappers: .donationsDonateSuccess-layDefault,
 *   .storeSellSuccess-layDefault, .sbxEvents-eventRegScsLayDefault.
 *
 * Phase 12: removed green box treatment. Success meaning is conveyed by the
 * CSS checkmark icon (::before) + message typography, not a full green panel.
 * Green reserved for system-level alerts, not full-page confirmation surfaces.
 */
.compScsMsg-wrap {
  background:    var(--sbx-surface);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-xl);
  margin-bottom: var(--sbx-space-xl);
}

.compScsMsg-wrap::before {
  content:          '✓';
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            48px;
  height:           48px;
  border-radius:    50%;
  background:       var(--sbx-success);
  color:            white;
  font-size:        var(--sbx-font-size-lg);
  font-weight:      700;
  margin-bottom:    var(--sbx-space-md);
  flex-shrink:      0;
}

.compScsMsg-content {
  color:       var(--sbx-text-body);
  font-size:   var(--sbx-font-size-base);
  line-height: 1.65;
}


/* ========================================================================== */
/* 1b. DONATIONS -- UX MODERNIZATION (Phase 7)                                 */
/*                                                                            */
/* Conversion-oriented redesign inspired by Donorbox / Givebutter / Fundraise */
/* Up patterns. CSS only -- no PHP or markup changes.                          */
/*                                                                            */
/* Changes:                                                                   */
/*   * Remove dated blue underline from page H1 title                         */
/*   * Remove nav border-bottom line (global -- affects all pages)             */
/*   * Hide legacy trust imagery (padlock PNG, RapidSSL GIF)                  */
/*   * Amount buttons: modern card-chip grid with clear selected state         */
/*   * Frequency selector: CSS segmented pill control (:has() enhanced)       */
/*   * Payment method: hide radio inputs; highlight selected card panel        */
/* ========================================================================== */

/* -- Page title: normalize size + remove dated blue underline -------------- */
/*
 * soapbox-bootstrap: .item-header h1.title { font-size: 2em } at (0,2,1)
 * beats Phase 3's h1.title at (0,1,1), resolving to ~38px vs canonical 40px.
 * .donations h1.title is also (0,2,1); template.css loads last → we win.
 */
.donations h1.title {
  font-size:     var(--sbx-font-size-h1);
  border-bottom: none;
  padding-bottom: 0;
}


/* -- Trust imagery: hide dated vendor assets ------------------------------- */
/*
 * RapidSSL badge (img.payment-ssl) and padlock PNG (img.payment-lock) both
 * signal "2010 web design." Modern platforms rely on clean design, payment
 * brand logos, and a minimal trust note near the CTA — not vendor badges or
 * icon-as-heading treatments.
 */
img.payment-lock,
img.payment-ssl {
  display: none;
}

/* A1 (v184): Remove oversized lock emoji from "Secure Payment" heading.
 * The emoji at h3 size (30px+) was visually prominent in a way that no
 * leading fundraising platform uses today. The heading text is kept. */
.section-header-secure h3.title::before {
  content: none;
}

/* A2 (v184): trust note below the final payment CTA — REMOVED v259.
 *
 * This was a ::after reading "Secure, encrypted payment" on the three
 * containers that hold a payment button. The JS trust line in index.php
 * (.sbx-trust-line, "Your payment is encrypted and processed securely.")
 * was added later and keys on the SAME marker — .payable-form-btn — so
 * every payment surface in the template carried both. Confirmed on the
 * Donations form and established from markup for the other five: Donations
 * pledge payment and update, Events cart and RSVP, Shop cart.
 *
 * THE JS ONE IS THE ONE THAT SURVIVED, for four reasons.
 *   - Placement. It appends to the button's own container, so it sits under
 *     the button. This ::after landed at the END of the container, which put
 *     it below the red "fields marked with an asterisk" notice — detached
 *     from the button it exists to reassure about.
 *   - It carries the lock icon, an inline SVG on currentColor like every
 *     other icon here.
 *   - Its text is real DOM: translatable through the language files,
 *     selectable, and announced predictably. A content: string is none of
 *     those.
 *   - It has no :has() gate, so it does not silently vanish where :has() is
 *     unsupported — which this rule did.
 *
 * KEPT FROM THE ORIGINAL, because it is the useful part and is still true:
 * .payable-form-btn marks every final payment submit button, and these are
 * the containers it appears in —
 *   .section-formactions  — Donations donate form, Pledge payment
 *   .compSectBtns-content — Events cart checkout, Events RSVP, Donations update
 *   .order-submit         — Shop cart, Events cart (alt layout)
 * Anything that needs to style a payment CTA's surroundings wants that list.
 */

/* -- Donation amount buttons: modern card-chip grid ----------------------- */
/*
 * Bootstrap .btn gives unselected buttons gray bg + variable width. Phase 3
 * .btn-primary fires only on the JS-selected button. Goal: equal-width chips --
 * white/border unselected, solid brand fill selected.
 *
 * DOM: ul.donation-list > li.donate-amount-group-* > div.cntr > span.span-block > button
 * Grid on .cntr (not the UL) so amount-group and frequency LIs don't sit
 * side-by-side. flex-basis:100% on the LI forces it to its own flex row.
 */
.donations li[class*="donate-amount-group"] {
  flex-basis: 100%;
  width:      100%;
}

.donations li[class*="donate-amount-group"] .cntr {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   var(--sbx-space-sm);
}

.donations li[class*="donate-amount-group"] .span-block {
  margin: 0;
}

/* Unselected amount chip */
.donations button.btn.btn-amount {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           100%;
  min-height:      52px;
  padding:         0.5rem 0.625rem;
  background:      var(--sbx-surface);
  color:           var(--sbx-text-heading);
  border:          2px solid var(--sbx-border-strong); /* stronger definition on white bg */
  border-radius:   var(--sbx-radius-card);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  line-height:     1.3;
  white-space:     normal;
  cursor:          pointer;
  transition:      border-color var(--sbx-transition),
                   background   var(--sbx-transition),
                   color        var(--sbx-transition),
                   box-shadow   var(--sbx-transition);
}

.donations button.btn.btn-amount:hover {
  border-color: var(--sbx-accent);
  background:   var(--sbx-accent-soft);
  color:        var(--sbx-accent);
}

/* Selected amount chip -- app JS toggles .btn-primary */
.donations button.btn.btn-amount.btn-primary {
  background:   var(--sbx-primary);
  color:        var(--sbx-text-on-primary);
  border-color: var(--sbx-primary);
  box-shadow:   0 2px 8px rgba(var(--sbx-primary-rgb), 0.22);
}

.donations button.btn.btn-amount.btn-primary:hover {
  background:   var(--sbx-primary-dark);
  border-color: var(--sbx-primary-dark);
  color:        var(--sbx-text-on-primary);
}

/* -- Frequency selector: CSS segmented pill control ----------------------- */
/*
 * Hides the native radio (position absolute + 0 size, NOT display:none --
 * input stays in the a11y tree and submits normally). :has() progressively
 * enhances the container into a pill track; non-:has() browsers get hidden
 * radios with styled labels that are still clickable.
 *
 * Specificity note: Phase 4 `input[type="radio"].field` = 0,0,2,1.
 * Must include element selector to tie at 0,0,2,1 and win by source order.
 */
.donations input.interval-toggle {
  position: absolute;
  opacity:  0;
  width:    0;
  height:   0;
  overflow: hidden;
  margin:   0;
}

/* Show focus ring on the pill label when the hidden radio is keyboard-focused */
.donations input.interval-toggle:focus-visible + label.choice {
  box-shadow: var(--sbx-shadow-focus);
}

/* Pill track + label styling wrapped in :has() so the container reflow
 * only fires in browsers that can handle it cleanly. */
@supports selector(:has(*)) {
  .donations li:has(input.interval-toggle) .cntr {
    display:       inline-flex;
    align-items:   center;
    position:      relative; /* slider anchor */
    background:    var(--sbx-surface-muted);
    border:        1.5px solid var(--sbx-border-strong);
    border-radius: var(--sbx-radius-pill);
    padding:       3px;
    gap:           2px;
  }

  /* Flatten span-block wrappers so labels become direct flex children */
  .donations li:has(input.interval-toggle) .span-block {
    display: contents;
  }
}

/* Slider pill: injected by JS; transitions position+size for a smooth selection sweep */
.donations .sbx-pill-slider {
  position:      absolute;
  top:           3px;
  left:          3px;
  height:        calc(100% - 6px);
  border-radius: var(--sbx-radius-pill);
  background:    var(--sbx-primary);
  box-shadow:    0 1px 4px rgba(var(--sbx-primary-rgb), 0.28);
  pointer-events: none;
  transition:    left   var(--sbx-motion-base) var(--sbx-motion-ease),
                 width  var(--sbx-motion-base) var(--sbx-motion-ease);
  will-change:   left, width;
  z-index:       0;
}

/* Pill label -- unselected */
.donations .interval-toggle + label.choice {
  display:       inline-block;
  padding:       0.5rem 1.5rem;
  border-radius: var(--sbx-radius-pill);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  color:         var(--sbx-accent);
  cursor:        pointer;
  white-space:   nowrap;
  margin:        0;
  position:      relative; /* sit above .sbx-pill-slider (z-index:0) */
  z-index:       1;
  transition:    color var(--sbx-transition);
  user-select:   none;
}

/* Pill label -- selected: transparent bg (slider provides it); text switches to white */
.donations .interval-toggle:checked + label.choice {
  color:        var(--sbx-text-on-primary);
  font-weight:  700;
  background:   transparent;
}

/* -- Payment method: cleaner panel row ------------------------------------- */
/*
 * No card is pre-selected on load -- global dimming would make all options
 * look disabled. All logos show at full opacity; selected panel gets an
 * unmistakable blue border + tint.
 *
 * Radio hiding is inside @supports selector(:has(*)) so non-:has() browsers
 * keep Phase 4's visible radio circle as a functional fallback.
 *
 * position:relative enables :focus-within to show keyboard focus on the panel.
 */
.donations .sbxPayType .span-block {
  position: relative;
}

.donations .sbxPayType .span-block:focus-within {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

@supports selector(:has(*)) {
  /* Hide radio circle -- logo label is the click target via for="..." */
  .donations .sbxPayType input.pay-method {
    position: absolute;
    opacity:  0;
    width:    0;
    height:   0;
    overflow: hidden;
    margin:   0;
  }

  .donations .sbxPayType .span-block label.choice {
    cursor: pointer;
  }

  /* Selected card panel: unmistakable blue border + tint */
  .donations .sbxPayType .span-block:has(input:checked) {
    border-color: var(--sbx-primary);
    background:   var(--sbx-primary-pale);
    box-shadow:   0 0 0 2px rgba(var(--sbx-primary-rgb), 0.15);
  }
}

/* -- Radio-type amount chips: card container (radio buttons layout) ---------
 * On the radio buttons page, .span-block wraps input[type="radio"].amts +
 * label rather than a <button>. Adding a chip container here makes both
 * amount-selection layouts feel like the same designed component.
 * Scoped to :has() -- non-:has() browsers get the native radio with no border.
 */
@supports selector(:has(*)) {
  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts) {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             var(--sbx-space-xs);
    padding:         0.5rem 0.625rem;
    min-height:      64px;
    border:          2px solid var(--sbx-border-strong);
    border-radius:   var(--sbx-radius-card);
    cursor:          pointer;
    transition:      border-color var(--sbx-transition),
                     background   var(--sbx-transition);
  }

  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts):hover {
    border-color: var(--sbx-accent);
    background:   var(--sbx-accent-soft);
  }

  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts:checked) {
    border-color: var(--sbx-primary);
    background:   var(--sbx-primary-pale);
  }
}

/* -- Frequency row: breathing room above the pill ---------------------------
 * The li.pad-notop sits in the same flex container as the amount group LIs
 * separated only by the 8px flex gap. 16px top margin makes the "TYPE OF
 * DONATION" pill feel like a distinct choice rather than part of the grid.
 */
.donations ul.donation-list.compList > li.pad-notop {
  margin-top: var(--sbx-space-md);
}

/* =========================================================================
   PHASE 7 REFINEMENTS
   ========================================================================= */

/* -- 1. Transaction fee checkbox: horizontal inline alignment -------------- */
/*
 * Default .span-block is display:block, stacking the checkbox above its
 * label. Switch to flex so they sit side-by-side. align-items:flex-start
 * keeps multiline labels from dragging the checkbox down.
 *
 * Specificity note: soapbox-bootstrap `ul.compList li div.cntr span.span-block`
 * = (0,3,4). Need col-2 >= 4 to win. Adding li.pad-notop gives (0,4,2) -- wins.
 */
.donations li.pad-notop .span-block:has(input.fee_amount) {
  display:     flex;
  align-items: center;
  gap:         0.625rem;
}

/* Reset the ul.compList label.choice { margin: -15px 0 0 23px } negative pull
 * that was designed for the old floated layout — flex gap handles spacing now */
.donations li.pad-notop .span-block:has(input.fee_amount) label.choice {
  margin: 0;
  width:  auto;
  flex:   1;
}

.donations input.fee_amount {
  flex-shrink: 0;
  margin-top:  2px; /* optical correction: checkbox sits 2px low vs label baseline */
}

/* -- 2. Radio amount chips: radio visible below amount text ----------------- */
/*
 * Phase 5 set flex-direction:column, which put the radio (first in DOM) at the
 * top and the label below. column-reverse flips that: label renders at the top,
 * radio at the bottom. The radio is left at its natural size so it is clearly
 * visible and communicates the selection state.
 */
@supports selector(:has(*)) {
  /* column-reverse: label (2nd in DOM) at top; radio (1st in DOM) at bottom */
  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts) {
    flex-direction: column-reverse;
    gap:            0.375rem;
    padding:        0.625rem 0.5rem 0.5rem;
  }

  /* Radio: restore from hidden to visible at a clear, touchable size */
  .donations li[class*="donate-amount-group"] .span-block input[type="radio"].amts {
    position:    static;
    opacity:     1;
    width:       20px;
    height:      20px;
    overflow:    visible;
    margin:      0;
    flex-shrink: 0;
    cursor:      pointer;
  }

  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts) label.choice {
    display:    block;
    text-align: center;
    width:      100%;
    flex:       none;
    font-size:  var(--sbx-font-size-sm);
    font-weight: 600;
    color:      var(--sbx-text-heading);
    line-height: 1.3;
    padding:    0;
    margin:     0;
    cursor:     pointer;
  }

  /* Selected chip: primary-pale bg is light, so use primary text (not white) */
  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts:checked) label.choice {
    color: var(--sbx-primary);
  }
}

/* Keyboard focus: forward focus ring from radio to visible chip label */
.donations li[class*="donate-amount-group"] input[type="radio"].amts:focus-visible + label.choice {
  box-shadow: var(--sbx-shadow-focus);
}

/* -- 3. Other / custom amount: inline with Other chip ---------------------- */
/*
 * Touch page: .input-group ($ | input | USD) is a direct grid child of .cntr.
 * Bootstrap sets it to display:table -- reset to flex. Do NOT force grid-column
 * to 1/-1; let CSS auto-placement fill the empty col-3 slot on the same row as
 * the "Other" chip, keeping them visually grouped. If there is no empty slot
 * (all columns full) the input naturally wraps to the next row.
 */
.donations li[class*="donate-amount-group"] .cntr > .input-group {
  display:       flex;
  align-items:   stretch;
  align-self:    start;     /* prevent grid row stretch from inflating beyond min-height */
  width:         auto;      /* reset Bootstrap 100% width */
  min-height:    52px;
  border:        2px solid var(--sbx-border-strong); /* match btn-amount border */
  border-radius: var(--sbx-radius-card);
  overflow:      hidden;
  margin-top:    0;
}

.donations li[class*="donate-amount-group"] .cntr > .input-group .input-group-addon {
  display:     flex;
  align-items: center;
  float:       none;         /* reset Bootstrap float */
  width:       auto;         /* reset Bootstrap width */
  padding:     0 0.875rem;
  background:  var(--sbx-surface-alt);
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-sm);
  font-weight: 600;
  border:      none;
  white-space: nowrap;
  line-height: normal;
}

.donations li[class*="donate-amount-group"] .cntr > .input-group .custom-input {
  flex:         1;
  /* WITHOUT THIS THE "USD" SUFFIX DISAPPEARS ON A PHONE (v256).
     
     `flex: 1` is `1 1 0%`, so the input is allowed to shrink -- but a flex item
     also carries `min-width: auto`, which floors it at min-content, and for an
     <input> that is driven by the size attribute rather than by the box it is
     in. So on a narrow grid cell the input refused to give ground, the row grew
     past the group, and `overflow: hidden` on .input-group silently clipped the
     suffix off the end.
     
     Measured at 390px: the group ends at 358 and USD ran to 401. Not a scrollbar
     -- the clip hides it -- which is why it survived: the page looks fine, the
     currency label is simply gone. Present at 390, 360 and 320; predates the
     aside work. */
  min-width:    0;
  float:        none;        /* reset Bootstrap float */
  width:        auto;
  display:      block;
  height:       100%;        /* override Bootstrap form-control fixed height; fills flex container */
  min-height:   48px;        /* floor if height:100% can't resolve */
  padding:      0 0.75rem;
  border:       none;
  border-left:  1px solid var(--sbx-border-color);
  border-right: 1px solid var(--sbx-border-color);
  font-size:    var(--sbx-font-size-sm);
  font-family:  var(--sbx-font-ui);
  background:   var(--sbx-surface);
  color:        var(--sbx-text-heading);
  outline:      none;
}

.donations li[class*="donate-amount-group"] .cntr > .input-group .custom-input:focus {
  box-shadow: inset 0 0 0 2px var(--sbx-primary);
}

@supports selector(:has(*)) {
  /* Radio page: custom text input is inside a .span-block grid item.
   * Same auto-placement strategy as the touch input-group above -- no
   * grid-column override so the item fills the empty col-3 slot on the
   * Other chip's row. */

  .donations li[class*="donate-amount-group"] .span-block:has(input.custom-input) {
    display:       flex;
    align-items:   stretch;
    padding:       0;
    min-height:    64px; /* match radio tile min-height so tile never collapses */
    gap:           0;
    border:        2px solid var(--sbx-border-strong); /* match btn-amount border */
    border-radius: var(--sbx-radius-card);
    overflow:      hidden;
    margin-top:    0;
    cursor:        default;
  }

  /* $ prefix addon -- radio page has no .input-group-addon; inject via pseudo-element */
  .donations li[class*="donate-amount-group"] .span-block:has(input.custom-input)::before {
    content:     '$';
    display:     flex;
    align-items: center;
    padding:     0 0.875rem;
    background:  var(--sbx-surface-alt);
    color:       var(--sbx-text-muted);
    font-size:   var(--sbx-font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid var(--sbx-border-color);
  }

  /* No hover highlight on the custom input row */
  .donations li[class*="donate-amount-group"] .span-block:has(input.custom-input):hover {
    border-color: var(--sbx-border-color);
    background:   transparent;
  }

  .donations li[class*="donate-amount-group"] .span-block:has(input.custom-input) input.custom-input {
    flex:        1;
    height:      100%;       /* override Bootstrap form-control fixed height; fills flex span-block */
    min-height:  48px;       /* floor if height:100% can't resolve */
    padding:     0 0.75rem;
    border:      none;
    font-size:   var(--sbx-font-size-sm);
    font-family: var(--sbx-font-ui);
    background:  var(--sbx-surface);
    color:       var(--sbx-text-heading);
    outline:     none;
  }

  .donations li[class*="donate-amount-group"] .span-block:has(input.custom-input) input.custom-input:focus {
    box-shadow: inset 0 0 0 2px var(--sbx-primary);
  }

  /* Currency label on radio page sits after the input */
  .donations li[class*="donate-amount-group"] .span-block:has(input.custom-input) label {
    display:     flex;
    align-items: center;
    padding:     0 0.875rem;
    background:  var(--sbx-surface-alt);
    color:       var(--sbx-text-muted);
    font-size:   var(--sbx-font-size-sm);
    font-weight: 600;
    white-space: nowrap;
  }
}

/* -- 4+5. Frequency pill: balanced inset + vertically centered text -------- */
/*
 * Original track: padding:3px, gap:2px, height:48px.
 * Increasing inset to 4px all around makes the vertical and horizontal gaps
 * between the selected background and the track border visually equal.
 * Removing fixed height lets the label padding define the track height.
 * Switching label to inline-flex with align-items:center ensures the text
 * is truly vertically centered regardless of line-height quirks.
 */
@supports selector(:has(*)) {
  .donations li:has(input.interval-toggle) .cntr {
    padding: 4px;
    gap:     4px;
    height:  auto;
  }
}

.donations .interval-toggle + label.choice {
  display:     inline-flex;
  align-items: center;
  padding:     8px 20px;
  height:      auto;
  line-height: 1.2;
}

/* -- 6. Frequency pill: transition -- color only (slider handles bg) ------- */
.donations .interval-toggle + label.choice {
  transition: color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.donations .interval-toggle:checked + label.choice {
  box-shadow: none; /* shadow lives on .sbx-pill-slider instead */
}

/* -- 7. Payment method cards: equal padding all sides ---------------------- */
/*
 * soapbox-bootstrap `ul.compList li.complex div.cntr span.span-block`
 * specificity (0,3,4) overrides Phase 5 padding shorthand (0,3,0), forcing
 * padding-bottom:12px. Using the #sbxPayTypeContainer ID raises specificity
 * to (1,2,0) which cleanly beats the bootstrap rule.
 */
.donations #sbxPayTypeContainer .span-block {
  padding: var(--sbx-space-sm) var(--sbx-space-md); /* 8px 16px all sides */
}

/* -- 8. Micro-interactions: chip press + input focus-within ---------------- */
/*
 * :active scale gives the "button depresses" feeling for both touch-button
 * chips and radio-chip containers. will-change:transform prevents compositing
 * jank during the animation.
 */
.donations li[class*="donate-amount-group"] .span-block {
  will-change: transform;
  transition: transform 80ms ease;
}

.donations li[class*="donate-amount-group"] .span-block:active {
  transform: scale(0.95);
}

/* Touch-page amount buttons already have Bootstrap btn base; layer on press */
.donations button.btn.btn-amount:active {
  transform: scale(0.95);
}

/* Focus-within: custom amount inputs show the primary ring at the container level */
.donations li[class*="donate-amount-group"] .cntr > .input-group:focus-within {
  border-color: var(--sbx-primary);
  box-shadow:   0 0 0 2px rgba(var(--sbx-primary-rgb), 0.18);
}

/* -- 9. Amount chips: fade transition when interval changes ---------------- */
/*
 * JS adds .sbx-chip-appear on the cntr when the user switches frequency.
 * CSS plays the animation once then the class is removed on animationend.
 */
@keyframes sbx-chip-appear {
  from { opacity: 0.4; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1);    }
}

.donations li[class*="donate-amount-group"] .cntr.sbx-chip-appear {
  animation: sbx-chip-appear var(--sbx-motion-base) var(--sbx-motion-ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .donations li[class*="donate-amount-group"] .cntr.sbx-chip-appear {
    animation: none;
  }
}

/* -- 10. Submit button: processing state ----------------------------------- */
/*
 * Applied by the template-layer disableButton() wrapper after validation
 * passes. Never applied on validation failure.
 *
 * Spinner lives on ::before of the inner <span> (the button always has one).
 * Making the span inline-flex lets gap handle spacing cleanly.
 * Reduced-motion: spinner animation paused; ellipsis content instead.
 */
@keyframes sbx-btn-spin {
  to { transform: rotate(360deg); }
}

.donations .btn-submit.sbx-is-processing {
  cursor: not-allowed;
  opacity: 0.88;
}

.donations .btn-submit.sbx-is-processing > span {
  display:     inline-flex;
  align-items: center;
  gap:         0.45em;
}

.donations .btn-submit.sbx-is-processing > span::before {
  content:       '';
  display:       block;
  flex-shrink:   0;
  width:         0.875em;
  height:        0.875em;
  border:        2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation:     sbx-btn-spin 640ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .donations .btn-submit.sbx-is-processing > span::before {
    animation: none;
    width:     auto;
    height:    auto;
    border:    none;
    content:   '…';
  }
}

/* Events and Store checkout: same spinner pattern, no body-class dependency.
 * getPageSuffix() returns the menu-item pageclass_sfx which is not predictable;
 * payable-form-btn is present on every final payment submit button. */
.payable-form-btn.sbx-is-processing {
  cursor:  not-allowed;
  opacity: 0.88;
}

.payable-form-btn.sbx-is-processing > span {
  display:     inline-flex;
  align-items: center;
  gap:         0.45em;
}

.payable-form-btn.sbx-is-processing > span::before {
  content:          '';
  display:          block;
  flex-shrink:      0;
  width:            0.875em;
  height:           0.875em;
  border:           2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius:    50%;
  animation:        sbx-btn-spin 640ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .payable-form-btn.sbx-is-processing > span::before {
    animation: none;
    width:     auto;
    height:    auto;
    border:    none;
    content:   '…';
  }
}

/* -- 11. CVC card diagram: hide decorative image ---------------------------- */
/*
 * cvc.png is a small card-front/card-back diagram showing where the security
 * code is located. It reads as visual clutter on a modern form.
 */
.donations #cc-cvc img {
  display: none;
}

/* -- Mobile: taller chips + tighter H1 margin ----------------------------- */
@media (max-width: 480px) {
  .donations li[class*="donate-amount-group"] .cntr {
    grid-template-columns: repeat(2, 1fr);
  }

  /* More height for chips with 2-line wrapped labels in narrow columns */
  .donations button.btn.btn-amount,
  .donations li[class*="donate-amount-group"] .span-block:has(input[type="radio"].amts) {
    min-height: 64px;
  }

  /* Reduce H1 bottom margin on mobile -- 6+ line title pushes content off screen */
  .donations h1.title {
    margin-bottom: var(--sbx-space-md);
  }

  /* Payment method cards: force container full-width and switch to 3-col grid.
   * Bootstrap 2 floats the .cntr column at ~67% — override so cards aren't
   * squeezed into 233px at 375px and have room to sit 3-per-row.
   * The !important overrides the Bootstrap inline float and width. */
  .donations #sbxPayTypeContainer.sbxPayType {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap:     var(--sbx-space-xs);
    width:   100%;
    padding: 0 var(--sbx-space-xs);
    box-sizing: border-box;
  }

  /* Ensure the wrapping .cntr expands to fill the available column width */
  @supports selector(:has(*)) {
    .donations li:has(#sbxPayTypeContainer) .cntr {
      width:       100% !important;
      float:       none !important;
      margin-left: 0   !important;
    }

    /* Designation pills: ul.donation-list is display:flex / flex-direction:row /
     * flex-wrap:wrap. li.designation-group has flex-shrink:0 / flex-basis:auto
     * (from app CSS) so it expands to max-content (~803px) and overflows the
     * 324px flex container. width:100% constrains flex-basis:auto to 100% of
     * the container width (324px). NOT using overflow-x:hidden — that forces
     * overflow-y:auto and clips the absolutely-positioned #dropdown-list. */
    .donations li.designation-group {
      width: 100%;
    }
    .donations .designation-container,
    .donations .designation-container .cntr {
      width:     100% !important;
      max-width: 100%;
      min-width: 0;
    }
    .donations .pills {
      width: 100%;
    }
  }
}


/* -- Donations skeleton: app-specific loading states ----------------------
 *
 * 1. Page fade-in: the entire donations form fades in on load.
 *    CSS-only — the animation fires once on page paint with no JS required.
 *    Duration: --sbx-motion-slow (360ms) so it's perceptible but not slow.
 *
 * 2. Braintree hosted fields: BT injects iframes into empty container divs
 *    after its JS initializes (typically 1–3s after page load).
 *    While a container is empty (no iframe/input/select child), show a
 *    shimmer placeholder via ::before pseudo-element.
 *    The :has() guard auto-removes the placeholder the moment BT injects.
 *
 *    ⚠️ PRODUCTION NOTE: verify the exact Braintree field container
 *    selectors before deploying. The IDs below (#bt-number, #bt-cvv,
 *    #bt-expiration-date) are common defaults — confirm in sbx_donations.js.
 *    This rule is safe to deploy even with wrong selectors (it simply
 *    won't match anything).
 */

.donations #page {
  animation: sbx-fade-in var(--sbx-motion-slow) var(--sbx-motion-ease) both;
}

@supports selector(:has(*)) {
  .donations #bt-number:not(:has(iframe)):not(:has(input)):not(:has(select))::before,
  .donations #bt-cvv:not(:has(iframe)):not(:has(input)):not(:has(select))::before,
  .donations #bt-expiration-date:not(:has(iframe)):not(:has(input)):not(:has(select))::before {
    content:         '';
    display:         block;
    height:          48px;
    border-radius:   var(--sbx-skel-radius);
    background:      linear-gradient(
                       90deg,
                       var(--sbx-skel-base)    0%,
                       var(--sbx-skel-shimmer) 50%,
                       var(--sbx-skel-base)    100%
                     );
    background-size: 200% 100%;
    animation:       sbx-shimmer var(--sbx-skel-speed) linear infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .donations #page { animation: none; }
  .donations #bt-number::before,
  .donations #bt-cvv::before,
  .donations #bt-expiration-date::before { animation: none; }
}

/* -- Expiration month/year row: keep on one line --------------------------
 * #cc-exp contains three .span-block children; .span-block is display:block
 * (Soapbox component class), so they stack vertically by default.
 * flex row forces them side-by-side without touching component CSS.
 */
.donations #cc-exp {
  display:     flex;
  align-items: flex-start;
  gap:         var(--sbx-space-sm);
}

/* Column layout: SELECT on top, label description below (matches other payment fields).
 * flex-start alignment on parent keeps "/" at the top of the 70px span height. */
.donations #cc-exp > .span-block:not(.symbol) {
  display:        inline-flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            2px;
}

/* "/" nudged down to align with center of 48px SELECT (SELECT center = 24px from top;
 * "/" text center ≈ 18px from its top; padding-top 6px → center at 24px). */
.donations #cc-exp > .span-block.symbol {
  padding-top: 6px;
}


/* -- Phase 8: Label normalization, designation pills, tribute section ------ */

/* Bootstrap em cascade inflates label.desc to ~19px; !important required —
 * soapbox-bootstrap uses ul.compList li label.desc (specificity 0,2,3) which
 * beats .donations label.desc (0,1,1). */
.donations label.desc {
  font-size:      var(--sbx-font-size-sm) !important;
  font-weight:    600 !important;
  color:          var(--sbx-text-heading);
  line-height:    1.35;
  letter-spacing: 0.04em;
}

/* Designation pills: override select2.css — align with design system tokens */
.donations .pills {
  display:       flex;
  flex-wrap:     wrap;
  gap:           var(--sbx-space-xs);
  margin-bottom: var(--sbx-space-sm);
}

.donations .pill {
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  padding:       0.3125rem 0.875rem;
  border-radius: var(--sbx-radius-pill);
  border:        1.5px solid var(--sbx-border-strong);
  background:    var(--sbx-surface);
  color:         var(--sbx-text-heading);
  margin-right:  0;
  cursor:        pointer;
  transition:    background     var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color   var(--sbx-motion-fast) var(--sbx-motion-ease),
                 color          var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.donations .pill:hover {
  background:   var(--sbx-accent-soft);
  border-color: var(--sbx-primary-light);
}

.donations .pill.active {
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary);
  color:        var(--sbx-text-on-primary);
}

/* Tribute / Dedication expanded container.
 * soapbox-bootstrap.min.css: .item-section .section-content-highlight (0,2,0)
 * ties with .donations .section-content-highlight (0,2,0). !important on
 * background breaks the tie definitively; border-radius / border / padding
 * are not set by soapbox-bootstrap so no !important needed there. */
.donations .section-content-highlight {
  background:    var(--sbx-surface-muted) !important;
  border-radius: var(--sbx-radius-input);
  border:        1px solid var(--sbx-border-color);
  padding:       var(--sbx-space-md);
  margin-top:    var(--sbx-space-sm);
  overflow:      hidden;
}

/* Reveal animation for #dedication-details (class toggled by MutationObserver) */
@keyframes sbx-reveal-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.donations #dedication-details.sbx-tribute-visible {
  animation: sbx-reveal-down var(--sbx-motion-base) var(--sbx-motion-ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .donations #dedication-details.sbx-tribute-visible { animation: none; }
}


/* ========================================================================== */
/* Phase 12: GLOBAL CHECKBOX TOGGLE SYSTEM + DONATIONS CLEANUP                */
/*                                                                             */
/* 1. Toggle/slider checkboxes (global — any app using input.field.checkbox   */
/*    + label.choice with these IDs gets the treatment automatically)         */
/*                                                                             */
/*    Donations:  #transaction_fee_amount, #anonymous_donation,               */
/*                #dedication_toggle, #newsletter                             */
/*    Events:     #p2p_optin (RSVP P2P opt-in)                                */
/*                                                                             */
/*    Not in scope (different label pattern, needs PHP change):               */
/*    Shop: #shopping_cart_shipping_pickup (label.control-label)              */
/*    Petitions: #display_signature (inline text, no label element)           */
/*    Auctions: uses Bootstrap 5 form-switch natively — no changes needed     */
/*                                                                             */
/*    Pattern: native input is accessibility-hidden (clip, not display:none   */
/*    — stays focusable and keyboard-toggleable). label.choice becomes the    */
/*    visual row; ::before = track (40×24px), ::after = thumb (18×18px).     */
/*                                                                             */
/*    Accessibility preserved:                                                 */
/*      • Input stays in tab order                                            */
/*      • Space bar toggles the hidden checkbox normally                      */
/*      • :checked propagates to + label via adjacent-sibling selector        */
/*      • :focus-visible shows outline on the track (::before)                */
/*      • Screen readers read label text; input role=checkbox is intact       */
/*                                                                             */
/* 2. Tribute type radios (#dedication_type) → segmented pill control         */
/*    Same CSS pattern as .interval-toggle. JS injects .sbx-pill-slider.      */
/*                                                                             */
/* 3. Fee section border: remove redundant top-border dividers                */
/* ========================================================================== */

/* -- 1. Global toggle checkboxes ------------------------------------------- */

/* Visually-hidden pattern: accessible, not display:none */
#transaction_fee_amount,
#anonymous_donation,
#dedication_toggle,
#newsletter,
#p2p_optin {
  clip:      rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height:    1px;
  overflow:  hidden;
  position:  absolute;
  width:     1px;
}

/* Label row: toggle track + text inline */
input.field.checkbox#transaction_fee_amount + label.choice,
input.field.checkbox#anonymous_donation     + label.choice,
input.field.checkbox#dedication_toggle      + label.choice,
input.field.checkbox#newsletter             + label.choice,
input.field.checkbox#p2p_optin             + label.choice {
  position:     relative;
  display:      inline-flex;
  align-items:  center;
  padding-left: 52px;    /* 40px track + 12px gap */
  min-height:   26px;
  cursor:       pointer;
  user-select:  none;
}

/* Track */
input.field.checkbox#transaction_fee_amount + label.choice::before,
input.field.checkbox#anonymous_donation     + label.choice::before,
input.field.checkbox#dedication_toggle      + label.choice::before,
input.field.checkbox#newsletter             + label.choice::before,
input.field.checkbox#p2p_optin             + label.choice::before {
  content:          '';
  position:         absolute;
  left:             0;
  top:              50%;
  transform:        translateY(-50%);
  width:            40px;
  height:           24px;
  border-radius:    12px;
  background-color: var(--sbx-surface-muted);
  border:           1.5px solid var(--sbx-border-color);
  transition:       background-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color     var(--sbx-motion-fast) var(--sbx-motion-ease);
}

/* Thumb */
input.field.checkbox#transaction_fee_amount + label.choice::after,
input.field.checkbox#anonymous_donation     + label.choice::after,
input.field.checkbox#dedication_toggle      + label.choice::after,
input.field.checkbox#newsletter             + label.choice::after,
input.field.checkbox#p2p_optin             + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0, 0, 0, 0.20);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}

/* Checked: track → primary, thumb slides right */
input.field.checkbox#transaction_fee_amount:checked + label.choice::before,
input.field.checkbox#anonymous_donation:checked     + label.choice::before,
input.field.checkbox#dedication_toggle:checked      + label.choice::before,
input.field.checkbox#newsletter:checked             + label.choice::before,
input.field.checkbox#p2p_optin:checked             + label.choice::before {
  background-color: var(--sbx-primary);
  border-color:     var(--sbx-primary-dark);
}

input.field.checkbox#transaction_fee_amount:checked + label.choice::after,
input.field.checkbox#anonymous_donation:checked     + label.choice::after,
input.field.checkbox#dedication_toggle:checked      + label.choice::after,
input.field.checkbox#newsletter:checked             + label.choice::after,
input.field.checkbox#p2p_optin:checked             + label.choice::after {
  left: 19px;    /* 40px track − 18px thumb − 3px padding = 19px */
}

/* Focus ring on track when keyboard-navigating */
input.field.checkbox#transaction_fee_amount:focus-visible + label.choice::before,
input.field.checkbox#anonymous_donation:focus-visible     + label.choice::before,
input.field.checkbox#dedication_toggle:focus-visible      + label.choice::before,
input.field.checkbox#newsletter:focus-visible             + label.choice::before,
input.field.checkbox#p2p_optin:focus-visible             + label.choice::before {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* -- 2. Tribute type radios: segmented pill --------------------------------- */

/* Hide native radios (same pattern as .interval-toggle) */
.donations input.field.radio.dedication-option {
  position: absolute;
  opacity:  0;
  width:    0;
  height:   0;
  overflow: hidden;
  margin:   0;
}

/* Focus ring on label when radio is keyboard-focused */
.donations input.field.radio.dedication-option:focus-visible + label.choice {
  box-shadow: var(--sbx-shadow-focus);
}

/* Pill track (scoped to dedication_type li to avoid touching any other .cntr) */
@supports selector(:has(*)) {
  .donations li#dedication_type:has(input.dedication-option) .cntr {
    display:       inline-flex;
    align-items:   center;
    position:      relative;
    background:    var(--sbx-surface-muted);
    border:        1.5px solid var(--sbx-border-strong);
    border-radius: var(--sbx-radius-pill);
    padding:       3px;
    gap:           2px;
  }

  .donations li#dedication_type:has(input.dedication-option) .span-block {
    display: contents;
  }
}

/* Unselected pill label */
.donations .dedication-option + label.choice {
  display:       inline-block;
  padding:       0.5rem 1.25rem;
  border-radius: var(--sbx-radius-pill);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  color:         var(--sbx-accent);
  cursor:        pointer;
  white-space:   nowrap;
  margin:        0;
  position:      relative;
  z-index:       1;
  user-select:   none;
  transition:    color var(--sbx-transition);
}

/* Selected: text goes white; .sbx-pill-slider (injected by JS) provides bg */
.donations .dedication-option:checked + label.choice {
  color:       var(--sbx-text-on-primary);
  font-weight: 700;
  background:  transparent;
}

/* -- 3. Fee section: remove redundant top-border dividers ------------------ */
/*
 * .section-fee (title row) and .section-fee-field (checkbox row) are separate
 * .item-section divs. Both receive border-top from the shared
 * `.donations .item-section + .item-section` rule. The fee section does not
 * need a hard line separating it from the billing section above.
 */
.donations .section-fee.item-section {
  border-top: none;
  margin-top: var(--sbx-space-sm);
}

.donations .section-fee-field.item-section {
  border-top:  none;
  margin-top:  var(--sbx-space-xs);
  padding-top: 0;
}


/* ========================================================================== */
/* Phase 10: SQUEEZEBOX MODAL + COMPONENT.PHP                                 */
/*                                                                            */
/* SqueezeBox DOM (built by media/system/js/modal.js):                        */
/*   #sbox-overlay  — full-screen backdrop                                    */
/*   #sbox-window   — modal container (position:fixed, top/left 50%)          */
/*     a#sbox-btn-close  — close trigger (position:absolute, top:-15px right) */
/*     #sbox-content     — content area                                        */
/*                                                                            */
/* soapbox-bootstrap:                                                          */
/*   .sbox-window { bg:#000; padding:10px } — class selector, not ID          */
/*   a#sbox-btn-close { closebox.png; 30x30 } — (1,0,1) specificity           */
/*   #sbox-content { bg:#fff; overflow:auto }                                 */
/*                                                                            */
/* component.php: template file created to load the full stylesheet stack.    */
/* body.contentpane styles apply inside modal iframes.                         */
/* ========================================================================== */

/* ── Overlay backdrop ───────────────────────────────────────── */
/* rgba(10, 15, 35, ...): slightly deeper than --sbx-overlay-rgb (20,28,50); tuned for modal backdrop */
#sbox-overlay {
  background: rgba(10, 15, 35, 0.52);
}

/* ── Modal window shell ─────────────────────────────────────── */
/* ID selector (1,0,0) beats .sbox-window class (0,1,0) in soapbox-bootstrap  */
#sbox-window {
  background:    transparent;
  padding:       0;
  border-radius: var(--sbx-radius-card);
  box-shadow:    var(--sbx-shadow-dialog);
  overflow:      visible;    /* don't clip #sbox-btn-close positioned at -15px */
}

/* ── Modal content area ─────────────────────────────────────── */
#sbox-content {
  background:    var(--sbx-surface);
  border-radius: var(--sbx-radius-card);
  overflow:      auto;       /* default; recurring-upsell overrides with !important */
  width:         100%;
  height:        100%;
}

/* ── Close button ───────────────────────────────────────────── */
/* Replaces the closebox.png image with a CSS-only circular × button.
 * Specificity matches soapbox-bootstrap's a#sbox-btn-close (1,0,1) and
 * loads after it — cascade wins. top/right match existing position so that
 * app JS re-setting these to -15px (default_progress_chart_bar.php) has no
 * visible effect. */
a#sbox-btn-close {
  background-image: none;
  background-color: var(--sbx-surface);
  width:            32px;
  height:           32px;
  top:              -14px;
  right:            -14px;
  border-radius:    50%;
  border:           1px solid var(--sbx-border-color);
  box-shadow:       var(--sbx-shadow-sm);
  display:          flex;
  align-items:      center;
  justify-content:  center;
  transition:       background-color  var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color      var(--sbx-motion-fast) var(--sbx-motion-ease);
}

a#sbox-btn-close::before {
  content:     '\00d7';       /* × U+00D7 multiplication sign */
  font-size:   var(--sbx-font-size-lg);
  line-height: 1;
  color:       var(--sbx-text-muted);
  font-family: var(--sbx-font-body);
  font-weight: 400;
  display:     block;
}

a#sbox-btn-close:hover {
  background-color: var(--sbx-error-bg);
  border-color:     var(--sbx-error);
  text-decoration:  none;
}

a#sbox-btn-close:hover::before {
  color: var(--sbx-error);
}

/* ── Modal-context body (component.php, body.contentpane) ───── */
body.contentpane {
  background:  var(--sbx-surface);
  font-family: var(--sbx-font-body);
  color:       var(--sbx-text-body);
  padding:     var(--sbx-space-lg);
  margin:      0;
}

/* Remove any content/wrapper margin inside component views */
body.contentpane #content,
body.contentpane .compView-wrap,
body.contentpane .compBody-wrap {
  padding: 0;
  margin:  0;
}

/* ── Mobile: SqueezeBox fills screen on narrow viewports ────── */
@media (max-width: 480px) {
  #sbox-window {
    border-radius: var(--sbx-radius-sm);
  }
  #sbox-content {
    border-radius: var(--sbx-radius-sm);
  }
}

/* ── Forms: Campaign Lookup modal ───────────────────────────── */
/*
 * Rendered via component.php (body.contentpane) at /lookup?elid=N.
 * DOM: h1.componentheading + ul.compList > li.row.result × N.
 * No search form — full list of available campaigns.
 * body.contentpane scope isolates these rules from the main Forms page.
 */
body.contentpane .com_jsfsubmit h1.componentheading {
  font-size:      var(--sbx-font-size-lg);
  font-weight:    700;
  color:          var(--sbx-page-title-color);
  margin:         0 0 var(--sbx-space-md) 0;
  padding-bottom: var(--sbx-space-sm);
  border-bottom:  1px solid var(--sbx-border-color);
}

body.contentpane .com_jsfsubmit ul.compList {
  list-style:    none;
  margin:        0;
  padding:       0;
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-sm);
  overflow:      hidden;
}

body.contentpane .com_jsfsubmit li.row.result {
  /* Reset inherited conflicts: bootstrap.min .row (margin-left:-20px, float),
     soapbox-bootstrap (clear:both), soapboxTypography ul li (bullet bg + padding),
     template.css .sbx .compList-formVert > li (margin-bottom:16px) */
  display:          block;
  margin:           0;
  float:            none;
  clear:            none;
  background-image: none;
  padding:          var(--sbx-space-sm) var(--sbx-space-md);
  cursor:           pointer;
  font-size:        var(--sbx-font-size-base);
  color:            var(--sbx-text-body);
  border-bottom:    1px solid var(--sbx-border-subtle);
  line-height:      1.8;
  transition:       background var(--sbx-motion-fast) var(--sbx-motion-ease),
                    color      var(--sbx-motion-fast) var(--sbx-motion-ease);
}

body.contentpane .com_jsfsubmit li.row.result:last-child {
  border-bottom: none;
}

body.contentpane .com_jsfsubmit li.row.result:hover {
  background: var(--sbx-primary-pale);
  color:      var(--sbx-primary);
}


/* ========================================================================== */
/* Phase 9: PAGINATION                                                         */
/*                                                                            */
/* Covers: ul.pagination (pagination_list_render output)                      */
/*         .list-footer / .compResNavCtr-content (page counter + limit)       */
/*                                                                            */
/* Structure from templates/system/html/pagination.php:                       */
/*   ul.pagination > li (laquo) + li.start + li.prevPage[Off] +               */
/*                   li[active] (strong>a) | li[inactive] (span) +            */
/*                   li.nextPage[Off] + li.end + li (raquo)                   */
/* ========================================================================== */

/* Container */
ul.pagination {
  display:         flex;
  flex-wrap:       wrap;
  align-items:     center;
  gap:             2px;
  margin:          var(--sbx-space-lg) 0 var(--sbx-space-sm);
  padding:         var(--sbx-space-sm) 0;
  border-top:      1px solid var(--sbx-border-color);
  border-width:    1px 0 0 0;
  list-style:      none;
}

/* Every item: uniform touch target */
ul.pagination li {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-width:       36px;
  min-height:      36px;
  margin:          0;
  padding:         0;
  background:      none;
  border-radius:   var(--sbx-radius-sm);
  zoom:            1;
}

/* Linked page items.
 * !important on color/text-decoration: the global rule
 * "#content a:not(.btn):not(.readon):not(.button):not(.share-link)" has
 * specificity (1,4,1) which cannot be beaten by any ul.pagination selector.
 * Neither property is set by app JS. Both are purely cosmetic. */
ul.pagination li a {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  min-width:        36px;
  min-height:       36px;
  padding:          0 0.5rem;
  font-size:        var(--sbx-font-size-sm);
  font-weight:      500;
  color:            var(--sbx-primary) !important;
  text-decoration:  none !important;
  border-radius:    var(--sbx-radius-sm);
  border:           1px solid transparent;
  transition:       background    var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color  var(--sbx-motion-fast) var(--sbx-motion-ease),
                    color         var(--sbx-motion-fast) var(--sbx-motion-ease);
}

ul.pagination li a:hover {
  background:       var(--sbx-accent-soft);
  border-color:     var(--sbx-border-strong);
  color:            var(--sbx-primary-dark) !important;
  text-decoration:  none !important;
}

/* Active page: strong > a wrapping.
 * pointer-events removed — the Shop com_store pagination wraps ALL navigable
 * links in <strong>, not only the current page. Keeping pointer-events:none
 * would prevent those links from being clicked. cursor:default is sufficient
 * visual signal for the current-page case in standard platform pagination. */
ul.pagination li strong a,
ul.pagination li strong a:hover {
  background:       var(--sbx-primary);
  border-color:     var(--sbx-primary);
  color:            var(--sbx-text-on-primary) !important;
  text-decoration:  none !important;
  font-weight:      700;
  cursor:           default;
}

/* Disabled / static items: plain span */
ul.pagination li span {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  min-width:        36px;
  min-height:       36px;
  padding:          0 0.5rem;
  font-size:        var(--sbx-font-size-sm);
  font-weight:      500;
  color:            var(--sbx-text-muted);
  cursor:           default;
}

/* Disabled prev / next */
ul.pagination li.prevPageOff span,
ul.pagination li.nextPageOff span {
  opacity: 0.38;
}

/* Static laquo/raquo: purely decorative; hidden — prev/next links cover navigation */
ul.pagination > li:first-child:not([class]),
ul.pagination > li:last-child:not([class]) {
  display: none;
}

/* Prev/next active links: slightly bolder weight */
ul.pagination li.prevPage a,
ul.pagination li.nextPage a {
  font-weight: 600;
}

/* ── Page counter + display-num row (.list-footer) ─────────── */
.list-footer {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  margin-top:  var(--sbx-space-xs);
}

.list-footer .limit,
.list-footer .counter {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
}

.list-footer .limit select {
  margin-left:   0.25rem;
  font-size:     var(--sbx-font-size-sm);
  padding:       0.2rem 0.4rem;
  border:        1px solid var(--sbx-input-border);
  border-radius: var(--sbx-radius-sm);
  background:    var(--sbx-surface);
  color:         var(--sbx-text-body);
}

/* ── Results nav counter (Page X of Y) ─────────────────────── */
.compResNavCtr-content {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
  margin:    var(--sbx-space-xs) 0 var(--sbx-space-sm);
}

.compResNavCtr-content span.pageOn,
.compResNavCtr-content span.totalPages {
  font-weight: 600;
  color:       var(--sbx-text-body);
}

/* ── Mobile: maintain touch targets, allow wrapping ────────── */
@media (max-width: 480px) {
  ul.pagination {
    gap: 1px;
  }

  ul.pagination li,
  ul.pagination li a,
  ul.pagination li span,
  ul.pagination li strong a {
    min-width:  40px;
    min-height: 40px;
  }
}


/* ========================================================================== */
/* 2. EVENTS                                                                  */
/* Scopes: .sbxEvents-upc (list), .sbxEvents-event (detail), .sbxEvents-cart */
/* ========================================================================== */

/* -- Events list: individual event cards ---------------------------------
 * Each .contentpaneopen is a card separated by a bottom border.
 */
.sbxEvents-upc .contentpaneopen {
  padding-bottom:   var(--sbx-space-xl);
  padding-top:      var(--sbx-space-sm);
  margin-bottom:    var(--sbx-space-xl);
  border-bottom:    1px solid var(--sbx-border-color);
  border-radius:    var(--sbx-radius-sm);
  transition:       background-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.sbxEvents-upc .contentpaneopen:last-child {
  border-bottom: none;
}

/* Event metadata row (date, host/venue) */
.sbxEvents-upc .article-meta-wrap,
.sbxEvents-event .article-meta-wrap {
  margin-bottom: var(--sbx-space-md);
}

.sbxEvents-upc .meta-line,
.sbxEvents-event .meta-line {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
}

.sbxEvents-upc .meta-line-med {
  font-size:   1rem;
  font-weight: 600;
  color:       var(--sbx-text-body);
}

/* Separator between event items -- hide the explicit separator element */
.article_separator.event_separator {
  display: none;
}

/* Event intro text */
.sbxEvents-upc .article-content.event-content {
  color:         var(--sbx-text-body);
  line-height:   1.65;
  margin-bottom: var(--sbx-space-md);
}

/* -- Events detail: section wrappers ------------------------------------ */
/* border-bottom removed in Phase 14 — spacing rhythm replaces hard lines    */
.sbxEvents-event .compSect-wrap {
  margin-bottom:  var(--sbx-space-xl);
  padding-bottom: var(--sbx-space-md);
}

/* -- Events: ticket table ------------------------------------------------
 * table.resultsTBL.tickets-tbl -- used for both main event and subevents.
 */
.com_sbxEvents table.resultsTBL.tickets-tbl {
  width:           100%;
  border-collapse: collapse;
  margin-bottom:   var(--sbx-space-lg);
  font-size:       var(--sbx-font-size-sm);
}

.com_sbxEvents table.resultsTBL.tickets-tbl thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
  text-align:     left;
}

.com_sbxEvents table.resultsTBL.tickets-tbl tbody tr {
  border-bottom: 1px solid var(--sbx-border-color);
}

.com_sbxEvents table.resultsTBL.tickets-tbl tbody tr.row1 {
  background: var(--sbx-surface-alt);
}

.com_sbxEvents table.resultsTBL.tickets-tbl tbody td {
  padding:     var(--sbx-space-sm) var(--sbx-space-md);
  vertical-align: top;
  line-height: 1.5;
}

/* -- Events: subevent accordion wrapper ---------------------------------
 * .compSect-wrap-subevent gets a JS-injected <style> (border + shadow)
 * via $document->addStyleDeclaration() in default_section_tickets.php.
 * That injection lands inside <jdoc:include type="head"> (index.php:36),
 * before template.css (index.php:57), so our rules win by source order
 * at equal specificity. The scoped selector (.com_sbxEvents ancestor)
 * adds one extra class to the chain (0,0,2,0 vs injected 0,0,1,0),
 * giving a specificity win on top of source-order -- no !important needed.
 * DO NOT touch .slds-badge elements -- Salesforce Lightning badges.
 */
.com_sbxEvents .compSect-wrap-subevent {
  border:        1.5px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  box-shadow:    var(--sbx-shadow-card);
  padding:       var(--sbx-space-md);
  margin-bottom: var(--sbx-space-md);
}

/* Subevent header row: title + badge + chevron */
.compSect-wrap-subevent dl {
  margin: 0 0 var(--sbx-space-sm) 0;
}

.compSect-wrap-subevent dl dt {
  padding:     var(--sbx-space-xs) 0;
  font-weight: 600;
  color:       var(--sbx-text-heading);
  line-height: 1.4;
}

.compSect-wrap-subevent dl dt.flex {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  gap:             var(--sbx-space-sm);
  cursor:          pointer;
}

/* Chevron icon -- inherit color */
.compSect-wrap-subevent .btnChevron {
  color:           var(--sbx-text-muted);
  text-decoration: none;
  flex-shrink:     0;
}

.compSect-wrap-subevent .triangle_down {
  display:      inline-block;
  border-left:  5px solid transparent;
  border-right: 5px solid transparent;
  border-top:   5px solid currentColor;
}

/* ── Phase 11: Events Modernization ─────────────────────────────────────── */
/*                                                                            */
/* Selectors covered:                                                         */
/*   .sbxEvents-upc  — event listing (upcoming / past / browse)              */
/*   .sbxEvents-event — event detail page                                    */
/*   .chbmenu         — component header bar (Subscribe link)                */
/*   .buttonheading   — print/email icon buttons                             */
/*   .ccbmenu         — "Add to Google/Outlook/iCal" calendar links          */
/*   table.tickets-tbl — ticket selection table                              */
/*   .well.well-table  — mobile ticket info sub-row                          */
/*   .compList-formBtns — registration buttons + status messages             */
/*   form.search-form  — browse/search classes keyword form                  */
/*                                                                            */
/* !important notes (same pattern as Phase 8 / 9):                          */
/*   "#content a:not(.btn):not(.readon):not(.button):not(.share-link)"       */
/*   has specificity (1,4,1) = 141 pts and sets color + text-decoration.    */
/*   Calendar links (.ccbIcal a), print/email links (.btnPrint a),           */
/*   and the Subscribe link (.chbRSS) all live inside #content and          */
/*   cannot be targeted with a normal selector ≥ 142 pts without encoding   */
/*   fragile DOM structure. !important is the established pattern here.      */
/* ========================================================================== */

/* -- Event listing: date as primary metadata anchor ------------------- */
/* Shift date color to primary-dark so it reads as the lead metadata cue  */
.sbxEvents-upc .meta-line-med .eventdate strong {
  color: var(--sbx-primary-dark);
}

/* -- Event listing: card hover ---------------------------------------- */
.sbxEvents-upc .contentpaneopen:hover {
  background-color: var(--sbx-surface-alt);
}

/* -- Component header bar: Subscribe/RSS link ------------------------- */
.chbmenu {
  list-style: none;
  padding:    0;
  margin:     0;
}
.chbmenu li {
  display: inline-block;
}
/* !important: beats #content a:not(...) at (1,4,1)=141 */
.chbmenu a.chbRSS {
  font-size:        var(--sbx-font-size-sm);
  color:            var(--sbx-text-muted) !important;
  text-decoration:  none !important;
  border:           1px solid var(--sbx-border-color);
  border-radius:    var(--sbx-radius-sm);
  padding:          4px 12px;
  display:          inline-block;
  transition:       color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.chbmenu a.chbRSS:hover {
  color:        var(--sbx-primary) !important;
  border-color: var(--sbx-primary);
}

/* -- Event detail: print/email icon buttons --------------------------- */
/* Hide the old PNG images; replace with Unicode glyphs via ::after     */
.buttonheading span.btnPrint img,
.buttonheading span.btnEmail img {
  display: none;
}
/* !important on color + text-decoration: beats (1,4,1)=141             */
.buttonheading span.btnPrint a,
.buttonheading span.btnEmail a {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  width:            28px;
  height:           28px;
  color:            var(--sbx-text-muted) !important;
  text-decoration:  none !important;
  border:           1px solid var(--sbx-border-color);
  border-radius:    var(--sbx-radius-sm);
  background:       var(--sbx-surface);
  font-size:        15px;
  line-height:      1;
  transition:       color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    background-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.buttonheading span.btnPrint a:hover,
.buttonheading span.btnEmail a:hover {
  color:            var(--sbx-primary) !important;
  border-color:     var(--sbx-primary);
  background-color: var(--sbx-primary-pale);
}
.buttonheading span.btnPrint a::after { content: '\2399'; }
.buttonheading span.btnEmail a::after { content: '\2709'; }

/* -- Event detail: date and time display ------------------------------ */
.sbxEvents-event .datestart {
  margin: 0 0 var(--sbx-space-md);
}
.sbxEvents-event .datestart .date {
  display:        block;
  font-size:      1.125rem !important; /* soapboxTypography.min.css wins specificity; !important required */
  font-weight:    700;
  color:          var(--sbx-text-heading);
  line-height:    1.25;
  letter-spacing: -0.01em;
}
.sbxEvents-event .datestart .time {
  display:     block;
  font-size:   var(--sbx-font-size-sm) !important; /* same system CSS specificity issue as .date */
  color:       var(--sbx-text-muted);
  font-weight: 400;
  margin-top:  var(--sbx-space-xs);
}

/* -- Event detail: calendar add-to links ------------------------------ */
/* Hide old iCal PNG icon; style Google/Outlook/iCal links as pill btns */
.ccbmenu {
  list-style: none;
  padding:    0;
  margin:     var(--sbx-space-sm) 0 0;
}
.ccbmenu.clearfix {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
}
.ccbmenu li {
  display:     inline-flex;
  align-items: center;
}
.ccbmenu .ccbIcal > img {
  display: none; /* replace with CSS icons */
}
.ccbmenu .ccbIcal > span {
  display:     inline-flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-xs);
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
}
/* !important on color + text-decoration: beats (1,4,1)=141             */
.ccbmenu .ccbIcal a {
  color:            var(--sbx-primary) !important;
  text-decoration:  none !important;
  border:           1px solid var(--sbx-border-color);
  border-radius:    var(--sbx-radius-sm);
  padding:          3px 10px;
  display:          inline-block;
  font-size:        var(--sbx-font-size-sm);
  background:       var(--sbx-surface);
  white-space:      nowrap;
  transition:       border-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    background-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.ccbmenu .ccbIcal a:hover {
  border-color:     var(--sbx-primary);
  background-color: var(--sbx-primary-pale);
  color:            var(--sbx-primary-dark) !important;
}

/* -- Ticket table: price alignment + visual hierarchy ----------------- */
/* Price column right-aligned, bolder, tabular numerals */
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketPrice,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketPrice {
  text-align:           right;
  font-variant-numeric: tabular-nums;
}
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketPrice {
  font-size:   var(--sbx-font-size-base);   /* 16px — normalized to match ticket name and total */
  font-weight: 700;
  color:       var(--sbx-text-heading);
}
/* Ticket name: block-level strong + muted description below */
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketType > strong {
  display:       block;
  font-weight:   600;
  font-size:     var(--sbx-font-size-base);  /* 16px — normalized from 14px to match price/total */
  color:         var(--sbx-text-heading);
  margin-bottom: 2px;
}
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketType > div {
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-xs);
  line-height: 1.45;
}
/* Deadline and remaining: muted secondary metadata */
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketDeadline,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketRemaining {
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-xs);
  white-space: nowrap;
}
/* Row hover on desktop primary rows */
.com_sbxEvents table.resultsTBL.tickets-tbl tbody tr.tr-primary {
  transition: background-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_sbxEvents table.resultsTBL.tickets-tbl tbody tr.tr-primary:hover {
  background-color: var(--sbx-primary-pale);
}

/* -- Ticket table: mobile info sub-row -------------------------------- */
/* .well.well-table.ticket-info shows the collapsed Ends/Remaining info  */
/* on phones (Bootstrap hidden-phone/visible-phone breakpoint).          */
.well.well-table.ticket-info {
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-sm);
  padding:       var(--sbx-space-xs) var(--sbx-space-sm);
  margin:        4px 0 2px;
  box-shadow:    none;
}
/* Reset Bootstrap .label (grey pill) inside the well */
.well.well-table.ticket-info .label {
  font-weight:    700;
  font-size:      var(--sbx-font-size-xs);
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background:     none;
  padding:        0 3px 0 0;
  border-radius:  0;
  text-shadow:    none;
}
.ticket-info-tbl td {
  padding:   2px 0;
  font-size: var(--sbx-font-size-xs);
  color:     var(--sbx-text-body);
  border:    none;
}

/* -- Registration button area: capacity/status message ---------------- */
.compList-formBtns .msg {
  display: block;
}
.compList-formBtns .msg p {
  margin:     0;
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
  font-style: italic;
}

/* -- Search/browse classes: keyword search form ----------------------- */
/* font-size 1rem: iOS zoom floor (must not drop below 16px on focus)   */
form.search-form {
  margin-bottom: var(--sbx-space-lg);
}
.s-field {
  font-size:     1rem !important;   /* iOS zoom floor: must stay ≥ 16px */
  border-radius: var(--sbx-radius-sm);
}
/* Mobile Filter toggle button */
button.openbtn.visible-xs {
  background:    var(--sbx-primary);
  color:         var(--sbx-text-on-primary);
  border:        none;
  border-radius: var(--sbx-radius-sm);
  padding:       8px 16px;
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  cursor:        pointer;
  transition:    background-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
button.openbtn.visible-xs:hover {
  background: var(--sbx-primary-dark);
}

/* ── Phase 13: Events — RSVP Ticket Table (A) + Attendee Form (D) ─────────── */
/*                                                                               */
/* Phase A: RSVP-specific ticket table columns, quantity select, access code    */
/* Phase D: Attendee form well, RSVP section spacing, P2P section, subevent DT */
/*                                                                               */
/* Selectors covered:                                                            */
/*   th/td.ticketQty      — RSVP quantity column                                */
/*   th/td.ticketTotal    — RSVP running total column                           */
/*   td.ticketStarts      — optional Starts column (mirrors Deadline)           */
/*   select.ticNumIn      — quantity dropdown (iOS-safe font-size)              */
/*   td.ticketPrice spans — original / discount price spans                     */
/*   .foot-accesscode     — access code input row + success notice              */
/*   .well.well-form       — attendee info expansion well                        */
/*   .table-inwell         — inner attendee form layout table                   */
/*   .attendeeinfo-list    — attendee field list                                */
/*   .row-actions          — attendee header (name + action buttons)            */
/*   .cart-ticket-attendee — cart attendee name / details                       */
/*   #sectP2P-wrap         — P2P opt-in section spacing                        */
/*   .compSect-wrap-subevent dl dt + dt — date/time secondary line             */
/* ============================================================================= */

/* ── Phase A: RSVP Ticket Table ─────────────────────────────────────────────── */

/* -- Qty column -------------------------------------------------------------- */
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketQty {
  width:      72px;
  text-align: center;
}
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketQty {
  width:          72px;
  text-align:     center;
  vertical-align: middle;
}

/* -- Quantity select --------------------------------------------------------- */
/* font-size: var(--sbx-font-size-input) = 1rem (16px) — iOS zoom floor rule   */
.com_sbxEvents select.ticNumIn {
  height:        var(--sbx-btn-height-sm);
  min-width:     60px;
  width:         auto;
  padding:       0 var(--sbx-space-sm);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-sm);
  font-size:     var(--sbx-font-size-input);
  color:         var(--sbx-text-body);
  background:    var(--sbx-surface);
  cursor:        pointer;
  transition:    border-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                 box-shadow   var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_sbxEvents select.ticNumIn:focus {
  outline:      none;
  border-color: var(--sbx-primary);
  box-shadow:   var(--sbx-shadow-focus);
}

/* -- Total column ----------------------------------------------------------- */
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketTotal {
  text-align:           right;
  font-variant-numeric: tabular-nums;
}
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketTotal {
  text-align:           right;
  font-variant-numeric: tabular-nums;
  font-size:            var(--sbx-font-size-base); /* 16px — normalized to match ticket name and price */
  font-weight:          700;
  color:                var(--sbx-text-heading);
  white-space:          nowrap;
}

/* -- Starts column (optional; mirrors ticketDeadline) ----------------------- */
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketStarts {
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-xs);
  white-space: nowrap;
}

/* -- Price column: original / discount span hierarchy ----------------------- */
/* display:block ensures original and discount stack vertically when both shown */
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketPrice span.original,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketTotal  span.original {
  display: block;
}
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketPrice span.discount,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketTotal  span.discount {
  display:     block;
  color:       var(--sbx-primary);
  font-size:   var(--sbx-font-size-xs);
  font-weight: 600;
}

/* -- Access code form ------------------------------------------------------- */
.com_sbxEvents .foot-accesscode {
  margin-bottom: var(--sbx-space-md);
}
.com_sbxEvents .foot-accesscode .form-inline.form-accesscode {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
  flex-wrap:   wrap;
}
/* iOS zoom floor: font-size ≥ 1rem */
#access_code {
  height:        var(--sbx-btn-height-sm);
  padding:       0 var(--sbx-space-sm);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-sm);
  font-size:     var(--sbx-font-size-input);
  color:         var(--sbx-text-body);
  background:    var(--sbx-surface);
  transition:    border-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                 box-shadow   var(--sbx-motion-fast) var(--sbx-motion-ease);
}
#access_code:focus {
  outline:      none;
  border-color: var(--sbx-primary);
  box-shadow:   var(--sbx-shadow-focus);
}
#btnApplyAccessCode {
  height:        var(--sbx-btn-height-sm);
  padding:       0 var(--sbx-space-md);
  background:    transparent;
  color:         var(--sbx-primary);
  border:        1.5px solid var(--sbx-primary);
  border-radius: var(--sbx-radius-sm);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  cursor:        pointer;
  white-space:   nowrap;
  transition:    background-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                 color            var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color     var(--sbx-motion-fast) var(--sbx-motion-ease);
}
#btnApplyAccessCode:hover {
  background:   var(--sbx-primary-pale);
  color:        var(--sbx-primary-dark);
  border-color: var(--sbx-primary-dark);
}
#btnApplyAccessCode:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}
#access-code-notice-block {
  margin-top: var(--sbx-space-sm);
  font-size:  var(--sbx-font-size-sm);
}
.com_sbxEvents .accesscode-code {
  color:       var(--sbx-success);
  font-weight: 600;
  margin:      0 0 var(--sbx-space-xs);
}
.com_sbxEvents .accesscode-remove a.remove-accesscode-link {
  color:     var(--sbx-error);
  font-size: var(--sbx-font-size-xs);
}

/* ── Phase D: Attendee Form + Section Spacing ──────────────────────────────── */

/* -- Attendee info expansion well ------------------------------------------ */
/* tr.tr-secondary > td > .well.well-form                                       */
.com_sbxEvents .well.well-form {
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  box-shadow:    none;
  padding:       var(--sbx-space-md);
  margin:        var(--sbx-space-xs) 0 var(--sbx-space-sm);
}

/* Inner attendee form table — structural only; stripped of data-table styling */
.com_sbxEvents .table-inwell {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-sm);
}
.com_sbxEvents .table-inwell td {
  padding:        var(--sbx-space-xs) 0;
  border:         none;
  vertical-align: top;
}

/* Attendee field list */
.com_sbxEvents ul.attendeeinfo-list.compList {
  list-style: none;
  padding:    0;
  margin:     0;
}
.com_sbxEvents ul.attendeeinfo-list.compList li {
  margin-bottom: var(--sbx-space-sm);
}

/* Attendee header row: "Attendee #N" label + Remove / Copy buttons */
.com_sbxEvents .row-actions.btn-toolbar {
  display:        flex;
  align-items:    center;
  gap:            var(--sbx-space-sm);
  flex-wrap:      wrap;
  margin-bottom:  var(--sbx-space-sm);
  padding-bottom: var(--sbx-space-xs);
  border-bottom:  1px solid var(--sbx-border-subtle);
}
.com_sbxEvents .row-actions .title {
  font-weight: 600;
  color:       var(--sbx-text-heading);
  font-size:   var(--sbx-font-size-sm);
  flex-grow:   1;
}

/* -- Cart attendee names ---------------------------------------------------- */
.com_sbxEvents .cart-ticket-attendee-name {
  font-weight:   600;
  color:         var(--sbx-text-heading);
  font-size:     var(--sbx-font-size-sm);
  margin-bottom: 2px;
}
.com_sbxEvents .cart-ticket-attendee-details {
  color:     var(--sbx-text-muted);
  font-size: var(--sbx-font-size-xs);
}

/* -- P2P opt-in section ---------------------------------------------------- */
/* Mirror .sbxEvents-event .compSect-wrap for consistent section rhythm         */
#sectP2P-wrap.compSectP2P-wrap {
  margin-bottom:  var(--sbx-space-xl);
  padding-bottom: var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
}
#sectP2P-content.compSectP2P-content {
  padding: var(--sbx-space-xs) 0;
}

/* -- Subevent DL: date/time secondary line ---------------------------------- */
/* dt:first-child = event title (bold/heading from base block is correct)       */
/* dt + dt        = date/time line — secondary treatment                        */
.com_sbxEvents .compSect-wrap-subevent dl dt + dt {
  font-size:   var(--sbx-font-size-xs);
  color:       var(--sbx-text-muted);
  font-weight: 400;
  margin-top:  2px;
}


/* ── Phase 14: Events Detail + RSVP Refinement ──────────────────────────── */
/*                                                                             */
/* Scope: .sbxEvents-event (detail), .com_sbxEvents (RSVP + all Events pages) */
/*                                                                             */
/* Changes:                                                                    */
/*   .compSect-title     — remove 2px primary underline; spacing-first         */
/*   #sectWhenWhere-grid — float → flex; gap layout                            */
/*   #sectWhen/Where-wrap — card treatment (surface-alt, border, radius)       */
/*   #sectWhere-content  — map border, venue/address typography                */
/*   #btnManageMyTickets — secondary button aligned to #btnRegister height     */
/*   table.tickets-tbl   — table-layout: fixed to prevent column overflow      */
/*   .compResTbl-content — overflow-x: auto safety net                         */
/* ─────────────────────────────────────────────────────────────────────────── */

/* -- Section titles: remove heavy primary underline ----------------------- */
/* Override .sbx .compSect-title { border-bottom: 2px solid primary }.        */
/* Events and RSVP use spacing rhythm between title and content instead.      */
.sbxEvents-event .compSect-title,
.com_sbxEvents .compSect-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: var(--sbx-space-sm);
}

/* -- When/Where grid: float → flex ---------------------------------------- */
/* .compSectGrid-col.width50 uses float: left/right (Bootstrap clearfix).     */
/* Overriding float with flex eliminates the clearfix pattern and enables     */
/* equal-height cards without extra markup.                                   */
#sectWhenWhere-grid {
  display:       flex;
  gap:           var(--sbx-space-md);
  margin-bottom: var(--sbx-space-xl);
}
#sectWhenWhere-grid .compSectGrid-col {
  flex:  1;
  float: none;
  width: auto;
}
#sectWhenWhere-grid .compSectGrid-content {
  height: 100%;
}

/* -- When + Where: card treatment ------------------------------------------ */
/* ID selectors (0,1,0,0 = 100pts) override .sbxEvents-event .compSect-wrap   */
/* (0,0,2,0 = 20pts) — no !important needed.                                  */
#sectWhen-wrap,
#sectWhere-wrap {
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-md);
  margin:        0;
  height:        100%;
  box-sizing:    border-box;
}

/* -- Where: map thumbnail, venue name, address ----------------------------- */
/* .googleMap.border has an inline dark border from system CSS.               */
.sbxEvents-event .googleMap.border {
  border:        1px solid var(--sbx-border-color) !important;
  border-radius: var(--sbx-radius-sm);
  overflow:      hidden;
  margin-right:  var(--sbx-space-sm);
  margin-bottom: var(--sbx-space-xs);
}
#sectWhere-content h4.title {
  font-size:   var(--sbx-font-size-lg);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0;
}
#sectWhere-content p.address {
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-muted);
  line-height:   1.6;
  margin-bottom: var(--sbx-space-xs);
}
#sectWhere-content p.directions {
  font-size:  var(--sbx-font-size-xs);
  margin-top: var(--sbx-space-xs);
}

/* -- When/Where: mobile stack --------------------------------------------- */
@media (max-width: 767px) {
  #sectWhenWhere-grid {
    flex-direction: column;
    gap:            var(--sbx-space-sm);
  }
}

/* -- Manage My Tickets: secondary button ----------------------------------- */
/* Aligns height + radius with #btnRegister (primary). Outline style creates  */
/* clear visual hierarchy: primary CTA (filled) vs secondary (outlined).      */
/* Browser default: height 33px, padding 3px 7px, grey bg, 2px outset border */
#btnManageMyTickets {
  -webkit-appearance: none;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-height:      var(--sbx-btn-height);
  padding:         var(--sbx-btn-padding);
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     600;
  white-space:     nowrap;
  cursor:          pointer;
  transition:      background  var(--sbx-motion-fast) var(--sbx-motion-ease),
                   color       var(--sbx-motion-fast) var(--sbx-motion-ease),
                   border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
#btnManageMyTickets:hover {
  background:   var(--sbx-primary-pale);
  color:        var(--sbx-primary-dark);
  border-color: var(--sbx-primary-dark);
}
#btnManageMyTickets:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

/* -- When/Where cards: section heading as compact label ------------------- */
/* Override .sbx .compSect-title h3 (20px/600/heading) only inside the two   */
/* info cards so "When" / "Where" read as metadata labels, not page headings. */
/* ID selectors (0,1,0,1 = 101pts) beat the shared rule (0,0,2,1 = 21pts).   */
#sectWhen-wrap .compSect-title h3,
#sectWhere-wrap .compSect-title h3 {
  font-size:      var(--sbx-font-size-xs);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color:          var(--sbx-text-muted);
}

/* -- Ticket table: contain within parent width ----------------------------- */
/* table-layout: fixed pins the table to 100% of its container and respects   */
/* declared column widths. ticketType (width: auto, overrides width100 class) */
/* absorbs remaining space; other columns have proportional or fixed widths.  */
/*                                                                             */
/* Admin-hidden column strategy:                                               */
/*   - ticketType / ticketPrice / ticketQty / ticketTotal: always present;    */
/*     px widths are reliable.                                                 */
/*   - ticketStart / ticketStarts / ticketDeadline / ticketRemaining:         */
/*     admin-configurable (may be hidden or absent). Use 10% so the column    */
/*     sizes proportionally from the table width regardless of which subset   */
/*     is present. At 842px container, 10% ≈ 84px per column.                */
/*   Limit: if admin adds a column class we have no rule for, it will auto-   */
/*   share remaining space with ticketType — acceptable degradation.          */
.com_sbxEvents table.resultsTBL.tickets-tbl {
  table-layout: fixed;
}
.com_sbxEvents table.resultsTBL.tickets-tbl th {
  overflow: hidden; /* prevents long header labels from inflating row scrollWidth */
}
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketType,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketType {
  width: auto; /* overrides width100 class's width:100% */
}
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketStart,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketStart,
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketStarts,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketStarts,
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketDeadline,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketDeadline {
  width:       10%;
  white-space: normal;  /* noWrap class forces nowrap; override so dates wrap within cell */
  overflow:    hidden;
}
/* ticketRemaining is wider than date columns — "REMAINING" in uppercase canonical
 * heading style needs more horizontal space than 10% (84px) provides.
 * 13% ≈ 109px. With reduced heading padding (8px total), text space = 101px > ~77px needed. */
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketRemaining,
.com_sbxEvents table.resultsTBL.tickets-tbl td.ticketRemaining {
  width:       13%;
  white-space: normal;
  overflow:    hidden;
}
/* Specificity (0,4,3) — beats canonical thead th (0,3,3) which sets white-space:nowrap.
 * Reduced horizontal padding + explicit wrap ensures "REMAINING" fits one line
 * without clipping; overflow-wrap catches viewport edge cases. */
.com_sbxEvents table.resultsTBL.tickets-tbl thead th.ticketRemaining {
  white-space:   normal;
  overflow-wrap: break-word;
  padding-left:  var(--sbx-space-xs);
  padding-right: var(--sbx-space-xs);
}
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketPrice {
  width: 105px;
}
.com_sbxEvents table.resultsTBL.tickets-tbl th.ticketTotal {
  width: 90px;
}
/* overflow: hidden clips residual cell-level content overflow without showing */
/* scrollbars. The table fits its container via table-layout: fixed; no actual */
/* scroll is needed. (overflow-x: auto forces overflow-y: auto per CSS spec,  */
/* causing both H + V scrollbars when cell content overflows cell bounds.)    */
.com_sbxEvents .compResTbl-content {
  overflow: hidden;
}
/* At ≤767px, Phase 11 sets table { display:block; overflow-x:auto }, making  */
/* the table its own scroll container. overflow:hidden on the wrapper clips   */
/* that scroll — restore visible so the table's mobile scroll works.          */
@media (max-width: 767px) {
  .com_sbxEvents .compResTbl-content {
    overflow: visible;
  }
}


/* -- RSVP confirmation: "Return to Event Details" + P2P + PayPal buttons ------
 * rsvp_confirm.php emits button.button[type="button"] — NOT [type="submit"],
 * so the Phase 3 primary button rules don't match. These are secondary/return
 * actions; styled as outlined secondary to match a.readon visual weight.
 * Scope: .eventScsMsg (the success-message wrapper on the confirmation view). */
.com_sbxEvents .eventScsMsg li.buttons button.button {
  -webkit-appearance: none;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-btn-padding-sm);
  min-height:      var(--sbx-btn-height-sm);
  background:      transparent;
  border:          2px solid var(--sbx-accent);
  border-radius:   var(--sbx-radius-btn);
  color:           var(--sbx-accent);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  white-space:     nowrap;
  cursor:          pointer;
  transition:      background   var(--sbx-transition),
                   color        var(--sbx-transition),
                   border-color var(--sbx-transition);
}
.com_sbxEvents .eventScsMsg li.buttons button.button:hover {
  background: var(--sbx-accent);
  color:      var(--sbx-text-on-primary);
}
.com_sbxEvents .eventScsMsg li.buttons button.button:focus {
  outline:    none;
  box-shadow: 0 0 0 3px rgba(var(--sbx-accent-rgb), 0.25);
}
.com_sbxEvents .eventScsMsg li.buttons button.button:active {
  opacity:   0.9;
  transform: translateY(1px);
}

/* ── Phase 15: Events Detail + RSVP Refinement (cont.) ────────────────────── */
/*                                                                               */
/* 1. Where venue name: 18px/700 to match When date text                         */
/* 2. Where address/phone: muted color to match When time text                   */
/* 3+4. Events label.desc / descLrg: !important override to beat Bootstrap       */
/*      cascade inflation (ul.compList li label.desc = 19px vs desired 14px)     */
/* 5. Section description: muted small text, consistent with Donations desc       */
/* 8. Hide detail nav bar (logged-in only; rendered as empty chrome for guests)  */
/* 9. Billing section dividers: replace dotted Bootstrap border with solid token */
/* 10. Payment card bottom-padding: symmetric to match Donations cards           */
/* 6. Attendee toggle button well: full-width container                          */
/* 7. Payment Method cards: card-panel style matching Donations sbxPayType        */
/* ============================================================================= */

/* -- label.desc Bootstrap cascade fix ----------------------------------------
 * Bootstrap's ul.compList li label.desc (0,2,3 specificity) inflates all
 * Events form field-group labels from 13px to ~19px. Mirror the Donations fix.
 */
.com_sbxEvents label.desc {
  font-size:      var(--sbx-font-size-sm) !important;
  font-weight:    600 !important;
  color:          var(--sbx-text-heading);
  letter-spacing: 0.04em;
}

.com_sbxEvents label.descLrg {
  font-size:   var(--sbx-font-size-sm) !important;
  font-weight: 700 !important;
  color:       var(--sbx-text-heading);
}

/* -- Section description (eventDesc-intro) ---------------------------------- */
/* #descIntro-content.compDesc-content — configurable intro text above form.   */
/* Bootstrap cascade inflates it to ~19px; normalize + use muted treatment.    */
.com_sbxEvents .compDesc-content {
  font-size:   var(--sbx-font-size-sm) !important;
  font-weight: 400;
  color:       var(--sbx-text-muted);
  line-height: 1.55;
}

/* -- Attendee toggle button well: ensure full-width button container ---------- */
/* tr.btn-edit-attendee > td > .well.well-table > .well-actions               */
.com_sbxEvents .well.well-table {
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-sm) var(--sbx-space-md);
}
.com_sbxEvents .well.well-table .well-actions {
  width: 100%;
}
.com_sbxEvents .well.well-table .well-actions .btn {
  width: 100%;
}

/* -- Hide events detail nav bar -----------------------------------------------
 * Intentionally global: these IDs are Events-specific and absent from the DOM
 * for logged-out users, so the rule is a no-op in all other contexts. If that
 * assumption changes, narrow the selector to .sbxEvents-event or .com_sbxEvents.
 */
#eventsDetailNavBar-wrap,
#eventsDetailNavBar-content {
  display: none;
}

/* -- Billing section dividers: solid design-system border (Fix 2b) ----------- */
/* Bootstrap's .border-top class outputs 1px dotted rgb(44,44,44). Mirror the   */
/* .donations li.complex.border-top pattern to get solid --sbx-border-color.    */
.com_sbxEvents li.complex.border-top {
  padding-top: var(--sbx-space-lg);
  margin-top:  var(--sbx-space-md);
  border-top:  1px solid var(--sbx-border-color);
}

/* -- Payment Method cards (Events RSVP): card-panel style ────────────────────
 * Mirrors .donations .sbxPayType rules. Events uses div.sbxPayType inside
 * #sectPT; radio name is CREDITCARDTYPE (not pay-method class).
 */
.com_sbxEvents .sbxPayType {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--sbx-space-sm);
  padding:   var(--sbx-space-sm) 0;
}

.com_sbxEvents .sbxPayType .span-block {
  position:       relative;
  display:        flex;     /* no !important — JS style="display:none" must win for hidden tiles */
  flex-direction: column;
  align-items:    center;
  gap:            var(--sbx-space-xs);
  padding:        var(--sbx-space-sm) var(--sbx-space-md) !important;
  background:     var(--sbx-surface-muted);
  border:         1.5px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-input);
  cursor:         pointer;
  transition:     border-color var(--sbx-transition),
                  background   var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
}

.com_sbxEvents .sbxPayType .span-block:focus-within {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

@supports selector(:has(*)) {
  /* Hide radio circle — CC logo label is the visible click target */
  .com_sbxEvents .sbxPayType input[name="CREDITCARDTYPE"] {
    position: absolute;
    opacity:  0;
    width:    0;
    height:   0;
    overflow: hidden;
    margin:   0;
  }

  .com_sbxEvents .sbxPayType .span-block label.choice {
    cursor: pointer;
  }

  .com_sbxEvents .sbxPayType .span-block:has(input:checked) {
    border-color: var(--sbx-primary);
    background:   var(--sbx-primary-pale);
    box-shadow:   0 0 0 2px rgba(var(--sbx-primary-rgb), 0.15);
  }
}

/* -- CVC card diagram: hide decorative image --------------------------------
 * Events renders cvc.png directly in span.span-block.right (no #cc-cvc ID).
 * Donations hides via .donations #cc-cvc img; this rule covers Events.
 */
.com_sbxEvents img[src$="cvc.png"] {
  display: none;
}

/* -- SF Lookup: field + button on same inline row (mirrors v107 Forms fix) --
 * Events custom attendee fields can include Salesforce lookup fields rendered
 * as span.btn > a.modal. Bootstrap .btn gives the span unwanted gradient +
 * padding. Neutralize it and style a.modal as a canonical secondary button.
 */
.com_sbxEvents .cntr:has(span.btn) {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
}
.com_sbxEvents .cntr:has(span.btn) input.field {
  flex: 1;
}
.com_sbxEvents .cntr span.btn {
  flex:             0 0 auto;
  display:          inline-flex;
  align-items:      center;
  padding:          0;
  background:       transparent !important;
  background-image: none !important;
  border:           none !important;
  box-shadow:       none !important;
  height:           auto;
  line-height:      1;
}
.com_sbxEvents .cntr span.btn a {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  height:          var(--sbx-input-height);
  padding:         0 var(--sbx-space-md);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     600;
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  text-decoration: none;
  white-space:     nowrap;
  transition:      background   var(--sbx-motion-fast) var(--sbx-motion-ease),
                   color        var(--sbx-motion-fast) var(--sbx-motion-ease),
                   border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_sbxEvents .cntr span.btn a:hover {
  background:   var(--sbx-primary-pale);
  color:        var(--sbx-primary-dark);
  border-color: var(--sbx-primary-dark);
}
.com_sbxEvents .cntr span.btn a:focus-visible {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}
.com_sbxEvents .cntr span.btn a:active {
  background:   var(--sbx-primary);
  color:        var(--sbx-text-on-primary);
  border-color: var(--sbx-primary);
}

/* SF Lookup readonly display field — muted to distinguish from editable */
.com_sbxEvents input[readonly].field {
  background: var(--sbx-surface-alt);
  color:      var(--sbx-text-muted);
  cursor:     default;
}

/* -- Radio inline group (notStacked li) — beat Bootstrap's high-specificity
 * span rule (ul.compList li.notStacked div.cntr span.span-block = 0,4,4).
 * !important mirrors the approach used for .sbxPayType .span-block above.
 * Label margin reset beats Bootstrap's .span-block label.choice (0,2,1).
 */
.com_sbxEvents li.notStacked .cntr {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  align-items: center;
}
.com_sbxEvents li.notStacked .span-block {
  display:     inline-flex !important;
  align-items: center;
  gap:         var(--sbx-space-xs);
  width:       auto !important;
}
.com_sbxEvents li.notStacked .span-block label.choice {
  margin:         0 !important;
  width:          auto !important;
  padding-bottom: 0;
}

/* -- Date/datetime field: flex layout so calendar icon is clickable ---------
 * Mirrors the .com_jsfsubmit li:has(img.calendar) fix (v107).
 * DOM: li > label.desc + span.span-block:has(input) + span.span-block:has(img)
 */
.com_sbxEvents li:has(img.calendar) {
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
}
.com_sbxEvents li:has(img.calendar) > label.desc {
  flex: 0 0 100%;
}
.com_sbxEvents li:has(img.calendar) > .span-block:has(input) {
  flex: 1;
}
.com_sbxEvents li:has(img.calendar) > .span-block:has(img) {
  flex:         0 0 auto;
  display:      flex;
  align-items:  center;
  padding-left: var(--sbx-space-xs);
}
.com_sbxEvents img.calendar {
  width:   20px;
  height:  20px;
  opacity: 0.5;
  cursor:  pointer;
}

/* -- Address sub-field labels (Street Address, City, State, Zip, Country) ---
 * Inside .cntr.address each span.span-block has input + plain <label>.
 * These labels appear below the input; style as small muted captions.
 */
.com_sbxEvents .cntr.address .span-block label {
  display:     block;
  font-size:   var(--sbx-font-size-xs);
  font-weight: 500;
  color:       var(--sbx-text-muted);
  margin-top:  2px;
}

/* ── Phase 15 (cont.) — Events Registration (RSVP) surface ─────────────────
 * Scope: .sbxEvents-eventReg (registration view), .com_sbxEvents (shared)
 * Added: v153, 2026-05-11
 * ───────────────────────────────────────────────────────────────────────── */

/* -- Meta-line date/time: match hosted-by font size -------------------------
 * .sbxEvents-eventReg has no meta-line-med rule (only sbxEvents-upc does).
 * Computed: meta-line-med=20.736px vs meta-line=17.28px.
 * Normalize both to --sbx-font-size-sm; date remains bolder via inner <strong>.
 */
.sbxEvents-eventReg .meta-line,
.sbxEvents-eventReg .meta-line-med {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
}

/* -- Attendee inwell: flush with ticket table width -------------------------
 * tr.attendee-ticket > td has padding-left/right:16px, making the nested
 * table.table-inwell 32px narrower (810px) than the 842px ticket table.
 * Removing lateral padding eliminates the right-side gap.
 */
.com_sbxEvents tr.attendee-ticket > td {
  padding-left:  0 !important;
  padding-right: 0 !important;
}

/* -- Remove attendee button: plain destructive link -------------------------
 * button.remove-attendee.btn.btn-mini.btn-danger — suppress Bootstrap danger
 * styling; render as red underline hyperlink matching Shop cart Remove link.
 */
.com_sbxEvents button.remove-attendee {
  background:       transparent !important;
  background-image: none !important;
  border:           none !important;
  box-shadow:       none !important;
  text-shadow:      none !important;
  padding:          0;
  color:            var(--sbx-error) !important;
  font-size:        var(--sbx-font-size-sm);
  font-weight:      400;
  text-decoration:  underline;
  cursor:           pointer;
}

.com_sbxEvents button.remove-attendee:hover {
  background: transparent !important;
  opacity:    0.8;
}

.com_sbxEvents button.remove-attendee:focus-visible {
  outline:        2px solid var(--sbx-error);
  outline-offset: 2px;
  border-radius:  var(--sbx-radius-sm);
}

/* -- Copy Contact Info button: outlined secondary ---------------------------
 * button.copy-attendee.btn.btn-mini.btn-info — suppress Bootstrap info styling;
 * render as outlined-primary to match #btnManageMyTickets visual weight.
 */
.com_sbxEvents button.copy-attendee {
  -webkit-appearance: none;
  display:            inline-flex;
  align-items:        center;
  background:         transparent !important;
  background-image:   none !important;
  color:              var(--sbx-primary) !important;
  border:             1.5px solid var(--sbx-primary) !important;
  border-radius:      var(--sbx-radius-btn);
  box-shadow:         none !important;
  text-shadow:        none !important;
  padding:            4px 12px;
  font-family:        var(--sbx-font-ui);
  font-size:          var(--sbx-font-size-sm);
  font-weight:        600;
  cursor:             pointer;
  transition:         background   var(--sbx-motion-fast) var(--sbx-motion-ease),
                      color        var(--sbx-motion-fast) var(--sbx-motion-ease),
                      border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.com_sbxEvents button.copy-attendee:hover {
  background:   var(--sbx-primary-pale) !important;
  color:        var(--sbx-primary-dark) !important;
  border-color: var(--sbx-primary-dark) !important;
}

.com_sbxEvents button.copy-attendee:focus-visible {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

/* -- Attendee info: Salesforce checkbox → slider toggle ----------------------
 * Scope: .attendeeinfo-list — targets only attendee SF custom checkbox fields,
 * not the radio inline groups elsewhere in li.notStacked.
 *
 * DOM: li.notStacked > div.cntr > span.span-block > input[type="checkbox"]
 *                                                  + label.choice.desc
 *
 * for/id mismatch: PHP emits label for="...SeSbx_Checkbox__c" but input
 * id="...SeSbx_Checkbox__c_true" (_true suffix). Label-click fix handled by
 * fixAttendeeCheckboxToggle in index.php. Uses event delegation so dynamically-
 * inserted attendee rows are covered without a MutationObserver.
 *
 * span-block override: .com_sbxEvents li.notStacked .span-block sets
 * display:inline-flex; width:auto — overridden here to flex; width:100% so the
 * slider label spans the full cntr width.
 */
.com_sbxEvents .attendeeinfo-list li.notStacked .span-block:has(input[type="checkbox"].field.checkbox) {
  display: flex !important;
  width:   100% !important;
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox {
  position: absolute;
  opacity:  0;
  width:    1px;
  height:   1px;
  margin:   0;
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox:focus {
  outline:    none;
  box-shadow: none;
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox + label.choice {
  position:     relative;
  display:      flex;
  align-items:  center;
  padding-left: 52px;
  min-height:   26px;
  margin:       0 !important;
  cursor:       pointer;
  user-select:  none;
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox + label.choice::before {
  content:       '';
  position:      absolute;
  left:          0;
  top:           50%;
  transform:     translateY(-50%);
  width:         40px;
  height:        24px;
  border-radius: 12px;
  background:    var(--sbx-surface-control);
  border:        1.5px solid var(--sbx-border-strong);
  transition:    background   var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0, 0, 0, 0.15);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox:checked + label.choice::before {
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary-dark);
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox:checked + label.choice::after {
  left: 19px;
}
.com_sbxEvents .attendeeinfo-list li.notStacked input[type="checkbox"].field.checkbox:focus-visible + label.choice::before {
  box-shadow: var(--sbx-shadow-focus);
}

/* -- Fade: remove-attendee row ---------------------------------------------- */
.com_sbxEvents tr.attendee-ticket.sbx-attendee-removing {
  transition: opacity 0.7s ease !important;
  opacity:    0 !important;
}

/* -- Required text: move below submit button --------------------------------
 * .sbx .compList-btns is a flex row; required text sits beside the button.
 * Mirrors .donations .compList-btns li.requiredtext pattern (line ~1912).
 */
.sbxEvents-eventReg .compList-btns li.requiredtext {
  order:      2;
  flex-basis: 100%;
}

/* ========================================================================== */
/* PHASE 15 — PART D: CLASS DETAIL VIEW REFINEMENTS                           */
/* Scope: .sbxEvents-eventLayDefault (class-type event detail layout)         */
/* Added: v163, 2026-05-12                                                    */
/*                                                                            */
/* Selectors covered:                                                         */
/*   span.badge.sectRepeatDates-days — day-of-week pills                      */
/*   div.buttonheading + span.class-code — class ID badge                     */
/*   ul.sectInstructors / li.sectInstructors-content — instructor avatar row  */
/*   img.instructor-image / span.instructor-name                              */
/*   a.btn.btnStatus — status pill                                            */
/*   button.btn.btnEnroll — Enroll CTA button                                 */
/*   .compSect-wrap.eventRegistration — spacing before Event Details          */
/*   .compSect-wrap.eventDetails — spacing before Class Details               */
/*   #sectClassDetails-contentwrap h4.title — Who Enrolls / Semester labels   */
/*   #sectClassDetails-contentwrap .ccbmenu li — subsection body text         */
/* ========================================================================== */

/* -- Day-of-week pills: styled to match template pill/tag pattern ---------- */
/*
 * span.badge.sectRepeatDates-days has Bootstrap badge defaults: grey bg,
 * 0px radius, 10px font. Override to a rounded pill with muted label style.
 */
.sbxEvents-eventLayDefault .badge.sectRepeatDates-days {
  display:        inline-flex;
  align-items:    center;
  padding:        2px 8px;
  font-size:      var(--sbx-font-size-xs);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  border:         1px solid var(--sbx-border-color);
  border-radius:  100px;
  line-height:    1.4;
  margin-right:   var(--sbx-space-xs);
}

.sbxEvents-eventLayDefault .sectRepeatDates-range {
  padding-top: 6px;
}

/* -- When section: tighten spacing between repeated span.time blocks -------- */
/* Phase 14 sets margin-top:--sbx-space-xs (8px); reduce for the class view   */
.sbxEvents-eventLayDefault .datestart .time {
  margin-top: 3px;
}

/* -- Class code: code badge aligned with day-of-week pills ----------------- */
/*
 * PHP emits: .article-title > .buttonheading > { btnEmail, btnPrint,
 * div.clearfix, span.class-code }. The day pills and date range are SIBLINGS
 * of .article-title (outside the float). To align class-code with the day pills
 * row, we pull it out of the buttonheading flex flow via position:absolute and
 * anchor it to .article-title at top:100% (the exact y where the day pills
 * start in normal flow) and right:0.
 *
 * The clearfix div stays hidden; buttonheading shrinks to email+print row only.
 */
/* -- Course image (class detail h2 header) --------------------------------- */
.sbxEvents-eventLayDefault h2.contentheading img.course-image {
  width:         80px;
  height:        80px !important;   /* beat soapbox-responsive-bootstrap height:auto !important */
  object-fit:    cover;
  border-radius: var(--sbx-radius-sm);
  border:        1px solid var(--sbx-border-subtle);
  float:         left;
  margin-right:  var(--sbx-space-sm);
  margin-bottom: var(--sbx-space-xs);
  flex-shrink:   0;
}

.sbxEvents-eventLayDefault .article-title {
  position: relative;   /* positioning context for span.class-code */
}

.sbxEvents-eventLayDefault .buttonheading {
  display:         flex;
  justify-content: flex-end;
  align-items:     center;
  gap:             var(--sbx-space-xs);
  float:           right;
}

.sbxEvents-eventLayDefault .buttonheading .clearfix {
  display: none;
}

.sbxEvents-eventLayDefault span.class-code {
  position:       absolute;
  top:            180%;
  right:          0;
  display:        inline-block;
  font-size:      var(--sbx-font-size-xs);
  font-weight:    600;
  font-family:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  color:          var(--sbx-text-muted);
  background:     var(--sbx-surface-alt);
  border:         1px solid var(--sbx-border-color);
  border-radius:  var(--sbx-radius-sm);
  padding:        2px 6px;
  letter-spacing: 0.04em;
  white-space:    nowrap;
}

/* -- Instructor list: avatar row layout ------------------------------------ */
/*
 * ul.sectInstructors / li.sectInstructors-content: component sets display:
 * list-item with 30px padding-left (legacy bullet indent) and no list marker.
 * img.instructor-image renders at full original size (640×640px).
 * Restyle as a horizontal avatar + name row.
 */
.sbxEvents-eventLayDefault ul.sectInstructors {
  list-style: none;
  padding:    0;
  margin:     var(--sbx-space-sm) 0 var(--sbx-space-xs);
  display:    flex;
  flex-direction: column;
  gap:        var(--sbx-space-xs);
}

/* Hide the <br> PHP emits between the instructor list and the status/enroll row */
.sbxEvents-eventLayDefault ul.sectInstructors + br {
  display: none;
}

.sbxEvents-eventLayDefault li.sectInstructors-content {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
  padding:     0;
  list-style:  none;
}

.sbxEvents-eventLayDefault img.instructor-image {
  width:         40px;
  height:        40px;
  border-radius: 50%;
  object-fit:    cover;
  flex-shrink:   0;
  border:        1.5px solid var(--sbx-border-color);
}

.sbxEvents-eventLayDefault span.instructor-name {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 500;
  color:       var(--sbx-text-body);
  line-height: 1.4;
}

/* -- Status: pill/badge rather than Bootstrap button ----------------------- */
/*
 * a.btn.btnStatus renders with Bootstrap .btn defaults (grey bg, 4px radius).
 * Restyle as a small informational pill — pointer-events:none since it is
 * a read-only status indicator, not a link.
 */
.sbxEvents-eventLayDefault a.btn.btnStatus {
  display:         inline-flex;
  align-items:     center;
  padding:         3px 10px;
  font-size:       var(--sbx-font-size-xs);
  font-weight:     600;
  text-transform:  uppercase;
  letter-spacing:  0.05em;
  background:      var(--sbx-primary-pale);
  color:           var(--sbx-primary-dark);
  border:          1px solid var(--sbx-primary);
  border-radius:   100px;
  text-decoration: none;
  white-space:     nowrap;
  pointer-events:  none;
  box-shadow:      none;
  line-height:     1.4;
}

/* -- Enroll button: primary filled CTA ------------------------------------- */
/*
 * button.btn.btnEnroll uses Bootstrap .btn (grey, 4px radius). Apply the same
 * primary filled style as #btnRegister / button.noMrg.
 */
.sbxEvents-eventLayDefault button.btn.btnEnroll {
  display: none;
}

/* -- Spacing: reduce gap between Event Registration and Event Details ------- */
/*
 * .sbxEvents-event .compSect-wrap { margin-bottom: --sbx-space-xl } (Phase 14)
 * creates excessive whitespace between the Register to Attend button (bottom of
 * eventRegistration) and the Event Details heading. Tighten for class views.
 */
.sbxEvents-eventLayDefault .compSect-wrap.eventRegistration {
  margin-bottom:  var(--sbx-space-md);
  padding-bottom: var(--sbx-space-xs);
}

/* -- Spacing: reduce gap between Event Details and Class Details ------------ */
/*
 * Similarly, the eventDetails section's margin-bottom creates excessive space
 * before the Class Details h3 that lives in .page-content.
 */
.sbxEvents-eventLayDefault .compSect-wrap.eventDetails {
  margin-bottom:  var(--sbx-space-md);
  padding-bottom: var(--sbx-space-xs);
}

/* -- Class Details sub-headings: uppercase label style --------------------- */
/*
 * h4.title inside #sectClassDetails-contentwrap renders at 23px/700/dark
 * (browser h4 cascade). Restyle as compact uppercase labels to match the
 * WHEN/WHERE label treatment and signal sub-section hierarchy.
 */
#sectClassDetails-contentwrap h4.title {
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color:          var(--sbx-text-muted);
  margin-bottom:  var(--sbx-space-xs);
  margin-top:     var(--sbx-space-md);
}

#sectClassDetails-contentwrap h4.title:first-child {
  margin-top: 0;
}

/* Sub-section body text: normalize from 19.2px cascade to base size */
#sectClassDetails-contentwrap .ccbmenu li,
#sectClassDetails-contentwrap p {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-body);
  line-height: 1.6;
  margin:      0;
}

#sectClassDetails-contentwrap .ccbmenu {
  list-style: none;
  padding:    0;
  margin:     0;
}


/* ╔══════════════════════════════════════════════════════════════════════════╗ */
/* ║  Phase 16: My Event Orders Modernization                                ║ */
/* ║  Scope: .eventsManage  (both list + detail order views of com_events)   ║ */
/* ╚══════════════════════════════════════════════════════════════════════════╝ */

/* -- Typography normalization: soapboxTypography inflates base to 1.2em ------ */
.eventsManage {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-body);
}

/* -- Page heading ------------------------------------------------------------ */
.eventsManage h1.componentheading {
  font-size:   var(--sbx-font-size-h1);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0 0 var(--sbx-space-md);
  line-height: 1.3;
}

/* -- Section intro / outro -------------------------------------------------- */
.eventsManage .section-intro,
.eventsManage .section-outro {
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-muted);
  margin-bottom: var(--sbx-space-md);
}

/* -- Results table wrapper: horizontal scroll guard ------------------------- */
/* Edit Ticket (ticketform layout) also uses .compResTbl-content to wrap the
   attendee fields + buttons. Scoping to :has(table.resultsTBL) prevents a
   card-in-card double border on that form view. */
.eventsManage .compResTbl-content:has(table.resultsTBL) {
  overflow:   hidden;
  overflow-x: auto;
}

/* -- Results table (orders list + order detail tickets) --------------------- */
.eventsManage table.resultsTBL {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-sm);
}

.eventsManage table.resultsTBL thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
  text-align:     left;
}

.eventsManage table.resultsTBL tbody td {
  padding:         var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:   1px solid var(--sbx-border-subtle);
  vertical-align:  middle;
  color:           var(--sbx-text-body);
  transition:      background var(--sbx-transition);
}

.eventsManage table.resultsTBL tbody tr:last-child td {
  border-bottom: none;
}

.eventsManage table.resultsTBL tbody tr:hover td {
  background: var(--sbx-surface-alt);
}

/* Remove Bootstrap zebra — hover state provides the scan aid instead */
.eventsManage table.resultsTBL tbody tr.row0,
.eventsManage table.resultsTBL tbody tr.row1 {
  background: transparent;
}

/* Keep action column on one line.
   PHP emits class="ticket->action" with a literal ">", which is not a valid
   CSS token in a class selector; target by position instead. */
.eventsManage table.resultsTBL thead th:last-child,
.eventsManage table.resultsTBL tbody td:last-child {
  white-space: nowrap;
}

/* "Missing Required Info" header is wider than its data values (Yes/No).
   Allow it to wrap so the column shrinks to data width, reducing total table width. */
.eventsManage table.resultsTBL thead th.ticket-missing {
  white-space: normal;
  min-width:   60px;
}

/* Stack action buttons vertically in the action column.
   display:flex (block-level) causes each button to occupy its own row;
   width:100% makes all three buttons equal width (fills the td content box).
   This reduces the action column from ~205px to ~90px, preventing table overflow
   at typical desktop content widths. */
.eventsManage table.resultsTBL td:last-child .view-btn,
.eventsManage table.resultsTBL td:last-child .edit-btn,
.eventsManage table.resultsTBL td:last-child .clipboard {
  display: flex;
  width:   100%;
  margin:  0 0 4px;
}
.eventsManage table.resultsTBL td:last-child .view-btn:last-child,
.eventsManage table.resultsTBL td:last-child .edit-btn:last-child,
.eventsManage table.resultsTBL td:last-child .clipboard:last-child {
  margin-bottom: 0;
}

/* -- Action buttons (View / Edit / Copy Link) -------------------------------- */
/* !important on color + text-decoration: "#content a:not(...)" at (0,5,0,1)
   would otherwise override these rules (our scope is only (0,2,0,1)).
   View = filled primary (highest weight); Edit = outlined primary; Copy Link = outlined secondary.
   Vertical stacking in td:last-child is handled by the rules further below. */

/* Shared structural properties — all three action buttons */
.eventsManage .view-btn,
.eventsManage .edit-btn,
.eventsManage .clipboard {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  height:          24px;
  padding:         0 var(--sbx-space-sm);
  border-radius:   var(--sbx-radius-sm);
  font-size:       var(--sbx-font-size-xs);
  font-weight:     600;
  text-decoration: none !important;
  white-space:     nowrap;
  margin:          0 2px;
  transition:      background var(--sbx-transition), color var(--sbx-transition),
                   border-color var(--sbx-transition);
}

/* View = filled primary */
.eventsManage .view-btn {
  background: var(--sbx-btn-primary-bg);
  color:      var(--sbx-btn-primary-text) !important;
  border:     none;
}
.eventsManage .view-btn:hover {
  background:      var(--sbx-primary-dark);
  color:           var(--sbx-btn-primary-text) !important;
  text-decoration: none !important;
}

/* Edit = outlined primary */
.eventsManage .edit-btn {
  background: transparent;
  color:      var(--sbx-primary) !important;
  border:     1.5px solid var(--sbx-primary);
}
.eventsManage .edit-btn:hover {
  background:      var(--sbx-primary-pale);
  color:           var(--sbx-primary-dark) !important;
  border-color:    var(--sbx-primary-dark);
  text-decoration: none !important;
}

/* Copy Link = outlined primary (canonical secondary: primary border + text) */
.eventsManage .clipboard {
  border:  1.5px solid var(--sbx-primary);
  color:   var(--sbx-primary) !important;
  cursor:  pointer;
}
.eventsManage .clipboard:hover {
  background:      var(--sbx-primary-pale);
  color:           var(--sbx-primary-dark) !important;
  border-color:    var(--sbx-primary-dark);
  text-decoration: none !important;
}

/* -- My Ticket: action section layout + unclassed Edit link ----------------- */
/* ticket.php renders the Edit link as a plain <a> with no class; match it by
   exclusion so .clipboard keeps its own styling. */
.eventsManage .actionSect {
  display:         flex;
  justify-content: flex-end;
  gap:             var(--sbx-space-xs);
  margin-bottom:   var(--sbx-space-md);
}

.eventsManage .actionSect a:not(.clipboard) {
  display:         inline-flex;
  align-items:     center;
  height:          24px;
  padding:         0 var(--sbx-space-sm);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-sm);
  font-size:       var(--sbx-font-size-xs);
  font-weight:     600;
  color:           var(--sbx-primary) !important;
  text-decoration: none !important;
  white-space:     nowrap;
  transition:      background var(--sbx-transition), color var(--sbx-transition),
                   border-color var(--sbx-transition);
}
.eventsManage .actionSect a:not(.clipboard):hover {
  background:      var(--sbx-primary-pale);
  color:           var(--sbx-primary-dark) !important;
  border-color:    var(--sbx-primary-dark);
  text-decoration: none !important;
}

/* -- Order detail: definition list (event + order metadata) ----------------- */
.eventsManage .definition-list {
  font-size:     var(--sbx-font-size-sm);
  margin:        0 0 var(--sbx-space-md);
}

.eventsManage .definition-list dt {
  display:        flex;
  align-items:    center;
  flex-basis:     28%;
  font-size:      var(--sbx-font-size-xs);
  font-weight:    700;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding:        var(--sbx-space-xs) 0;
  align-self:     flex-start;
}

.eventsManage .definition-list dd {
  display:     flex;
  align-items: center;
  flex-basis:  68%;
  color:       var(--sbx-text-body);
  font-weight: 400;
  padding:     var(--sbx-space-xs) 0 var(--sbx-space-xs) var(--sbx-space-md);
}

/* -- Stray anchor defense: DT labels must never inherit link styling --------- */
/* ticket.php has an unclosed <a> inside the first DD (Events app PHP bug);
   the browser may propagate the open anchor into subsequent DT elements.
   Labels are never links — reset any inherited link color/underline. */
.eventsManage .definition-list dt a {
  color:           inherit !important;
  text-decoration: none !important;
}

/* -- Two-column metadata row container -------------------------------------- */
.eventsManage .flex.flex-row {
  gap:           var(--sbx-space-xl);
  flex-wrap:     wrap;
  padding:       var(--sbx-space-md) 0;
  border-bottom: 1px solid var(--sbx-border-subtle);
  margin-bottom: var(--sbx-space-md);
}

/* -- Cancel order button ---------------------------------------------------- */
.eventsManage .btnCancelOrder {
  display:         inline-flex;
  align-items:     center;
  height:          var(--sbx-btn-height-sm);
  padding:         0 var(--sbx-space-md);
  background:      transparent;
  color:           var(--sbx-error);
  border:          1.5px solid var(--sbx-error);
  border-radius:   var(--sbx-radius-btn);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  cursor:          pointer;
  text-decoration: none;
  margin-top:      var(--sbx-space-sm);
  transition:      background var(--sbx-transition), color var(--sbx-transition),
                   border-color var(--sbx-transition);
}
.eventsManage .btnCancelOrder:hover {
  background:      var(--sbx-error-bg);
  color:           var(--sbx-error-text);
  border-color:    var(--sbx-error-text);
  text-decoration: none;
}

/* -- Edit Ticket form: Save (primary) + Cancel (secondary) buttons ---------- */
/* ticketform.php emits <button class="btn"> without btn-primary / btn-submit;
   Phase 3 primary rules don't fire. Target by ID — these are unique to this view.
   DOM order: Cancel then Save. order:-1 on #saveBtn moves it first visually.
   Left-aligned (flex-start) per account-management button convention. */
.eventsManage .buttons-config {
  display:         flex;
  justify-content: flex-start;
  gap:             var(--sbx-space-sm);
  margin-top:      var(--sbx-space-md);
}

.eventsManage #saveBtn {
  -webkit-appearance: none;
  order: -1;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  background:      var(--sbx-btn-primary-bg);
  color:           var(--sbx-btn-primary-text);
  border:          none;
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     700;
  padding:         var(--sbx-btn-padding-sm);
  min-height:      var(--sbx-btn-height-sm);
  cursor:          pointer;
  transition:      background var(--sbx-transition);
}
.eventsManage #saveBtn:hover {
  background: var(--sbx-primary-dark);
}

.eventsManage #cancelBtn {
  -webkit-appearance: none;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  background:      transparent;
  color:           var(--sbx-text-muted);
  border:          1.5px solid var(--sbx-border-color);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     600;
  padding:         var(--sbx-btn-padding-sm);
  min-height:      var(--sbx-btn-height-sm);
  cursor:          pointer;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition);
}
.eventsManage #cancelBtn:hover {
  background:   var(--sbx-surface-alt);
  border-color: var(--sbx-border-strong);
  color:        var(--sbx-text-body);
}

/* -- Edit Ticket: notStacked field groups (radio + checkbox) -----------------
 * The Edit Ticket view body does not carry .com_sbxEvents, so the Phase 15
 * notStacked fix (.com_sbxEvents li.notStacked...) does not fire here.
 * Scope these fixes under .eventsManage instead.
 * Bootstrap conflict: ul.compList li.notStacked div.cntr span.span-block (0,4,4). */
.eventsManage li.notStacked .cntr {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  align-items: center;
}

/* Radio option spans: side-by-side inline-flex; !important beats Bootstrap (0,4,4). */
.eventsManage li.notStacked .span-block:has(input[type="radio"]) {
  display:     inline-flex !important;
  align-items: center;
  gap:         var(--sbx-space-xs);
  width:       auto !important;
}
.eventsManage li.notStacked .span-block:has(input[type="radio"]) label.choice {
  margin:         0 !important;
  width:          auto !important;
  padding-bottom: 0;
}

/* Checkbox span: flex container so toggle label gets full row width. */
.eventsManage li.notStacked .span-block:has(input[type="checkbox"].field.checkbox) {
  display: flex !important;
  width:   100%;
}

/* Checkbox → slider toggle (mirrors .com_jsfsubmit pattern, Phase 12).
 * PHP emits label for="SeSbx_Checkbox__c" but input id="SeSbx_Checkbox__c_true" —
 * the for/id mismatch means label-click requires the JS label-click fix in index.php. */
.eventsManage li.notStacked input[type="checkbox"].field.checkbox {
  position: absolute;
  opacity:  0;
  width:    1px;
  height:   1px;
  margin:   0;
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox:focus {
  outline:    none;
  box-shadow: none;
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox + label.choice {
  position:     relative;
  display:      flex;
  align-items:  center;
  padding-left: 52px;
  min-height:   26px;
  margin:       0 !important;
  cursor:       pointer;
  user-select:  none;
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox + label.choice::before {
  content:       '';
  position:      absolute;
  left:          0;
  top:           50%;
  transform:     translateY(-50%);
  width:         40px;
  height:        24px;
  border-radius: 12px;
  background:    var(--sbx-surface-control);
  border:        1.5px solid var(--sbx-border-strong);
  transition:    background  var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0,0,0,0.15);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox:checked + label.choice::before {
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary-dark);
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox:checked + label.choice::after {
  left: 19px;
}
.eventsManage li.notStacked input[type="checkbox"].field.checkbox:focus-visible + label.choice::before {
  box-shadow: var(--sbx-shadow-focus);
}

/* -- Mobile ----------------------------------------------------------------- */
@media (max-width: 767px) {
  .eventsManage .flex.flex-row {
    flex-direction: column;
    gap:            0;
  }
  .eventsManage .definition-list {
    width: 100%;
  }
  .eventsManage .definition-list dt { flex-basis: 40%; }
  .eventsManage .definition-list dd { flex-basis: 58%; }
}


/* ========================================================================== */
/* 3. SHOP                                                                    */
/* Scope: table.store-cart / form.form-cart                                   */
/*                                                                             */
/* NOTE: The Shop cart page wrapper div genuinely renders with                */
/* class="com_sbxEvents sbxEvents-cart sbxEvents-cartLayDefault" (see         */
/* com_store/views/cart/tmpl/default.php:43). This is intentional -- the      */
/* Store component reuses the Events page-chrome classes. We avoid scoping    */
/* to .sbxEvents-cart here because it would be visually indistinguishable     */
/* from Events rules. Instead, use the unique Shop element selectors:         */
/*   table.store-cart  -- the cart table (unique to com_store)                 */
/*   form.form-cart    -- the cart form (unique to com_store)                  */
/* ========================================================================== */

/* -- Shop: order/cart confirmation — card + checkmark -------------------------
 * Both com_store confirmation views (default.php + cart.php) share #shopThankYou.
 * Neither template has a compScsMsg-wrap; #shopThankYou is the stable hook.
 * Mirrors .compScsMsg-wrap treatment (Phase 12 baseline) without a PHP edit.
 * #shopThankYou.section-thankyou — double-class specificity avoids any
 * future .section-thankyou global rule from winning by source order.
 */
#shopThankYou.section-thankyou {
  background:    var(--sbx-surface);
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-xl);
  margin-bottom: var(--sbx-space-xl);
}

#shopThankYou.section-thankyou::before {
  content:          '✓';
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            48px;
  height:           48px;
  border-radius:    50%;
  background:       var(--sbx-success);
  color:            white;
  font-size:        var(--sbx-font-size-lg);
  font-weight:      700;
  margin-bottom:    var(--sbx-space-md);
  flex-shrink:      0;
}

/* Cart intro paragraph: space below intro text before product table */
.sbxEvents-cart .page-content > p {
  margin-bottom: var(--sbx-space-lg);
}

/* -- Shop: cart table ----------------------------------------------------
 * table.store-cart.cart-table -- full-width product cart.
 * The cart has an inline <style> block setting .cart-table widths;
 * our template.css loads after that, so these rules win by source order.
 */
table.store-cart {
  border-collapse: collapse;
  width:           100%;
}

table.store-cart thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
  text-align:     left;
}

table.store-cart tbody td {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  vertical-align: middle;
}

table.store-cart .item-name {
  font-weight: 600;
  color:       var(--sbx-text-heading);
}

table.store-cart .cart-item-remove a.btn {
  font-size:       var(--sbx-font-size-xs);
  color:           var(--sbx-error);
  text-decoration: underline;
  background:      none;
  border:          none;
  padding:         0;
  margin-top:      var(--sbx-space-xs);
}

/*
 * Quantity select: keep at auto height (smaller than standard 48px).
 * The cart quantity selector is a narrow inline control; 48px would be
 * disproportionate next to the product row.
 * inline-block: Bootstrap sets display:block which ignores parent text-align:right.
 */
table.store-cart select.product-quantity {
  display:        inline-block;
  vertical-align: middle;
  height:         auto;
  min-height:     36px;
  width:          auto;
  min-width:      70px;
}

/*
 * Qty column static text (bare text node "1") inherits table body font-size
 * (~1.2rem / 19px). Match it to the select to keep the column visually uniform.
 */
.sbxEvents-cart .cart-table td.item-qty-column {
  font-size: var(--sbx-font-size-sm);
}

/* Cart total bar (outside table, inside form) */
form.form-cart .cart-total {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--sbx-space-md);
  background:      var(--sbx-surface-muted);
  border-top:      2px solid var(--sbx-border-color);
  border-bottom:   2px solid var(--sbx-border-color);
  font-weight:     700;
  margin-bottom:   var(--sbx-space-lg);
}

/*
 * Donation add-on input (.donation-content input):
 * This is a small inline dollar-amount input in the cart, NOT a full-width
 * form field. The cart's inline <style> sets it to 20px height. We must
 * not override that with Phase 4's 48px height rule.
 */
form.form-cart .donation-content input {
  height:     auto;
  text-align: right;
  min-height:  var(--sbx-btn-height-sm);
  width:        90px;
  max-width:    90px;
  flex-shrink:  0;
}


/* ========================================================================== */
/* PHASE 17 — SHOP: PRODUCT DETAIL                                            */
/* Scope: .product-store-wrapper (product detail view)                        */
/* Added: v62, 2026-05-04; refined v63                                        */
/*                                                                            */
/* Already handled by earlier phases (no duplication):                        */
/*   h2.product-title ............... Phase 2 heading rules (line 927)        */
/*   select.field.select.large ...... Phase 4 select rules (line 1311)        */
/*   button.button[type="submit"] ... Phase 4 primary button (line 1015)      */
/*   button[disabled] ............... Phase 4 disabled state (line 1074)      */
/*   table.store-cart select ........ Phase 3 cart (line 4511)                */
/*                                                                            */
/* Confirmed markup (Playwright, product/94):                                 */
/*   .product-store-container: display:grid, two .column children (~50/50)   */
/*   #productImage: object-fit:fill (default); natural 800×600                */
/*   .price > span.price-value + span (stock text, no class)                  */
/*   ul.variant-elements > li > label.desc + .cntr > select.field.select.large*/
/*   div.add-to-cart > button#btnAddToCart[disabled] (JS enables on selection)*/
/*   .quantity div: display:none by default (JS reveals post-variant-select)  */
/* ========================================================================== */

/* -- Wrapper padding: breathing room around the entire detail block -------- */
.product-store-wrapper {
  padding: var(--sbx-space-lg);
}

/* -- Title → price rhythm: keep tight so hierarchy reads immediately ------- */
.product-store-wrapper h2.product-title {
  margin-bottom: var(--sbx-space-sm);
}

/* -- Two-column grid: own the layout, control responsive stacking ---------- */
/*
 * The component already applies display:grid to .product-store-container.
 * We reinforce and extend it here so the template layer controls breakpoints.
 * At ≤767px both columns collapse to a single full-width stack: image above,
 * content below — the correct mobile reading order.
 */
.product-store-container {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   var(--sbx-space-xl);
  align-items:           start;
}

/* -- Product image: square crop -------------------------------------------- */
/*
 * display:flex (align-items:stretch by default) is required to override
 * soapbox-responsive-bootstrap.min.css img { height:auto !important }.
 * <img> is a replaced element: absolute inset:0 or height:100% both fail because
 * CSS resolves height:auto to intrinsic dimensions for replaced elements first.
 * Flex stretch bypasses the height:auto rule by using the flex algorithm's
 * cross-axis sizing — the same mechanism the Search/Collection grid uses
 * (confirmed: .item-thumb-wrapper also computes as display:flex).
 * No align-items override here: stretch (the default) is exactly what we want.
 */
.product-image-wrap {
  display:       flex;
  overflow:      hidden;
  background:    linear-gradient(
                   135deg,
                   color(srgb 0.95 0.96784 0.98314),
                   color(srgb 0.88 0.92282 0.95953) 45%,
                   color(srgb 0.92 0.94855 0.97302)
                 );  /* matches Auctions no-image gradient */
  border-radius: var(--sbx-radius-card);
  aspect-ratio:  1 / 1;
}

#productImage {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

@media (min-width: 768px) and (max-width: 899px) {
  .product-store-container {
    grid-template-columns: 2fr 3fr;
  }
}

@media (max-width: 767px) {
  .product-store-container {
    grid-template-columns: 1fr;
    gap:                   var(--sbx-space-lg);
  }
}

/* -- Price hierarchy ------------------------------------------------------- */
/*
 * Markup: .price > span.price-value + span (stock text, no class)
 * .price-value: prominent amount — large, bold, heading color.
 * span:not(.price-value): "In Stock" / availability — small, muted.
 * Flex row keeps both on the same baseline with visible gap separation.
 */
.product-store-wrapper .price {
  display:     flex;
  align-items: baseline;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-sm);
  margin:      var(--sbx-space-xs) 0 var(--sbx-space-md);
}

.product-store-wrapper .price-value {
  font-size:   1.375rem;
  font-weight: 700;
  color:       var(--sbx-text-heading);
  line-height: 1.2;
}

.product-store-wrapper .price span:not(.price-value) {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
}

/* -- Variant select groups ------------------------------------------------- */
/*
 * ul.variant-elements: list of variant select controls.
 * li IDs contain spaces (e.g. id="Variant v001_container") — never target
 * by ID; always use descendant selectors from .product-store-wrapper.
 * label.desc: Bootstrap's ul.compList li label.desc (0,2,3) inflates to
 * ~19.2px. Override with !important — same approach as Phase 16 for Events.
 */
.product-store-wrapper ul.variant-elements {
  list-style: none;
  padding:    0;
  margin:     0 0 var(--sbx-space-md);
}

.product-store-wrapper ul.variant-elements > li {
  margin-bottom: var(--sbx-space-sm);
}

.product-store-wrapper ul.variant-elements > li:last-child {
  margin-bottom: 0;
}

.product-store-wrapper ul.variant-elements label.desc {
  display:        block !important;
  font-size:      var(--sbx-font-size-xs) !important;
  font-weight:    700 !important;
  color:          var(--sbx-text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom:  var(--sbx-space-xs);
}

/* -- Quantity select: spacing (height from Phase 4 global rule) ------------ */
/*
 * .quantity div has display:none by default; revealed by JS after all
 * variants are selected. margin-top takes effect only when visible.
 */
.product-store-wrapper .quantity {
  margin-top: var(--sbx-space-md);
}

/* -- Add to Cart: full-width ----------------------------------------------- */
/*
 * Phase 4's button.button[type="submit"] already provides: background, color,
 * height (48px), padding, border-radius. This rule adds width:100% so the
 * button spans the full content column.
 * Phase 4's button[disabled] opacity:0.45 preserves the pending state when
 * variants are unselected — do not override it here.
 */
.product-store-wrapper div.add-to-cart {
  margin-top: var(--sbx-space-lg);
}

.product-store-wrapper #btnAddToCart {
  width: 100%;
}

/* -- Product description --------------------------------------------------- */
.product-store-wrapper .description {
  margin-top:  var(--sbx-space-xl);
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-body);
  line-height: 1.65;
}

.product-store-wrapper .description p {
  margin-bottom: var(--sbx-space-md);
}

.product-store-wrapper .description p:last-child {
  margin-bottom: 0;
}

/* -- Salesforce custom field block ----------------------------------------- */
/*
 * .custom-elements wraps one .custom-field-list table per quantity item.
 * A hidden prototype table (no .custom-field-list class) is always present —
 * only .custom-field-list instances render.
 *
 * System CSS: .table-inwell gets a blue-tinted background; .well gets a box
 * shadow and grey bg. Strip both and replace with a card container.
 *
 * Bootstrap cascade: ul.compList li label.desc (0,2,3) inflates label font-
 * size; !important required to match soapbox-bootstrap specificity.
 *
 * for/id mismatch: PHP emits label for="Field__c" but input id="Field__c0"
 * (item index appended). Clicking the label does not toggle the checkbox via
 * native browser association. JS fix `fixShopCustomCheckboxToggle` in
 * index.php repairs the for= attribute on DOMContentLoaded.
 */
.product-store-wrapper .custom-elements table.custom-field-list {
  width:           100%;
  border:          1px solid var(--sbx-border-subtle);
  border-radius:   var(--sbx-radius-card);
  border-collapse: separate;
  border-spacing:  0;
  overflow:        hidden;
  background:      var(--sbx-surface);
  margin-top:      var(--sbx-space-md);
}

/*
 * soapbox-bootstrap.min.css `table tr.info td { background-color: rgb(231,244,250) !important }`
 * matches because rows carry class="tr-inwell tr-header info". Requires !important to override.
 */
.product-store-wrapper .custom-elements table.custom-field-list td {
  background: transparent !important;
  border:     none;
  padding:    0;
}

/*
 * System CSS gives .tr-inwell rows a blue-tinted background (from the sbx
 * system template CSS). Override with transparent so the table's surface
 * background shows through. Header row's own background is set on the .btn-toolbar div.
 */
.product-store-wrapper .custom-elements tr.tr-inwell {
  background: transparent;
}

/*
 * Item header row: "Item #N" label + Remove button.
 * #f8f9fa (Bootstrap neutral) used directly — all --sbx-surface-* tokens are
 * blue-tinted and would reintroduce the unwanted color cast here.
 */
.product-store-wrapper .custom-elements .row-actions.btn-toolbar {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--sbx-space-sm);
  padding:         var(--sbx-space-sm) var(--sbx-space-md);
  background:      #f8f9fa;
  border-bottom:   1px solid var(--sbx-border-subtle);
  margin:          0;
}

.product-store-wrapper .custom-elements .row-actions .title {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 600;
  color:       var(--sbx-text-muted);
}

/* Strip Bootstrap well chrome */
.product-store-wrapper .custom-elements .well.well-form {
  background:    transparent;
  border:        none;
  border-radius: 0;
  box-shadow:    none;
  padding:       var(--sbx-space-md);
  margin:        0;
}

/* Normalize label font size — Bootstrap em cascade inflates to ~19px */
.product-store-wrapper .custom-elements label.desc {
  font-size:   var(--sbx-font-size-sm) !important;
  font-weight: 600 !important;
  color:       var(--sbx-text-heading);
  line-height: 1.35;
}

/* Item row fade-out: JS adds .sbx-item-removing on Remove click before submit */
.product-store-wrapper .custom-elements tr.sbx-item-removing {
  transition: opacity 0.7s ease !important;
  opacity:    0 !important;
}

/* Remove button: plain hyperlink style, matching Shop cart remove link */
.product-store-wrapper .custom-elements button.remove-item {
  display:          inline;
  padding:          0;
  min-height:       auto;
  background:       transparent !important;
  background-image: none !important;
  color:            var(--sbx-error) !important;
  border:           none !important;
  border-radius:    0;
  box-shadow:       none !important;
  font-family:      var(--sbx-font-ui);
  font-size:        var(--sbx-font-size-xs);
  font-weight:      400;
  cursor:           pointer;
  text-shadow:      none !important;
  text-decoration:  underline;
}

.product-store-wrapper .custom-elements button.remove-item:hover {
  background:      transparent !important;
  opacity:         0.8;
}

.product-store-wrapper .custom-elements button.remove-item:focus-visible {
  outline:        2px solid var(--sbx-error);
  outline-offset: 2px;
  border-radius:  var(--sbx-radius-sm);
}

/*
 * Radio inline group: mirror .com_sbxEvents li.notStacked pattern.
 * Must beat Bootstrap's ul.compList li.notStacked div.cntr span.span-block
 * at (0,4,4) — !important on display/width.
 */
.product-store-wrapper .custom-elements li.notStacked .cntr {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  align-items: center;
}

.product-store-wrapper .custom-elements li.notStacked .span-block {
  display:     inline-flex !important;
  align-items: center;
  gap:         var(--sbx-space-xs);
  width:       auto !important;
}

.product-store-wrapper .custom-elements li.notStacked .span-block label.choice {
  margin:         0 !important;
  width:          auto !important;
  padding-bottom: 0;
}

/*
 * Date field: span-blocks are wrapped in an anonymous div (not direct li
 * children). Target the div for the flex row; label.desc is a direct li
 * child and stays block-level naturally above the row.
 */
.product-store-wrapper .custom-elements li:has(img.calendar) > div {
  display:     flex;
  align-items: center;
}

.product-store-wrapper .custom-elements li:has(img.calendar) > div > .span-block:has(input) {
  flex: 1;
}

.product-store-wrapper .custom-elements li:has(img.calendar) > div > .span-block:has(img.calendar) {
  flex:         0 0 auto;
  padding-left: var(--sbx-space-xs);
}

/* Checkbox → slider toggle (mirrors .eventsManage and .com_jsfsubmit patterns) */
.product-store-wrapper .custom-elements .span-block:has(input[type="checkbox"].field.checkbox) {
  display: flex !important;
  width:   100%;
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox {
  position: absolute;
  opacity:  0;
  width:    1px;
  height:   1px;
  margin:   0;
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox:focus {
  outline:    none;
  box-shadow: none;
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox + label.choice {
  position:     relative;
  display:      flex;
  align-items:  center;
  padding-left: 52px;
  min-height:   26px;
  margin:       0 !important;
  cursor:       pointer;
  user-select:  none;
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox + label.choice::before {
  content:       '';
  position:      absolute;
  left:          0;
  top:           50%;
  transform:     translateY(-50%);
  width:         40px;
  height:        24px;
  border-radius: 12px;
  background:    var(--sbx-surface-control);
  border:        1.5px solid var(--sbx-border-strong);
  transition:    background   var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0,0,0,0.15);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox:checked + label.choice::before {
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary-dark);
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox:checked + label.choice::after {
  left: 19px;
}

.product-store-wrapper .custom-elements input[type="checkbox"].field.checkbox:focus-visible + label.choice::before {
  box-shadow: var(--sbx-shadow-focus);
}


/* ========================================================================== */
/* PHASE 18 — SHOP: SEARCH + COLLECTION PRODUCT GRID                         */
/* Scope: .item-list (shared by com_store search and collection views)        */
/* Added: v64, 2026-05-04; QA refinements v65                                 */
/*                                                                            */
/* Confirmed markup (Playwright):                                             */
/*   .item-list > a (×20) + div.list-footer — direct children                */
/*   Each a > div.item.flex > .item-thumb-wrapper + .item-name + .item-price */
/*   .item-thumb-wrapper: may be empty (14/20 in test data)                  */
/*   img.productImageList.productImageSearch inside thumb when present        */
/*                                                                            */
/* Inline <style> from component to override (higher specificity required):  */
/*   .item { align-items: center; }          ← (0,1,0)                       */
/*   .item-thumb-wrapper { width: 120px; }   ← (0,1,0)                       */
/*   .item-name { flex: auto; padding: 10px; } ← (0,1,0)                     */
/*   All overrides use .item-list .xxx (0,2,0) — no !important needed.       */
/* ========================================================================== */

/* -- Search form: inline field + button row -------------------------------- */
/*
 * .search-form is display:block; Bootstrap .form-control sets width:100% on
 * the input, pushing the button to the next row. Flex layout restores the
 * side-by-side pattern. .s-button styling lives in Phase 4 (added to the
 * primary button selector list so it matches height and visual weight).
 * min-width:0 on the input prevents flex overflow past container edges.
 */
.search-form {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
  flex-wrap:   wrap;
}

.search-form .s-field {
  flex:      1;
  min-width: 0;
}

/* -- Card link: suppress global link treatment ----------------------------- */
/*
 * #content a:not(.btn):not(.readon):not(.button):not(.share-link) has
 * specificity (1,4,1) and applies text-decoration:underline + link blue to
 * the card <a> wrappers. Component inline style (.item-list a, spec 0,1,1)
 * cannot beat it. !important is the correct tool here — we are intentionally
 * overriding a structural global rule for this component scope.
 */
.item-list > a,
.item-list > a:hover,
.item-list > a:visited {
  text-decoration: none !important;
  color:           inherit !important;
}

/* -- Grid container -------------------------------------------------------- */
/*
 * Mobile-first: 1 column. Breakpoints add columns as space allows.
 * .list-footer (pagination) spans all columns so it sits below the grid.
 */
.item-list {
  display: grid;
  grid-template-columns: 1fr;
  gap:                   var(--sbx-space-md);
}

@media (min-width: 600px) {
  .item-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .item-list { grid-template-columns: repeat(3, 1fr); }
}

.item-list .list-footer {
  grid-column:  1 / -1;
  margin-top:   var(--sbx-space-md);
}

/* -- Card link wrapper ----------------------------------------------------- */
/*
 * :focus-visible override needed — a global rule in template/Bootstrap suppresses
 * the browser default outline (outlineStyle:none, outlineWidth:0). Explicit rule
 * restores a visible ring for keyboard navigation.
 */
.item-list > a {
  display:        block;
  border-radius:  var(--sbx-radius-card);
  outline-offset: 3px;
}

.item-list > a:focus-visible {
  outline: 2px solid var(--sbx-primary);
  outline-offset: 3px;
}

/* -- Card interior --------------------------------------------------------- */
/*
 * Overrides component inline: .item { align-items: center; }
 * Stack image → name → price vertically; fill full card height for even rows.
 */
.item-list .item {
  display:        flex;
  flex-direction: column;
  height:         100%;
  background:     var(--sbx-surface);
  border:         1px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-card);
  overflow:       hidden;
  transition:     box-shadow 0.18s ease, transform 0.18s ease;
}

/* -- Hover / focus state --------------------------------------------------- */
.item-list > a:hover .item,
.item-list > a:focus-visible .item {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform:  translateY(-2px);
}

/* -- Image wrapper: square thumbnail -------------------------------------- */
/*
 * Overrides component inline: .item-thumb-wrapper { width: 120px; }
 * aspect-ratio: 1/1 provides the placeholder square for no-image products.
 * background gradient fills the empty state; real images cover it via object-fit.
 * At mobile (1-col) a square thumb at full viewport width reads as very tall;
 * 4/3 landscape ratio reduces card height and shows ~2 cards per screen.
 */
.item-list .item-thumb-wrapper {
  width:        100%;
  aspect-ratio: 1 / 1;
  overflow:     hidden;
  background:   linear-gradient(
                  135deg,
                  color(srgb 0.95 0.96784 0.98314),
                  color(srgb 0.88 0.92282 0.95953) 45%,
                  color(srgb 0.92 0.94855 0.97302)
                );  /* matches Auctions no-image gradient */
  flex-shrink:  0;
}

@media (max-width: 599px) {
  .item-list .item-thumb-wrapper { aspect-ratio: 4 / 3; }
}

/* -- Product image: cover crop --------------------------------------------- */
.item-list .item-thumb-wrapper img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

/* -- Product name ---------------------------------------------------------- */
/*
 * Overrides component inline: .item-name { flex: auto; padding: 10px; }
 * flex: 1 pushes price to the bottom of the card in equal-height rows.
 */
.item-list .item-name {
  flex:        1;
  padding:     var(--sbx-space-sm) var(--sbx-space-md);
  font-size:   var(--sbx-font-size-base);
  font-weight: 600;
  color:       var(--sbx-text-heading);
  line-height: 1.35;
}

/* -- Product price --------------------------------------------------------- */
.item-list .item-price {
  padding:     0 var(--sbx-space-md) var(--sbx-space-md);
  font-size:   0.9375rem;
  font-weight: 700;
  color:       var(--sbx-text-heading);
}


/* ========================================================================== */
/* PHASE 19 — SHOP: SHOPPING CART                                             */
/* Scope: .sbxEvents-cart                                                     */
/* Added: v67, 2026-05-04                                                     */
/*                                                                            */
/* Confirmed markup (Playwright):                                             */
/*   table.store-cart.cart-table — PRODUCT / PRICE / QUANTITY / TOTAL        */
/*   Product cell td.item-thumb-column: .flex > .item-thumb-wrapper + .column */
/*   Section accordions: .section-accordion > .section-header + .section-body */
/*   Order totals: .orderSummary two-column flex (labels | amounts)           */
/*   Checkout: button#btn-store.btn.btn-large.btn-primary.btn-submit          */
/*                                                                            */
/* Bootstrap 2 note: hidden-xs is Bootstrap 3 — no effect here.              */
/* Mobile column hiding is handled by our own breakpoint rules below.         */
/*                                                                            */
/* Inline <style> overrides needed (component injects into body):             */
/*   .cart-table { width: 100% }              — (0,1,0) fine, keep           */
/*   .item-thumb img { max-width: 100px }     — (0,1,0) override via !import  */
/*   .orderSummary { display:flex; flex-direction:row } — (0,1,0) extend only */
/*   .cart-total { border-top/bottom … }      — (0,1,0) override via (0,2,0) */
/* ========================================================================== */

/* -- Table: header row ----------------------------------------------------- */
.sbxEvents-cart .cart-table thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
}

.sbxEvents-cart .cart-table thead th:nth-child(2),
.sbxEvents-cart .cart-table thead th:nth-child(3),
.sbxEvents-cart .cart-table thead th:nth-child(4) {
  text-align: right;
}

/* -- Table: body rows ------------------------------------------------------ */
.sbxEvents-cart .cart-table tbody tr {
  border-bottom: 1px solid var(--sbx-border-subtle);
}

.sbxEvents-cart .cart-table td {
  padding:        var(--sbx-space-md);
  vertical-align: top;
}

.sbxEvents-cart .cart-table td.item-price-column,
.sbxEvents-cart .cart-table td.item-qty-column,
.sbxEvents-cart .cart-table td.item-total-column {
  text-align: right;
  white-space: nowrap;
}

/* -- Product cell: thumb + name + remove ----------------------------------- */
/*
 * Component inline sets .item-thumb-wrapper { width: 120px }.
 * Override with (0,3,0) — no !important needed.
 */
.sbxEvents-cart .cart-table .item-thumb-column .item-thumb-wrapper {
  width:         56px;
  height:        56px;
  flex-shrink:   0;
  border-radius: var(--sbx-radius-sm);
  overflow:      hidden;
  background:    linear-gradient(
                   135deg,
                   color(srgb 0.95 0.96784 0.98314),
                   color(srgb 0.88 0.92282 0.95953) 45%,
                   color(srgb 0.92 0.94855 0.97302)
                 );  /* matches Auctions no-image gradient */
}

/*
 * Component inline: .item-thumb img { max-width: 100px } at (0,2,0).
 * Needs !important to override at (0,4,0) scope equivalent.
 */
.sbxEvents-cart .cart-table .item-thumb-column .item-thumb-wrapper img {
  width:      100% !important;
  height:     100% !important;
  max-width:  none !important;
  object-fit: cover;
  display:    block;
}

.sbxEvents-cart .cart-table .flex {
  display:     flex;
  align-items: flex-start;
  gap:         var(--sbx-space-md);
}

.sbxEvents-cart .cart-table .item-name {
  font-weight:   600;
  color:         var(--sbx-text-heading);
  font-size:     var(--sbx-font-size-base);
  line-height:   1.35;
  margin-bottom: var(--sbx-space-xs);
}

/* -- Remove link: suppress default .btn styles, apply danger text ---------- */
.sbxEvents-cart .cart-table .cart-item-remove a.btn {
  background:      transparent;
  border:          none;
  box-shadow:      none;
  padding:         0;
  color:           var(--sbx-error);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     400;
  text-decoration: none;
  line-height:     1;
}

.sbxEvents-cart .cart-table .cart-item-remove a.btn:hover {
  color:           var(--sbx-error);
  text-decoration: underline;
  background:      transparent;
  box-shadow:      none;
}

.sbxEvents-cart .cart-table .cart-item-remove a.btn:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
  border-radius:  var(--sbx-radius-sm);
}

/* -- Price and total: styled amount spans ---------------------------------- */
/*
 * Bootstrap body font-size cascade inflates td text to ~19.2px.
 * Explicit font-size prevents inconsistency with search card prices (16px)
 * and matches the global --sbx-font-size-base token.
 * Weight 700 aligns with other price contexts (search card: 700, detail: 700).
 */
.sbxEvents-cart .cart-table td.item-price-column .original,
.sbxEvents-cart .cart-table td.item-total-column .original {
  font-size:   var(--sbx-font-size-base);
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

.sbxEvents-cart .cart-table td.item-price-column .discount,
.sbxEvents-cart .cart-table td.item-total-column .discount {
  color:     var(--sbx-error);
  font-size: var(--sbx-font-size-sm);
}

/* -- Quantity select: compact height --------------------------------------- */
.sbxEvents-cart .product-quantity.select {
  height:    auto;
  padding:   var(--sbx-space-xs) var(--sbx-space-sm);
  font-size: var(--sbx-font-size-sm);
}

/* -- Mobile: show PRODUCT + QUANTITY only ---------------------------------- */
/*
 * Bootstrap 2 hidden-xs has no effect (Bootstrap 3 class). At 390px, 4
 * columns are unreadable. Hide PRICE and TOTAL — the grand total is visible
 * in the Order Summary below, and per-row totals are redundant at qty=1.
 */
@media (max-width: 599px) {
  .sbxEvents-cart .cart-table thead th:nth-child(2),
  .sbxEvents-cart .cart-table thead th:nth-child(4),
  .sbxEvents-cart .cart-table td.item-price-column,
  .sbxEvents-cart .cart-table td.item-total-column {
    display: none;
  }

  .sbxEvents-cart .cart-table .item-thumb-column .item-thumb-wrapper {
    width:  44px;
    height: 44px;
  }
}

/* -- 320px: constrain QTY column so table fits without horizontal scroll --- */
/*
 * At 320px the QUANTITY column (Bootstrap input-mini, ~110px) pushes the
 * table right edge to ~334px. table-layout:fixed + explicit QTY column width
 * lets the PRODUCT column absorb the remaining space.
 */
@media (max-width: 399px) {
  .sbxEvents-cart .cart-table {
    table-layout: fixed;
  }
  .sbxEvents-cart .cart-table .item-qty-column {
    width: 56px;
  }
  .sbxEvents-cart .product-quantity.select {
    width:     100%;
    min-width: 0;
  }
}

/* -- Subtotal bar below cart table ----------------------------------------- */
/*
 * Component inline: .cart-total { line-height:1em; font-weight:bold;
 *   border-top:1px solid #eee; border-bottom:1px solid #eee; padding:16px 8px }
 * (0,1,0). Override with (0,2,0) scoped rule.
 */
.sbxEvents-cart .cart-total {
  display:       flex;
  justify-content: flex-end;
  align-items:   center;
  gap:           var(--sbx-space-md);
  padding:       var(--sbx-space-md) 0;
  border-top:    2px solid var(--sbx-border-strong);
  border-bottom: none;
  margin-bottom: var(--sbx-space-lg);
}

/*
 * Bootstrap .clearfix adds ::before/::after { content:""; display:table } which
 * become phantom flex items when .cart-total is also a flex container. With
 * space-between they push the .amount off-center. Null them out in this context.
 * Also re-assert flex-end: form.form-cart .cart-total (0,2,1) outranks
 * .sbxEvents-cart .cart-total (0,2,0) due to the type selector.
 */
.sbxEvents-cart form.form-cart .cart-total {
  justify-content: flex-end;
}

.sbxEvents-cart form.form-cart .cart-total::before,
.sbxEvents-cart form.form-cart .cart-total::after {
  display: none;
}

/* Shop cart: Subtotal row — flex-row with label left, amount right.
 * .sbxEvents-cartLayDefault .cart-total (line ~11608) sets flex-direction:column
 * for the Events cart foot-donation layout. Restore row for the Shop cart using
 * ID specificity (1,2,0) which outranks that rule's class specificity (0,2,0). */
#form-store.form-cart .cart-total {
  flex-direction:  row;
  justify-content: space-between;
  align-items:     center;
}

.sbxEvents-cart .cart-total .title {
  font-size:      var(--sbx-font-size-sm);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
}

.sbxEvents-cart .cart-total .amount {
  font-size:   1.125rem;
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

/* -- Donation optional add-on block ---------------------------------------- */
.sbxEvents-cart .donation-content {
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-md) var(--sbx-space-lg);
  margin-bottom: var(--sbx-space-lg);
  display:       flex;
  align-items:   center;
  gap:           var(--sbx-space-lg);
  flex-wrap:     wrap;
}

.sbxEvents-cart .donation-content h4.title {
  font-size:     var(--sbx-font-size-base);
  font-weight:   600;
  color:         var(--sbx-text-heading);
  margin:        0 0 var(--sbx-space-xs);
}

.sbxEvents-cart .donation-content p.desc {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
  margin:    0;
}

.sbxEvents-cart .donation-content .amount {
  flex-shrink: 0;
}

/* -- Section accordion spacing --------------------------------------------- */
.sbxEvents-cart .section.section-accordion {
  margin-bottom: var(--sbx-space-lg);
}

.sbxEvents-cart .section-body {
  margin-top:     0;
  padding-top:    0;
  padding-bottom: var(--sbx-space-sm);
}

/* -- Order Summary: promo + totals ----------------------------------------- */
/*
 * .pull-left (promo) and .pull-right (totals) sit inside .clearfix.
 * On mobile the float context collapses; stack them vertically.
 */
.sbxEvents-cart #total-summary {
  padding: var(--sbx-space-md) 0;
}

@media (max-width: 599px) {
  .sbxEvents-cart .order-total.pull-right,
  .sbxEvents-cart #order-promocode.pull-left {
    float: none;
    width: 100%;
  }
  .sbxEvents-cart .order-total.pull-right {
    margin-top: var(--sbx-space-md);
  }
}

/* -- .orderSummary two-column flex (labels | amounts) ---------------------- */
/*
 * Component inline already sets display:flex; flex-direction:row on .orderSummary.
 * Each child div contains stacked spans. Setting display:block on those spans
 * is required for border-top, margin, and consistent line-height to work —
 * inline spans ignore block-model properties.
 */
.sbxEvents-cart .orderSummary {
  gap:         var(--sbx-space-lg);
  line-height: 1;
}

.sbxEvents-cart .orderSummary > div > span {
  display:       block;
  padding:       var(--sbx-space-xs) 0;
  font-size:     var(--sbx-font-size-sm);
  white-space:   nowrap;
}

.sbxEvents-cart .orderSummary .title {
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sbxEvents-cart .orderSummary .amount {
  color:       var(--sbx-text-body);
  text-align:  right;
  font-weight: 400;
}

/* Total row: larger weight, primary color, separator above */
.sbxEvents-cart .orderSummary .title.orderSummaryTotal,
.sbxEvents-cart .orderSummary .amount.orderSummaryTotal {
  font-size:     1.125rem;
  font-weight:   700;
  color:         var(--sbx-primary);
  padding-top:   var(--sbx-space-sm);
  margin-top:    var(--sbx-space-xs);
  border-top:    2px solid var(--sbx-border-strong);
}

/* -- Promo code inline form ------------------------------------------------ */
.sbxEvents-cart .form-promocode {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
  flex-wrap:   nowrap;
}

.sbxEvents-cart .form-promocode .field.text {
  flex: 1;
  min-width: 0;
}

/* -- Checkout CTA area ----------------------------------------------------- */
.sbxEvents-cart .order-submit {
  margin-top: var(--sbx-space-xl);
}

/*
 * Bootstrap 2 .form-actions adds padding:19px 20px 20px, background:#f5f5f5,
 * and border-top:1px solid #e5e5e5. Strip all of it — Phase 19 owns this area.
 * Without this, button width:100% resolves against (container - 40px) giving
 * ~211px instead of full container width on mobile.
 */
.sbxEvents-cart .order-formactions {
  display:         flex;
  justify-content: flex-end;
  padding:         0;
  margin:          0;
  background:      transparent;
  border-top:      none;
}

@media (max-width: 599px) {
  .sbxEvents-cart .order-formactions {
    display: block;
  }
  .sbxEvents-cart .order-formactions button#btn-store {
    display: block;
    width:   100%;
  }
}

.sbxEvents-cart .order-message p {
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
  text-align: right;
  margin-top: var(--sbx-space-sm);
}

@media (max-width: 599px) {
  .sbxEvents-cart .order-message p {
    text-align: center;
  }
}

/* -- Empty-state ----------------------------------------------------------- */
.sbxEvents-cart .sbxEvents-cartLayDefault:not(:has(.cart-table)) {
  padding:    var(--sbx-space-xl);
  text-align: center;
  color:      var(--sbx-text-muted);
  font-size:  var(--sbx-font-size-lg);
}

/* -- Cart-level overrides (added v148) ------------------------------------- */

/* Override component inline .page-content { width:80% } */
.sbxEvents-cart .page-content {
  width: 100%;
}

/* Section header: strip legacy dark-grey bg and system border-bottom */
.sbxEvents-cart .section-header {
  background:    transparent;
  border-bottom: none;
  padding:       0;
  margin-bottom: var(--sbx-space-sm);
}

.sbxEvents-cart .section-header h3.title {
  color:         var(--sbx-text-heading) !important;
  margin-bottom: 0;
}

/*
 * Component emits an empty <p> after the h3 in each section-header.
 * Bootstrap p { margin: 0 0 10px } collapses through the zero-padded
 * section-header, adding ~11px to the gap between header and body.
 */
.sbxEvents-cart .section-header p {
  margin: 0;
}

/*
 * Outlined secondary buttons: primary border, transparent fill.
 * !important on background/color/border overrides Bootstrap 2 .btn gradient
 * and soapboxTypography rules loaded earlier in the stylesheet stack.
 */
.sbxEvents-cart button#btnCopyContactToShipping,
.sbxEvents-cart button#btnCopyFromContact,
.sbxEvents-cart #btnApplyPromo {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  padding:          var(--sbx-btn-padding-sm);
  min-height:       var(--sbx-btn-height-sm);
  line-height:      1;
  background:       transparent !important;
  background-image: none !important;
  color:            var(--sbx-primary) !important;
  border:           1.5px solid var(--sbx-primary) !important;
  border-radius:    var(--sbx-radius-btn);
  box-shadow:       none !important;
  font-family:      var(--sbx-font-ui);
  font-size:        var(--sbx-font-size-sm);
  font-weight:      600;
  white-space:      nowrap;
  cursor:           pointer;
  transition:       background var(--sbx-transition), color var(--sbx-transition), border-color var(--sbx-transition);
}

.sbxEvents-cart button#btnCopyContactToShipping:hover,
.sbxEvents-cart button#btnCopyFromContact:hover,
.sbxEvents-cart #btnApplyPromo:hover {
  background: var(--sbx-primary-pale) !important;
}

.sbxEvents-cart button#btnCopyContactToShipping:focus-visible,
.sbxEvents-cart button#btnCopyFromContact:focus-visible,
.sbxEvents-cart #btnApplyPromo:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* Apply promo button: prevent shrinking inside .form-promocode flex row */
.sbxEvents-cart #btnApplyPromo {
  flex-shrink: 0;
}

/* Strip legacy fieldset chrome */
.sbxEvents-cart fieldset {
  padding: 0;
  margin:  0;
  border:  none;
}

/* .order-total sits directly after .cart-total which already has border-top */
.sbxEvents-cart .order-total {
  border-top: none;
}

/* Required field footnote */
.sbxEvents-cart .order-message {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted);
}

/* Cart: custom Salesforce field values in line item */
.sbxEvents-cart .item-custom-fields ul {
  list-style: none;
  padding:    0;
  margin:     var(--sbx-space-xs) 0 0;
}

.sbxEvents-cart .item-custom-fields ul li {
  font-size:        var(--sbx-font-size-label);
  color:            var(--sbx-text-muted);
  line-height:      1.5;
  padding:          0;
  margin:           0;
  background:       none;
  background-image: none;
}

/* Nested multiselect options: inline so they don't stagger vertically */
.sbxEvents-cart .item-custom-fields ul ul {
  display: inline;
  padding: 0;
  margin:  0;
}

.sbxEvents-cart .item-custom-fields ul ul li {
  display: inline;
}

/* Remove link inside custom fields cell: match cart-item-remove style */
.sbxEvents-cart .item-custom-fields .cart-item-remove a.btn {
  background:       none;
  background-image: none;
  border:           none;
  padding:          0;
  font-size:        var(--sbx-font-size-xs);
  color:            var(--sbx-error);
  text-decoration:  underline;
  box-shadow:       none;
}

/* Payment method cards: custom radio pill layout with checked state via :has() */
.sbxEvents-cart .sbxPayType {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--sbx-space-sm);
  padding:   var(--sbx-space-sm) 0;
}

.sbxEvents-cart .sbxPayType .span-block {
  position:       relative;
  display:        flex;     /* no !important — JS style="display:none" must win for hidden tiles */
  flex-direction: column;
  align-items:    center;
  gap:            var(--sbx-space-xs);
  padding:        var(--sbx-space-sm) var(--sbx-space-md) !important;
  min-width:      72px;
  background:     var(--sbx-surface-muted);
  border:         1.5px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-input);
  cursor:         pointer;
  transition:     border-color var(--sbx-transition),
                  background   var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
}

.sbxEvents-cart .sbxPayType .span-block:focus-within {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

.sbxEvents-cart .sbxPayType .span-block img {
  max-width: 52px;
  height:    auto;
  display:   block;
}

@supports selector(:has(*)) {
  .sbxEvents-cart .sbxPayType input[name="CREDITCARDTYPE[]"] {
    position: absolute;
    opacity:  0;
    width:    0;
    height:   0;
    overflow: hidden;
    margin:   0;
  }

  .sbxEvents-cart .sbxPayType .span-block label.choice {
    cursor: pointer;
  }

  .sbxEvents-cart .sbxPayType .span-block:has(input:checked) {
    border-color: var(--sbx-primary);
    background:   var(--sbx-primary-pale);
    box-shadow:   0 0 0 2px rgba(var(--sbx-primary-rgb), 0.15);
  }
}


/* ========================================================================== */
/* PHASE 20 — LOGIN / AUTH SURFACE MODERNIZATION                              */
/* Scopes:                                                                    */
/*   .com_user.userLogin  — sign-in page                                     */
/*   .com_user.userReset  — forgot password (/sign-in/reset)                 */
/*   .com_user.userRemind — forgot username (/sign-in/remind)                */
/*   body.contentpane     — email login iframe (via component.php)           */
/* Added: v72, 2026-05-05                                                     */
/* ========================================================================== */

/* ── Auth page: constrain to comfortable reading width ─────────────────── */
.com_user.userLogin .page-content,
.com_user.userReset .page-content,
.com_user.userRemind .page-content {
  max-width: 480px;
}

/* ── Login form: single-column stacked layout ───────────────────────────── */
/*
 * soapbox-bootstrap sets width:47%!important + float:left/right on
 * li.leftHalf / li.rightHalf. Login forms must always stack single-column.
 */
.com_user.userLogin li.leftHalf,
.com_user.userLogin li.rightHalf {
  float:         none !important;
  clear:         none !important;
  width:         100% !important;
  margin-bottom: var(--sbx-space-md);
}

/* ── Section dividers: strip dotted border, keep only as spacing ─────── */
/*
 * soapbox-bootstrap applies border-top:1px dotted to both li.section
 * and li.section.sectionMTop. Both appear in auth forms; suppress both.
 */
.com_user li.section {
  border-top:  none !important;
  margin:      var(--sbx-space-xs) 0;
  padding-top: 0;
  list-style:  none;
}

/* ── Section title: hint weight only ────────────────────────────────────── */
.com_user .compSect-title {
  border-bottom:  none;
  margin-bottom:  var(--sbx-space-xs);
  padding-bottom: 0;
}

.com_user .compSect-title h3 {
  font-size:      var(--sbx-font-size-sm);
  font-weight:    500;
  color:          var(--sbx-text-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom:  var(--sbx-space-sm);
}

/* ── Auth section headings: the rule and the text now agree (v253) ────────── */
/*
 * The Phase 3a rule above demotes com_user section headings to a muted 14px
 * hint. That was a defensible reading of "Please enter your login information
 * below" -- it is an instruction, not a section name -- but it left the page
 * saying two things at once:
 *
 *   the heading gets the BRAND RULE, from html.sbx-section-rule .compSect-title h3
 *   the heading gets HINT TEXT, from the rule above
 *
 * so a full-width 2px brand rule sat under a small grey line, announcing a
 * section far more loudly than the words did. Worse, the form labels beneath it
 * render at 19.2px/700 -- the heading was markedly SMALLER and lighter than the
 * content it introduces, which inverts the hierarchy rather than de-emphasizing
 * it.
 *
 * Either both are a section heading or neither is. The rule is already there and
 * every other app in the template looks that way, so the text is brought up to
 * meet it rather than the rule removed to meet the text.
 *
 * NOT applied to .userUser (Edit User), which builds deliberately on the muted
 * default with its own uppercase + separator treatment. Changing the base would
 * have jumped its headings to 20px uppercase, which nobody asked for.
 */
.com_user.userLogin  .compSect-title h3,
.com_user.userReset  .compSect-title h3,
.com_user.userRemind .compSect-title h3 {
  font-size:   var(--sbx-font-size-h3);
  font-weight: 600;
  color:       var(--sbx-text-heading);
}

.com_user .compSect-title h3 > span {
  border-bottom:  none !important;
  padding-bottom: 0 !important;
}

/* ── Auth primary CTAs: fill available width ────────────────────────────── */
.com_user.userLogin li.buttons button.button[type="submit"],
.com_user.userReset  #sectEmailBtns-wrap button.button,
.com_user.userRemind #sectEmailBtns-wrap button.button {
  width:           100%;
  justify-content: center;
}

/* ── Secondary auth buttons: Login by Email + SSO/SAML ─────────────────── */
/*
 * Login by Email: button.button without type="submit" — gets browser default.
 * SAML: button.button.saml-login[type="submit"] — gets Phase 3 primary blue.
 * Both should be secondary/outlined to sit below the primary Login.
 */
.com_user.userLogin #lgn-email button.button,
.com_user.userLogin button.button.saml-login {
  -webkit-appearance: none;
  display:         block;
  width:           100%;
  min-height:      var(--sbx-btn-height);
  padding:         var(--sbx-btn-padding);
  box-sizing:      border-box;
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  box-shadow:      none;
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     700;
  line-height:     1;
  text-align:      center;
  white-space:     nowrap;
  cursor:          pointer;
  text-decoration: none;
  transition:      background var(--sbx-transition),
                   color       var(--sbx-transition),
                   border-color var(--sbx-transition);
}

/* saml-login has type=submit — needs !important to beat Phase 3 */
.com_user.userLogin button.button.saml-login {
  background:   transparent !important;
  color:        var(--sbx-primary) !important;
  border:       1.5px solid var(--sbx-primary) !important;
  box-shadow:   none !important;
}

.com_user.userLogin #lgn-email button.button:hover,
.com_user.userLogin button.button.saml-login:hover {
  background:    var(--sbx-primary-pale);
  color:         var(--sbx-primary-dark) !important;
  border-color:  var(--sbx-primary-dark) !important;
}

.com_user.userLogin #lgn-email button.button:focus-visible,
.com_user.userLogin button.button.saml-login:focus-visible {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

/* Override inline color:#ccc on the nested <a> inside Login by Email */
.com_user.userLogin #lgn-email button.button a,
.com_user.userLogin #lgn-email button.button a:visited,
.com_user.userLogin #lgn-email button.button a:hover {
  color:           inherit !important;
  text-decoration: none !important;
  font-weight:     inherit;
  display:         block;
}

/* ── Utility links (Forgot password, Forgot username, Register) ─────────── */
.com_user .linksList {
  list-style:     none !important;
  padding:        0;
  margin:         var(--sbx-space-lg) 0 0;
  display:        flex;
  flex-direction: column;
  gap:            var(--sbx-space-xs);
}

.com_user .linksList li {
  padding:    0;
  background: none; /* soapboxTypography sets ul li { background: url(bullet-default.png) } */
}

.com_user .linksList li::before {
  display: none !important;
}

.com_user .linksList a {
  font-size:       var(--sbx-font-size-sm);
  color:           var(--sbx-primary);
  text-decoration: none;
}

.com_user .linksList a:hover {
  text-decoration: underline;
  color:           var(--sbx-primary-dark);
}

.com_user .linksList a:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
  border-radius:  2px;
}

/* ── Helper text in forgot forms ────────────────────────────────────────── */
.com_user.userReset .compSect-content li > div,
.com_user.userRemind .compSect-content li > div {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  line-height: 1.5;
  margin-top:  var(--sbx-space-xs);
}

/* ── Required fields notice: mute from error-red ───────────────────────── */
/* soapbox-bootstrap uses color:red!important on ul.compList span.req */
.com_user.userReset    li.requiredtext span.req,
.com_user.userRemind   li.requiredtext span.req,
.com_user.userRegister li.requiredtext span.req {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-muted) !important;
}

/* ── Email login modal (body.contentpane) ───────────────────────────────── */
/*
 * Modal iframe declared at 300×350px via rel="{size:{x:300,y:350}}".
 * Mootools consumes ~52px for chrome, leaving ~298px of usable height.
 * Padding/spacing tuned so content fits without vertical scroll.
 */
body.contentpane {
  padding:    var(--sbx-space-md) var(--sbx-space-lg);
  background: var(--sbx-surface);
  overflow:   visible !important; /* JS injects body{overflow:hidden} at runtime; override to prevent content clipping */
}

/* .section-header.item-header adds ~15px top gap — zero it out */
body.contentpane .section-header {
  margin-top:  0 !important;
  padding-top: 0 !important;
}

body.contentpane .login-page h1#title {
  font-family:   var(--sbx-font-ui);
  font-size:     var(--sbx-font-size-lg);
  font-weight:   700;
  color:         var(--sbx-text-heading);
  text-align:    center;
  margin-top:    0;
  margin-bottom: var(--sbx-space-xs);
}

body.contentpane .login-page p {
  font-family:   var(--sbx-font-ui);
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-muted);
  line-height:   1.5;
  text-align:    center;
  margin-bottom: var(--sbx-space-sm);
}

body.contentpane table.paramlist {
  width: 100%;
}

body.contentpane table.paramlist td {
  display:    block !important;
  text-align: left !important;
  padding:    0;
  width:      100%;
}

body.contentpane table.paramlist label.desc {
  display:        block;
  font-size:      var(--sbx-font-size-sm);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
  margin-bottom:  var(--sbx-space-xs);
}

body.contentpane table.paramlist input.field.text {
  width:      100% !important;
  box-sizing: border-box;
  max-width:  none !important;
  margin-top: 0;
}

/* a#loginBtn is the AJAX submit trigger — style as primary button */
body.contentpane #loginBtn {
  display:         block;
  width:           100%;
  min-height:      var(--sbx-btn-height);
  padding:         var(--sbx-btn-padding);
  box-sizing:      border-box;
  margin-top:      var(--sbx-space-sm);
  background:      var(--sbx-btn-primary-bg);
  color:           var(--sbx-btn-primary-text) !important;
  border:          none;
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     700;
  line-height:     1;
  text-align:      center;
  text-decoration: none !important;
  cursor:          pointer;
  transition:      background var(--sbx-transition);
}

body.contentpane #loginBtn:hover {
  background: var(--sbx-primary-dark);
  color:      var(--sbx-btn-primary-text) !important;
}

/* ── Logout page ────────────────────────────────────────────────────────── */
.com_user.userLogout .page-content {
  max-width:  480px;
  text-align: center;
  padding:    var(--sbx-space-xl) 0;
}

/* ── Auth system messages ────────────────────────────────────────────────── */
.com_user.userLogin    .message li,
.com_user.userReset    .message li,
.com_user.userRemind   .message li,
.com_user.userRegister .message li {
  font-size: var(--sbx-font-size-sm);
  margin:    0;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 599px) {
  .com_user.userLogin .page-content,
  .com_user.userReset .page-content,
  .com_user.userRemind .page-content {
    max-width: 100%;
  }
}


/* ========================================================================== */
/* 3b. EDIT USER / ACCOUNT PROFILE (com_user.userUser)                        */
/* Scope: .com_user.userUser                                                   */
/* Added: v111 | Refined: v115                                                 */
/* ========================================================================== */

/* ── Username info banner ────────────────────────────────────────────────── */
.com_user.userUser #infoPane {
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-sm);
  padding:       var(--sbx-space-xs) var(--sbx-space-md);
  margin-bottom: var(--sbx-space-lg);
}

.com_user.userUser .compDesc-content {
  display:     flex;
  align-items: baseline;
  gap:         var(--sbx-space-xs);
}

.com_user.userUser .compDesc-content span {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  font-weight: 500;
}

.com_user.userUser .compDesc-content h2 {
  font-size:   var(--sbx-font-size-base);
  font-weight: 600;
  color:       var(--sbx-text-body);
  margin:      0;
}

/* ── Layout: email + photo rows span full width ──────────────────────────── */
/*
 * soapbox-bootstrap.min.css sets li.leftHalf { width:47%!important; float:left!important }.
 * Email (li#usr-email) and Photo (li:has(.uploaded)) should always span full
 * width. !important required to beat soapbox-bootstrap.
 */
.com_user.userUser li#usr-email,
.com_user.userUser li:has(.uploaded) {
  float:  none !important;
  clear:  both !important;
  width:  100% !important;
}

/* Hide float-clearfix spacer row — not needed when floated rows are cleared */
.com_user.userUser li.liClear {
  display: none;
}

/* ── Avatar: circular, 96px, suppress Bootstrap img-thumbnail chrome ─────── */
/*
 * Component injects <style>.avatar_thumbnail { width: 200px }</style> (specificity
 * 0,0,1,0). Our selector (.com_user.userUser img.avatar_thumbnail) is 0,0,3,1 —
 * wins by specificity without !important for most properties.
 * soapbox-bootstrap .img-thumbnail adds padding + border (0,0,1,0) — beaten.
 * soapbox-responsive-bootstrap img { height: auto !important } — the !important
 * wins regardless of specificity; height: 96px !important is required to override.
 * Global div.uploaded rule (Phase 8 upload field) adds border + overflow:hidden
 * for card-style previews — overridden here since avatar uses circle, not card.
 */
.com_user.userUser .uploaded {
  position:      relative;
  display:       inline-block;
  margin-top:    var(--sbx-space-sm);
  border:        none;
  overflow:      visible;
  border-radius: 0;
}

.com_user.userUser img.avatar_thumbnail {
  width:         96px;
  height:        96px !important;  /* soapbox-responsive-bootstrap: img{height:auto!important} */
  border-radius: 50%;
  object-fit:    cover;
  display:       block;
  padding:       0;
  border:        3px solid var(--sbx-surface);
  box-shadow:    0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Delete avatar: circular × button, top-right of avatar ──────────────── */
.com_user.userUser .avatar-delete {
  position:        absolute;
  top:             -8px;
  right:           -8px;
  width:           28px;
  height:          28px;
  border-radius:   50%;
  background:      var(--sbx-surface);
  border:          1.5px solid var(--sbx-border-color);
  box-shadow:      0 1px 3px rgba(0, 0, 0, 0.12);
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  font-size:       0;           /* hide raw 'x' text from DOM */
  line-height:     1;
  cursor:          pointer;
  text-decoration: none;
  transition:      background   var(--sbx-motion-fast) var(--sbx-motion-ease),
                   border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.com_user.userUser .avatar-delete::after {
  content:     '\f00d';       /* fa-times */
  font-family: FontAwesome;
  font-size:   0.75rem;       /* 12px — readable without being heavy */
  color:       var(--sbx-text-muted);
  line-height: 1;
  transition:  color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.com_user.userUser .avatar-delete:hover {
  background:   var(--sbx-error-bg);
  border-color: var(--sbx-error);
}

.com_user.userUser .avatar-delete:hover::after {
  color: var(--sbx-error);
}

.com_user.userUser .avatar-delete:focus-visible {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

/* Bootstrap 2 .hide { display:none } has lower specificity — re-assert hidden state */
.com_user.userUser .avatar-delete.hide {
  display: none;
}

/* ── No-avatar fallback: JS-injected initials span ───────────────────────── */
/*
 * JS patch detects img.avatar_thumbnail with same-origin src (broken, e.g. src="/")
 * and injects <span class="sbx-avatar-initials">AB</span> into .uploaded.
 * Initials are first char of firstname + lastname fields; fallback to 2 chars of username.
 * Same circle dimensions and neutral colors as portalmenu/nav avatar.
 */
.com_user.userUser .sbx-avatar-initials {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           96px;
  height:          96px;
  border-radius:   50%;
  /* neutral circle — no exact token, raw values intentional (matches nav profile avatar) */
  background:      rgb(240, 240, 240);
  border:          1px solid #dddddd;
  font-size:       1.5rem;
  font-weight:     600;
  color:           var(--sbx-text-muted);
  letter-spacing:  0.02em;
  user-select:     none;
}

/* ── Upload Photo: stacked above avatar in column layout ─────────────────── */
/*
 * DOM order: .btn-cloudinary → hidden widget btn → .uploaded (avatar).
 * Column flex with order reversal places avatar first (visible above button).
 * Scoped to the photo row only to avoid touching other .cntr elements.
 */
.com_user.userUser li:has(.uploaded) .cntr {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--sbx-space-sm);
}

.com_user.userUser li:has(.uploaded) .cntr .uploaded         { order: 0; }
.com_user.userUser li:has(.uploaded) .cntr .btn-cloudinary   { order: 1; }
.com_user.userUser li:has(.uploaded) .cntr #upload_widget_opener { order: 2; }

/* ── Section heading: label-style, overrides Phase 3a muted-hint default ─── */
/*
 * Phase 3a (.com_user .compSect-title h3) uses font-size-sm/500/muted for Login,
 * where section headings are intentionally de-emphasized hints. Edit User has a
 * multi-field form where "Registration Information" needs to read as a clear
 * section divider — uppercase tracking + thin separator line.
 */
.com_user.userUser .compSect-title {
  border-bottom:  1px solid var(--sbx-border-subtle);
  padding-bottom: var(--sbx-space-xs);
  margin-bottom:  var(--sbx-space-md);
}

.com_user.userUser .compSect-title h3 {
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── Required text below Save button ────────────────────────────────────── */
.com_user.userUser li.buttons {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--sbx-space-sm);
}

/* soapbox-bootstrap: ul.compList span.req { color:red!important } — need !important to override */
.com_user.userUser span#reqLine {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 400 !important;
  color:       var(--sbx-text-muted) !important;
}

/* ── Mobile: all fields stack single-column ──────────────────────────────── */
@media (max-width: 599px) {
  .com_user.userUser li.leftHalf,
  .com_user.userUser li.rightHalf {
    float:         none !important;
    clear:         none !important;
    width:         100% !important;
    margin-bottom: var(--sbx-space-md);
  }
}


/* ========================================================================== */
/* 4. FORMS (com_jsfsubmit)                                                   */
/* Scope: .com_jsfsubmit                                                      */
/* v97 baseline: multi-select, radio inline, readonly, Select btn, date icon  */
/* ========================================================================== */

/* Intro / outro text blocks */
.com_jsfsubmit .jsfsubmit-intro .compDesc-content,
.com_jsfsubmit .jsfsubmit-outro .compDesc-content {
  font-size:   var(--sbx-font-size-lg);
  color:       var(--sbx-text-muted);
  line-height: 1.65;
}

.com_jsfsubmit .jsfsubmit-intro {
  margin-bottom: var(--sbx-space-lg);
}

.com_jsfsubmit .jsfsubmit-outro {
  margin-top: var(--sbx-space-xl);
}

/* Form wrapper */
.com_jsfsubmit .compSect-wrap.jsfsubmitForm {
  margin-bottom: 0;
}

/* Submit button area */
.com_jsfsubmit .section-formactions.jsfsubmitBtns {
  margin-top: var(--sbx-space-lg);
}

/* Min-width so short labels like "Save" render as a real CTA */
.com_jsfsubmit button.btn-submit {
  min-width: 120px;
}

/* !important needed: soapboxTypography em cascade overrides rem token here */
.com_jsfsubmit li.requiredtext,
.com_jsfsubmit .requiredtext .req {
  font-size: var(--sbx-font-size-sm) !important;
  color:     var(--sbx-text-muted);
}

/* Required text below submit button */
.com_jsfsubmit ul.compList-btns {
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--sbx-space-sm);
}

/* global select.field rule caps height at 48px; release it for multi-select */
.com_jsfsubmit select[multiple].field {
  height:         auto;
  min-height:     9rem;
  padding-top:    var(--sbx-space-sm);
  padding-bottom: var(--sbx-space-sm);
}

/* Campaign Lookup readonly display field — muted to distinguish from editable */
.com_jsfsubmit input[readonly].field {
  background: var(--sbx-surface-alt);
  color:      var(--sbx-text-muted);
  cursor:     default;
}

/* Campaign Lookup: field + button on same inline row */
.com_jsfsubmit .cntr:has(span.btn) {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
}
.com_jsfsubmit .cntr:has(span.btn) input.field {
  flex: 1;
}
/* Neutralize Bootstrap .btn visual treatment — the a.modal child owns all visuals */
.com_jsfsubmit .cntr span.btn {
  flex:             0 0 auto;
  display:          inline-flex;
  align-items:      center;
  padding:          0;
  background:       transparent !important;
  background-image: none !important;
  border:           none !important;
  box-shadow:       none !important;
  text-shadow:      none;
  height:           auto;
  line-height:      1;
}
.com_jsfsubmit .cntr span.btn a {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  height:          var(--sbx-input-height);
  padding:         0 var(--sbx-space-md);
  font-size:       var(--sbx-font-size-btn);
  font-weight:     600;
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  text-decoration: none;
  white-space:     nowrap;
  transition:      background  var(--sbx-motion-fast) var(--sbx-motion-ease),
                   color       var(--sbx-motion-fast) var(--sbx-motion-ease),
                   border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_jsfsubmit .cntr span.btn a:hover {
  background:   var(--sbx-primary-pale);
  color:        var(--sbx-primary-dark);
  border-color: var(--sbx-primary-dark);
}
.com_jsfsubmit .cntr span.btn a:focus-visible {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}
.com_jsfsubmit .cntr span.btn a:active {
  background:   var(--sbx-primary);
  color:        var(--sbx-text-on-primary);
  border-color: var(--sbx-primary);
}

/* Radio inline group — notStacked li: choices flow horizontally */
.com_jsfsubmit li.notStacked .cntr {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  align-items: center;
}
.com_jsfsubmit li.notStacked .span-block {
  display:     inline-flex;
  align-items: center;
  gap:         var(--sbx-space-xs);
}

/* Checkbox span-block: fill the flex cntr so the toggle label has full width */
.com_jsfsubmit .span-block:has(input[type="checkbox"].field.checkbox) {
  display: block;
  width:   100%;
}

/* Checkbox field → toggle (Phase 12 sibling pattern) */
.com_jsfsubmit input[type="checkbox"].field.checkbox {
  position: absolute;
  opacity:  0;
  width:    1px;
  height:   1px;
  margin:   0;
}
.com_jsfsubmit input[type="checkbox"].field.checkbox + label.choice {
  position:    relative;
  display:     flex;
  align-items: center;
  padding-left: 52px;
  min-height:   26px;
  margin-bottom: 0;
  cursor:       pointer;
  user-select:  none;
}
.com_jsfsubmit input[type="checkbox"].field.checkbox + label.choice::before {
  content:          '';
  position:         absolute;
  left:             0;
  top:              50%;
  transform:        translateY(-50%);
  width:            40px;
  height:           24px;
  border-radius:    12px;
  background:       var(--sbx-surface-control);
  border:           1.5px solid var(--sbx-border-strong);
  transition:       background var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_jsfsubmit input[type="checkbox"].field.checkbox + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0,0,0,0.15);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_jsfsubmit input[type="checkbox"].field.checkbox:checked + label.choice::before {
  background:  var(--sbx-primary);
  border-color: var(--sbx-primary-dark);
}
.com_jsfsubmit input[type="checkbox"].field.checkbox:checked + label.choice::after {
  left: 19px;
}

/* Date/datetime: flex on li so label gets full row, input+icon share the next */
.com_jsfsubmit li:has(img.calendar) {
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
}
.com_jsfsubmit li:has(img.calendar) > label.desc {
  flex: 0 0 100%;
}
.com_jsfsubmit li:has(img.calendar) > .span-block:has(input) {
  flex: 1;
}
.com_jsfsubmit li:has(img.calendar) > .span-block:has(img) {
  flex:         0 0 auto;
  display:      flex;
  align-items:  center;
  padding-left: var(--sbx-space-xs);
}
.com_jsfsubmit img.calendar {
  width:   20px;
  height:  20px;
  opacity: 0.5;
  cursor:  pointer;
}

/* -- Forms: success view — Return button + system-message list reset --------
 * Scope: .com_jsfsubmit.jsfsubmit-sbmScs (success page only)
 * a#btnReturn: secondary/outlined button sitting below the compScsMsg-wrap card.
 * dl#system-messageDetail: system message rendered as dl>dd>ul>li inside
 *   .compScsMsg-content; strip default list chrome so message reads as prose.
 */
.com_jsfsubmit.jsfsubmit-sbmScs #system-messageDetail {
  margin:  0;
  padding: 0;
}

.com_jsfsubmit.jsfsubmit-sbmScs #system-messageDetail ul {
  list-style: none;
  margin:     0;
  padding:    0;
}

.com_jsfsubmit.jsfsubmit-sbmScs #system-messageDetail li.details {
  margin:  0;
  padding: 0;
}

.com_jsfsubmit.jsfsubmit-sbmScs #btnReturn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-space-sm) var(--sbx-space-lg);
  margin-top:      var(--sbx-space-lg);
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-base);
  font-weight:     600;
  text-decoration: none;
  cursor:          pointer;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.com_jsfsubmit.jsfsubmit-sbmScs #btnReturn:hover,
.com_jsfsubmit.jsfsubmit-sbmScs #btnReturn:focus-visible {
  background: var(--sbx-primary);
  color:      var(--sbx-btn-primary-text) !important;
}


/* ========================================================================== */
/* 5. DIRECTORIES (com_jsfsearch)                                             */
/* Scope: .com_jsfSearch                                                      */
/* ========================================================================== */

/* Intro / outro text */
.com_jsfSearch .compDesc-content {
  font-size:   var(--sbx-font-size-lg);
  color:       var(--sbx-text-muted);
  line-height: 1.65;
}

/* Intro / outro wrapper spacing */
.com_jsfSearch .srchDesc-intro {
  margin-bottom: var(--sbx-space-lg);
}
.com_jsfSearch .srchDesc-outro {
  margin-top: var(--sbx-space-xl);
}

/* Search title row: h3 + show/hide link */
.com_jsfSearch .compSect-title {
  margin-bottom: var(--sbx-space-md);
  border-bottom: none;
  padding-left:  0;
}

.com_jsfSearch .compSect-title h3 {
  margin:  0;
  padding: 0;
}

/* Hidden field containers: the CMS emits <span> as direct child of the flex <ul>
 * for type="hidden" inputs. That span becomes a phantom flex item and adds a
 * gap before the first <li>. Remove it from the flex flow. */
.com_jsfSearch ul.compList-formHorz > span {
  display: none;
}

/* Blog results count bar: normalize to match table view count bar style.
 * DOM: h3 > span contains "2330 Results Found" as one string — no totalResults
 * child span exists here, so the span is bolded dark to match visual intent. */
.com_jsfSearch #sectBlog-title {
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
  text-align: left;
}
.com_jsfSearch #sectBlog-title h3 {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 400;
  color:       var(--sbx-text-muted);
  margin:      0;
}
.com_jsfSearch #sectBlog-title h3 span {
  font-weight: 700;
  color:       var(--sbx-text-body);
}

/* Show/Hide toggle link */
.com_jsfSearch #form_toggle a {
  font-size:       var(--sbx-font-size-sm);
  color:           var(--sbx-primary);
  text-decoration: none;
  font-weight:     500;
}

.com_jsfSearch #form_toggle a:hover {
  text-decoration: underline;
}

/* Horizontal form (search filters) -- field items inline.
 * align-items: stretch so all items in a row fill the tallest item's height.
 * Each li is a column-flex so its label sits at top and its cntr fills remaining height.
 * The cntr then centers its input/options vertically. */
.com_jsfSearch .compList-formHorz {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  align-items: stretch;
}

.com_jsfSearch .compList-formHorz > li {
  display:        flex;
  flex-direction: column;
  margin-bottom:  0;
  flex-shrink:    0;
}

.com_jsfSearch .compList-formHorz > li .cntr {
  flex:        1;
  display:     flex;
  align-items: center;
}

/* Date field: two sibling span-block elements (input + calendar img) are direct li
 * children with no .cntr wrapper. Restore row layout so icon stays right of the input. */
.com_jsfSearch .compList-formHorz > li:has(img.calendar) {
  flex-direction: row;
  flex-wrap:      wrap;
  align-items:    center;
}

.com_jsfSearch .compList-formHorz > li:has(img.calendar) > label.desc {
  flex: 0 0 100%;
}

.com_jsfSearch .compList-formHorz > li:has(img.calendar) > .span-block:has(input) {
  flex: 1;
}

.com_jsfSearch .compList-formHorz > li:has(img.calendar) > .span-block:has(img.calendar) {
  flex:        0 0 auto;
  display:     flex;
  align-items: center;
  padding-left: var(--sbx-space-xs);
}

/* Search/Reset/Cancel buttons: own row below fields, aligned left */
.com_jsfSearch li#liFilterBtns {
  flex:           0 0 100%;
  display:        flex;
  flex-direction: row;
  flex-wrap:      wrap;
  gap:            var(--sbx-space-sm);
  align-items:    center;
  padding-top:    var(--sbx-space-md);
}

/* Search button: onClick (no type=submit), bypasses Phase 3 primary button rule */
.com_jsfSearch #btnSearch {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-space-sm) var(--sbx-space-lg);
  background:      var(--sbx-primary);
  color:           var(--sbx-btn-primary-text);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-base);
  font-weight:     600;
  cursor:          pointer;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition);
}

.com_jsfSearch #btnSearch:hover,
.com_jsfSearch #btnSearch:focus-visible {
  background:   var(--sbx-primary-dark);
  border-color: var(--sbx-primary-dark);
  color:        var(--sbx-btn-primary-text);
}

/* Reset / Start Over buttons */
.com_jsfSearch a#btnReset,
.com_jsfSearch a#btnCancel {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-space-sm) var(--sbx-space-lg);
  background:      transparent;
  color:           var(--sbx-primary) !important;
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-base);
  font-weight:     600;
  text-decoration: none !important;
  cursor:          pointer;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.com_jsfSearch a#btnReset:hover,
.com_jsfSearch a#btnReset:focus-visible,
.com_jsfSearch a#btnCancel:hover,
.com_jsfSearch a#btnCancel:focus-visible {
  background: var(--sbx-primary);
  color:      var(--sbx-btn-primary-text) !important;
}

/* Results count bar */
.com_jsfSearch .compResPDFilter-wrap {
  margin-bottom: var(--sbx-space-xs);
  padding:       0;
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-muted);
  text-align:    left;
}

.com_jsfSearch span.totalResults {
  font-weight: 700;
  color:       var(--sbx-text-body);
}

/* Sort bar */
.com_jsfSearch .compSortBar-wrap {
  margin-bottom: var(--sbx-space-md);
}

.com_jsfSearch .csb-sort {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
  font-size:   var(--sbx-font-size-sm);
}

.com_jsfSearch .csb-sort .desc {
  color:       var(--sbx-text-muted);
  font-weight: 500;
}

.com_jsfSearch ul.csb-sortList {
  display:    flex;
  flex-wrap:  wrap;
  gap:        var(--sbx-space-xs);
  list-style: none;
  margin:     0;
  padding:    0;
}

.com_jsfSearch ul.csb-sortList li {
  margin:     0;
  background: none;
  padding:    0;
}

.com_jsfSearch ul.csb-sortList li a {
  display:         inline-block;
  padding:         2px var(--sbx-space-sm);
  font-size:       var(--sbx-font-size-sm);
  color:           var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  text-decoration: none;
}

.com_jsfSearch ul.csb-sortList li.active a,
.com_jsfSearch ul.csb-sortList li a:hover {
  background: var(--sbx-surface-alt);
  color:      var(--sbx-text-body);
}

/* -- SEARCH FORM FIELD TYPES ------------------------------------------------ */

/* Checkbox → sliding toggle (mirrors Phase 12 .com_jsfsubmit pattern) */
.com_jsfSearch .span-block:has(input[type="checkbox"].field.checkbox) {
  display: block;
  width:   100%;
}
.com_jsfSearch input[type="checkbox"].field.checkbox {
  position: absolute;
  opacity:  0;
  width:    1px;
  height:   1px;
  margin:   0;
}
.com_jsfSearch input[type="checkbox"].field.checkbox + label.choice {
  position:    relative;
  display:     flex !important;
  align-items: center;
  padding-left: 52px;
  min-height:  26px;
  margin:      0 !important;
  cursor:      pointer;
  user-select: none;
}
.com_jsfSearch input[type="checkbox"].field.checkbox + label.choice::before {
  content:       '';
  position:      absolute;
  left:          0;
  top:           50%;
  transform:     translateY(-50%);
  width:         40px;
  height:        24px;
  border-radius: 12px;
  background:    var(--sbx-surface-control);
  border:        1.5px solid var(--sbx-border-strong);
  transition:    background var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_jsfSearch input[type="checkbox"].field.checkbox + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0,0,0,0.15);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}
.com_jsfSearch input[type="checkbox"].field.checkbox:checked + label.choice::before {
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary-dark);
}
.com_jsfSearch input[type="checkbox"].field.checkbox:checked + label.choice::after {
  left: 19px;
}

/* Radio notStacked: horizontal layout (mirrors .com_sbxEvents pattern) */
.com_jsfSearch li.notStacked .cntr {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-md);
  align-items: center;
}
.com_jsfSearch li.notStacked .span-block {
  display:     inline-flex !important;
  align-items: center;
  gap:         var(--sbx-space-xs);
  width:       auto !important;
}
.com_jsfSearch li.notStacked .span-block label.choice {
  margin:         0 !important;
  width:          auto !important;
  padding-bottom: 0;
}

/* -- LIST VIEW (blog layout) ------------------------------------------------
 * .record-container replaces the dead .jsfSearchResults .contentpaneopen rule
 * (.jsfSearchResults class does not exist in the real DOM)
 */

.com_jsfSearch .record-container {
  position:       relative;
  padding-bottom: var(--sbx-space-md);
  margin-bottom:  var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
}

.com_jsfSearch .record-container:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

/* article_separator: border-bottom on .record-container serves this role */
.com_jsfSearch .item-separator {
  display: none;
}

/* Group-by heading */
.com_jsfSearch .groupby-container h2.contentheading {
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
  margin-bottom:  var(--sbx-space-xs);
}

.com_jsfSearch .groupby-container .element-label { display: none; }

.com_jsfSearch .groupby-container a.groupby-link {
  color:           var(--sbx-text-muted);
  text-decoration: none;
}

/* Record title — right padding reserves space for the admin edit button */
.com_jsfSearch .record-container .title-container h2.contentheading {
  font-family:   var(--sbx-font-heading);
  font-size:     var(--sbx-font-size-h3);
  font-weight:   700;
  line-height:   1.3;
  margin-bottom: var(--sbx-space-xs);
  padding-right: 90px;
}

.com_jsfSearch .record-container .title-container .element-label {
  display: none;
}

.com_jsfSearch .record-container .title-container a.title-link,
.com_jsfSearch .record-container .title-container a.title-link:visited {
  color:           var(--sbx-text-body);
  text-decoration: none;
}

.com_jsfSearch .record-container .title-container a.title-link:hover {
  color:           var(--sbx-primary);
  text-decoration: none;
}

/* Record subtitle */
.com_jsfSearch .record-container .subtitle-container {
  margin-bottom: var(--sbx-space-xs);
}

.com_jsfSearch .record-container .subtitle-container .element-label {
  display: none;
}

.com_jsfSearch .record-container .subcontentheading {
  font-size:  var(--sbx-font-size-base);
  color:      var(--sbx-text-muted);
  line-height: 1.5;
}

.com_jsfSearch .record-container a.subtitle-link {
  color:           var(--sbx-text-muted);
  text-decoration: none;
}

/* Record meta line */
.com_jsfSearch .record-container .meta-container {
  margin-bottom: var(--sbx-space-sm);
}

.com_jsfSearch .record-container .meta-container .element-label {
  font-size:      var(--sbx-font-size-label);
  color:          var(--sbx-text-muted);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.com_jsfSearch .record-container .meta-container .element-data {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-body);
  font-weight: 600;
}

.com_jsfSearch .record-container a.meta-link {
  color:           var(--sbx-primary);
  text-decoration: none;
}

.com_jsfSearch .record-container a.meta-link:hover {
  text-decoration: underline;
}

/* Record intro */
.com_jsfSearch .record-container .introduction-container {
  font-size:     var(--sbx-font-size-base);
  color:         var(--sbx-text-body);
  line-height:   1.6;
  margin-bottom: var(--sbx-space-sm);
}

.com_jsfSearch .record-container .introduction-container .element-label {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
  margin-top:     var(--sbx-space-xs);
  margin-bottom:  2px;
}

.com_jsfSearch .record-container .introduction-container .element-data {
  font-size: var(--sbx-font-size-base);
  color:     var(--sbx-text-body);
}

/* When a view position field is linked (introduction-link wraps element-data),
 * the explicit color on .element-data blocks inheritance from the <a>. Restore it. */
.com_jsfSearch .record-container a.introduction-link .element-data {
  color: inherit;
}

.com_jsfSearch .record-container a.introduction-link {
  color:           var(--sbx-primary) !important;
  text-decoration: underline;
}

.com_jsfSearch.jsfSearch-detail .element-data a {
  color:           var(--sbx-primary) !important;
  text-decoration: underline;
}

/* View Details readmore link */
.com_jsfSearch a.record-readmore-link {
  display:         inline-flex;
  align-items:     center;
  margin-top:      var(--sbx-space-sm);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  color:           var(--sbx-primary);
  text-decoration: none;
  font-family:     var(--sbx-font-ui);
}

.com_jsfSearch a.record-readmore-link:hover {
  text-decoration: underline;
}

.com_jsfSearch a.record-readmore-link::after {
  content:     ' →';
  margin-left: 2px;
}

/* Blog list edit button: .item-actions contains the actual edit link (admin only).
 * Positioned absolute top-right within record-container (position:relative above).
 * edit-button-container div is always empty — ignore it. */
.com_jsfSearch .edit-button-container {
  display: none;
}

.com_jsfSearch .item-actions {
  position: absolute;
  top:      0;
  right:    0;
  z-index:  2;
}

.com_jsfSearch .item-actions .ia a.ia-link,
.com_jsfSearch .item-actions .ia a.ia-link:visited {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-btn-padding-sm);
  min-height:      var(--sbx-btn-height-sm);
  line-height:     1;
  background:      transparent;
  color:           var(--sbx-primary) !important;
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  text-decoration: none !important;
  text-transform:  capitalize;
  white-space:     nowrap;
  cursor:          pointer;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.com_jsfSearch .item-actions .ia a.ia-link:hover {
  background: var(--sbx-primary);
  color:      var(--sbx-btn-primary-text) !important;
}

/* -- TABLE VIEW ------------------------------------------------------------- */

.com_jsfSearch .compResTbl-content {
  overflow-x:                 auto;
  -webkit-overflow-scrolling: touch;
}

.com_jsfSearch table.resultsTBL {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-base);
}

/* Canonical table header — uppercase, muted, surface-alt, 13px */
.com_jsfSearch table.resultsTBL thead th {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-family:    var(--sbx-font-ui);
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align:     left;
  white-space:    nowrap;
  border-bottom:  2px solid var(--sbx-border-color);
}

/* Expander and edit header cells — minimal width */
.com_jsfSearch table.resultsTBL th.item-expander,
.com_jsfSearch table.resultsTBL th.item-edit {
  width:   1%;
  padding: var(--sbx-space-sm);
}

/* Primary data rows */
.com_jsfSearch table.resultsTBL tr.tr-primary {
  border-bottom: 1px solid var(--sbx-border-subtle);
  transition:    background var(--sbx-transition);
}

.com_jsfSearch table.resultsTBL tr.tr-primary:hover {
  background: var(--sbx-surface-muted);
  cursor:     pointer;
}

.com_jsfSearch table.resultsTBL tr.tr-primary td {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  vertical-align: middle;
  color:          var(--sbx-text-body);
  font-size:      var(--sbx-font-size-base);
}

/* Expander toggle cell */
.com_jsfSearch table.resultsTBL td.item-expander {
  width:       1%;
  padding:     var(--sbx-space-sm);
  text-align:  center;
  white-space: nowrap;
}

.com_jsfSearch table.resultsTBL a.item-toggle {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           1.5rem;
  height:          1.5rem;
  border-radius:   50%;
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-border-color);
  font-size:       0.875rem;
  font-weight:     700;
  text-decoration: none !important;
  transition:      background var(--sbx-transition), color var(--sbx-transition),
                   border-color var(--sbx-transition);
}

.com_jsfSearch table.resultsTBL a.item-toggle:hover {
  background:   transparent;
  color:        var(--sbx-primary) !important;
  border-color: var(--sbx-primary);
}

.com_jsfSearch table.resultsTBL a.item-toggle.tr-active {
  background:   var(--sbx-primary);
  color:        var(--sbx-btn-primary-text) !important;
  border-color: var(--sbx-primary);
}

/* Plus/minus glyphs on <i> tags emitted by grid.tpl.new.php */
.com_jsfSearch table.resultsTBL i.icon-plus::before {
  content:    '+';
  font-style: normal;
}

.com_jsfSearch table.resultsTBL i.icon-minus::before {
  content:    '−';
  font-style: normal;
}

.com_jsfSearch table.resultsTBL i.icon-none {
  display: none;
}

/* Edit column */
.com_jsfSearch table.resultsTBL td.item-edit-column {
  width:       1%;
  padding:     var(--sbx-space-sm);
  white-space: nowrap;
}

/* Expandable detail row — JS (jQuery) controls display; CSS must not set display:none */
.com_jsfSearch table.resultsTBL tr.tr-secondary.tr-inwell {
  background: var(--sbx-surface-muted);
}

.com_jsfSearch table.resultsTBL tr.tr-secondary.tr-inwell td.item-details {
  padding:       0;
  border-bottom: 1px solid var(--sbx-border-color);
}

/* Detail inwell */
.com_jsfSearch .well.well-details {
  padding:    var(--sbx-space-lg);
  background: var(--sbx-surface-muted);
  border-top: 1px solid var(--sbx-border-subtle);
}

/* Details columns: side-by-side on desktop */
.com_jsfSearch .details-grid-row {
  display: flex;
  gap:     var(--sbx-space-xl);
}

.com_jsfSearch .details-col {
  flex: 1 1 40%;
}

/*
 * Collapse empty detail columns so the first populated column aligns left.
 *
 * The app renders a .details-col-inner > .element > .element-data wrapper
 * for every configured detail position, even when the underlying Salesforce
 * field has no data. An empty column is identifiable by the absence of any
 * .element-label — that element is only emitted when a field has a value.
 * Hiding the empty column lets the remaining flex item(s) expand to fill
 * the full row width instead of starting at the 50% mark.
 *
 * Edge case: if a field is deliberately configured with its label hidden in
 * the Directories admin, .element-label will be absent even when data is
 * present, and this rule will incorrectly hide that column. In that scenario,
 * scope the fix more narrowly or resolve the layout at the data-config level.
 */
.com_jsfSearch .details-col:not(:has(.element-label)) {
  display: none;
}

.com_jsfSearch .well.well-details .element {
  display:       flex;
  gap:           var(--sbx-space-sm);
  align-items:   baseline;
  margin-bottom: var(--sbx-space-xs);
}

.com_jsfSearch .well.well-details .element:last-child {
  margin-bottom: 0;
}

.com_jsfSearch .well.well-details .element-label {
  flex:           0 0 35%;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.com_jsfSearch .well.well-details .element-data {
  flex:      1;
  font-size: var(--sbx-font-size-base);
  color:     var(--sbx-text-body);
}

/* Read more link inside inwell */
.com_jsfSearch .well.well-details a.readon.item-readon {
  display:         block;
  width:           fit-content;
  margin:          var(--sbx-space-md) auto 0;
  padding:         var(--sbx-space-sm) var(--sbx-space-lg);
  background:      transparent;
  color:           var(--sbx-primary);
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  text-decoration: none;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.com_jsfSearch .well.well-details a.readon.item-readon:hover {
  background: var(--sbx-primary);
  color:      var(--sbx-btn-primary-text) !important;
}

/* -- DETAIL VIEW ------------------------------------------------------------ */

/* Edit nav bar */
.com_jsfSearch.jsfSearch-detail .compNavBar-wrap {
  margin-bottom: var(--sbx-space-md);
  border:        none;
}

.com_jsfSearch.jsfSearch-detail .compNavBar-content ul.navbarmenu {
  display:         flex;
  justify-content: flex-end;
  list-style:      none;
  margin:          0;
  padding:         0;
}

.com_jsfSearch.jsfSearch-detail .compNavBar-content ul.navbarmenu li {
  background: none;
  padding:    0;
  margin:     0;
}

/* Page title */
.com_jsfSearch.jsfSearch-detail h2.contentheading.title-container {
  font-family:   var(--sbx-font-heading);
  font-size:     var(--sbx-font-size-h1);
  font-weight:   700;
  line-height:   1.2;
  margin-bottom: var(--sbx-space-sm);
}

.com_jsfSearch.jsfSearch-detail h2.contentheading.title-container .element-label {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom:  4px;
}

.com_jsfSearch.jsfSearch-detail h2.contentheading.title-container .element-data {
  display: block;
  color:   var(--sbx-text-heading);
}

/* Subtitle */
.com_jsfSearch.jsfSearch-detail .subtitle-container {
  margin-bottom: var(--sbx-space-md);
}

.com_jsfSearch.jsfSearch-detail .subcontentheading {
  font-size:   var(--sbx-font-size-lg);
  color:       var(--sbx-text-muted);
  line-height: 1.5;
}

.com_jsfSearch.jsfSearch-detail .subtitle-container .element-label {
  display: none;
}

/* Meta line (top) */
.com_jsfSearch.jsfSearch-detail .meta-container.metaTop {
  margin-bottom:  var(--sbx-space-md);
  padding-bottom: var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-subtle);
}

.com_jsfSearch.jsfSearch-detail .meta-container .element-label {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  font-weight: 600;
}

.com_jsfSearch.jsfSearch-detail .meta-container .element-data {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-body);
  font-weight: 600;
}

/* Print/email/PDF icon buttons */
.com_jsfSearch.jsfSearch-detail .article-title .buttonheading {
  display:    flex;
  gap:        var(--sbx-space-sm);
  margin-top: var(--sbx-space-xs);
}

/* PDF icon button: mirror the global btnPrint/btnEmail pattern (lines 3671–3701).
 * Hide the png image and replace with a styled <a> + ::after glyph. */
.buttonheading span.btnPdf img {
  display: none;
}

.buttonheading span.btnPdf a {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  width:            28px;
  height:           28px;
  color:            var(--sbx-text-muted) !important;
  text-decoration:  none !important;
  border:           1px solid var(--sbx-border-color);
  border-radius:    var(--sbx-radius-sm);
  background:       var(--sbx-surface);
  font-size:        9px;
  font-weight:      700;
  font-family:      var(--sbx-font-ui);
  letter-spacing:   0.03em;
  line-height:      1;
  transition:       color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    background-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.buttonheading span.btnPdf a:hover {
  color:            var(--sbx-error) !important;
  border-color:     var(--sbx-error);
  background-color: var(--sbx-error-bg);
}

.buttonheading span.btnPdf a::after {
  content: 'PDF';
}

/* Edit link: secondary button style */
.com_jsfSearch.jsfSearch-detail li.nbEdit a.ia-link {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sbx-btn-padding-sm);
  min-height:      var(--sbx-btn-height-sm);
  line-height:     1;
  background:      transparent;
  color:           var(--sbx-primary) !important;
  border:          1.5px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  text-transform:  capitalize;
  text-decoration: none !important;
  cursor:          pointer;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.com_jsfSearch.jsfSearch-detail li.nbEdit a.ia-link:hover {
  background: var(--sbx-primary);
  color:      var(--sbx-btn-primary-text) !important;
}

/* Intro position */
.com_jsfSearch.jsfSearch-detail .pos-intro {
  margin-bottom: var(--sbx-space-lg);
}

.com_jsfSearch.jsfSearch-detail .pos-intro .element-label {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
  margin-bottom:  var(--sbx-space-xs);
}

.com_jsfSearch.jsfSearch-detail .pos-intro .element-data {
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-body);
  line-height: 1.65;
}

/* Attributes position (ul.attribs-list.threeColumns) — CSS Grid */
.com_jsfSearch.jsfSearch-detail .pos-attribs {
  margin-bottom: var(--sbx-space-xl);
}

.com_jsfSearch.jsfSearch-detail ul.attribs-list {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   var(--sbx-space-md) var(--sbx-space-lg);
  list-style:            none;
  margin:                0;
  padding:               0;
}

.com_jsfSearch.jsfSearch-detail ul.attribs-list li.element {
  background: none;
  padding:    0;
  margin:     0;
}

.com_jsfSearch.jsfSearch-detail ul.attribs-list span.element-label,
.com_jsfSearch.jsfSearch-detail ul.attribs-list span.attrib-title {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom:  2px;
}

.com_jsfSearch.jsfSearch-detail ul.attribs-list span.element-data,
.com_jsfSearch.jsfSearch-detail ul.attribs-list span.attrib {
  display:     block;
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-body);
  font-weight: 500;
}

/* Table position (canonical definition table) */
.com_jsfSearch.jsfSearch-detail .pos-table {
  margin-bottom: var(--sbx-space-xl);
}

.com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-base);
}

.com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL tr.element {
  border-bottom: 1px solid var(--sbx-border-subtle);
}

.com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL tr.element:last-child {
  border-bottom: none;
}

.com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL td.element-label {
  padding:        var(--sbx-space-sm) var(--sbx-space-md) var(--sbx-space-sm) 0;
  width:          35%;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: top;
  white-space:    nowrap;
}

.com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL td.element-data {
  padding:        var(--sbx-space-sm) 0;
  font-size:      var(--sbx-font-size-base);
  color:          var(--sbx-text-body);
  vertical-align: top;
}

/* Description position (contains inset sidebar) */
.com_jsfSearch.jsfSearch-detail .pos-desc {
  margin-bottom: var(--sbx-space-xl);
}

/* Inset sidebar — floats right inside .pos-desc */
.com_jsfSearch.jsfSearch-detail .pos-inset {
  float:         right;
  clear:         right;
  width:         32%;
  margin:        0 0 var(--sbx-space-lg) var(--sbx-space-xl);
  padding:       var(--sbx-space-md);
  background:    var(--sbx-surface-muted);
  border:        1.5px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
}

.com_jsfSearch.jsfSearch-detail .pos-inset .element-label {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom:  var(--sbx-space-xs);
}

.com_jsfSearch.jsfSearch-detail .pos-inset .element-data {
  font-size: var(--sbx-font-size-base);
  color:     var(--sbx-text-body);
}

/* Description field */
.com_jsfSearch.jsfSearch-detail #description-position .element-label {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom:  var(--sbx-space-xs);
}

.com_jsfSearch.jsfSearch-detail #description-position .element-data {
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-body);
  line-height: 1.65;
}

/* Clearfix after .pos-inset float */
.com_jsfSearch.jsfSearch-detail .pos-desc::after {
  content: '';
  display: table;
  clear:   both;
}

/* Bottom position */
.com_jsfSearch.jsfSearch-detail .pos-bot {
  margin-top:    var(--sbx-space-xl);
  padding-top:   var(--sbx-space-lg);
  border-top:    1px solid var(--sbx-border-subtle);
  margin-bottom: var(--sbx-space-xl);
}

.com_jsfSearch.jsfSearch-detail .pos-bot .element-label {
  display:        block;
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom:  var(--sbx-space-xs);
}

.com_jsfSearch.jsfSearch-detail .pos-bot .element-data {
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-body);
  line-height: 1.65;
}

/* -- PAGINATION (shared: list view + table view) ----------------------------- */

.com_jsfSearch .compResNav-wrap {
  margin-top: var(--sbx-space-lg);
}

.com_jsfSearch .compResNavPgr-content ul.pagination {
  display:    flex;
  flex-wrap:  wrap;
  gap:        4px;
  list-style: none;
  margin:     0;
  padding:    0;
  border-top: none;
}

.com_jsfSearch .compResNavPgr-content ul.pagination li {
  margin:     0;
  padding:    0;
  background: none;
}

.com_jsfSearch .compResNavPgr-content ul.pagination li a,
.com_jsfSearch .compResNavPgr-content ul.pagination li span {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-width:       2rem;
  height:          2rem;
  padding:         0 var(--sbx-space-sm);
  background:      var(--sbx-surface-alt);
  color:           var(--sbx-text-body);
  border-radius:   var(--sbx-radius-btn);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     500;
  text-decoration: none;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.com_jsfSearch .compResNavPgr-content ul.pagination li a:hover {
  background: var(--sbx-primary);
  color:      var(--sbx-btn-primary-text) !important;
}

.com_jsfSearch .compResNavPgr-content ul.pagination li.active a,
.com_jsfSearch .compResNavPgr-content ul.pagination li.active span {
  background:  var(--sbx-primary);
  color:       var(--sbx-btn-primary-text) !important;
  font-weight: 700;
}

/* Directories paginates with li > strong > a for ALL clickable links (not just active).
 * The global ul.pagination li strong a rule sets white text + primary bg for the
 * "active page" pattern — override here so navigable links render as normal buttons. */
.com_jsfSearch .compResNavPgr-content ul.pagination li strong a {
  background:   var(--sbx-surface-alt) !important;
  border-color: transparent !important;
  color:        var(--sbx-text-body) !important;
  font-weight:  500;
  cursor:       pointer;
}

.com_jsfSearch .compResNavPgr-content ul.pagination li strong a:hover {
  background: var(--sbx-primary) !important;
  color:      var(--sbx-btn-primary-text) !important;
}

.com_jsfSearch .compResNavCtr-wrap {
  margin-top: var(--sbx-space-sm);
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
}

/* -- RESPONSIVE ------------------------------------------------------------- */

@media (max-width: 768px) {
  /* Search form: stack fields vertically */
  .com_jsfSearch .compList-formHorz {
    flex-direction: column;
    align-items:    stretch;
  }

  .com_jsfSearch .compList-formHorz > li {
    flex:  1 1 100%;
    width: 100%;
  }

  /* Attribs grid: 2 columns */
  .com_jsfSearch.jsfSearch-detail ul.attribs-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Inset: stop floating, full width above description */
  .com_jsfSearch.jsfSearch-detail .pos-inset {
    float:         none;
    width:         100%;
    margin-left:   0;
    margin-bottom: var(--sbx-space-lg);
  }

  /* Table cells: tighter padding on small screens */
  .com_jsfSearch table.resultsTBL thead th,
  .com_jsfSearch table.resultsTBL tr.tr-primary td {
    padding: var(--sbx-space-sm);
  }

  /* Definition table: wider label column to compensate */
  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL td.element-label {
    width: 42%;
  }

  /* Details inwell: stack columns on mobile */
  .com_jsfSearch .details-grid-row {
    flex-direction: column;
    gap:            var(--sbx-space-md);
  }

  /* Inwell element rows: stack label above data on mobile */
  .com_jsfSearch .well.well-details .element {
    flex-direction: column;
    gap:            2px;
  }

  .com_jsfSearch .well.well-details .element-label {
    flex: none;
  }

  /* Blog list: remove title padding-right on mobile — edit button drops below */
  .com_jsfSearch .record-container .title-container h2.contentheading {
    padding-right: 0;
  }

  .com_jsfSearch .item-actions {
    position:   static;
    margin-top: var(--sbx-space-xs);
    text-align: right;
  }
}

@media (max-width: 480px) {
  /* Attribs grid: single column */
  .com_jsfSearch.jsfSearch-detail ul.attribs-list {
    grid-template-columns: 1fr;
  }

  /* Definition table: stack label above value */
  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL,
  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL tbody,
  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL tr.element,
  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL td {
    display: block;
    width:   100%;
  }

  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL td.element-label {
    padding-bottom: 2px;
    white-space:    normal;
  }

  .com_jsfSearch.jsfSearch-detail table.tableStyle.itemTBL td.element-data {
    padding-top: 0;
  }
}


/* ========================================================================== */
/* 6. ACTIONS (com_sbxactions)                                                */
/* Scope: .sbx.actions                                                        */
/* ========================================================================== */

/*
 * Step 1 note: the zip/address form (addr-form.html / zip-form.html) uses
 * Bootstrap .control-group / .controls structure with .input-text inputs.
 * Phase 4 handles all of those. Phase 5 only adds section-level spacing.
 */

/* Top-level sections */
.sbx.actions .section {
  margin-bottom: var(--sbx-space-xl);
}

/* -- Actions: target cards ------------------------------------------------
 * Structure: .section-action-targets > h3.action-targets-title + .action-targets > .target
 * Grid lives on .action-targets (the direct parent of .target cards).
 * auto-fill: 3-col at ~840px, 2-col at tablet, 1-col at mobile — no media queries needed.
 * Grid default align-items:stretch equalizes card heights per row — no JS needed.
 */
.sbx.actions .action-targets {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap:                   var(--sbx-space-lg);
  align-items:           stretch;
}

.sbx.actions .target {
  display:       flex;
  gap:           var(--sbx-space-md);
  padding:       var(--sbx-space-md);
  background:    var(--sbx-surface-muted);
  border:        1.5px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  margin-top:    0;
}

.sbx.actions .target-photo {
  width:         56px;
  aspect-ratio:  1 / 1;
  border-radius: 50%;
  object-fit:    cover;
  flex-shrink:   0;
}

.sbx.actions .target-body {
  flex: 1;
}

.sbx.actions .target-name {
  font-size:     var(--sbx-font-size-lg);
  font-weight:   700;
  color:         var(--sbx-text-heading);
  margin:        0 0 var(--sbx-space-xs) 0;
  line-height:   1.3;
}

.sbx.actions .target-title,
.sbx.actions .target-org {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  margin:      0 0 var(--sbx-space-xs) 0;
  font-weight: 500;
}

.sbx.actions .target-address,
.sbx.actions .target-district,
.sbx.actions .target-phone {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  line-height: 1.6;
  margin:      0;
}

.sbx.actions .target-phone a {
  color:           var(--sbx-primary);
  text-decoration: none;
}

/* -- Actions: contact section --------------------------------------------
 * .section-action-contact wraps the supporter info form (Step 2).
 * Inputs and selects are styled by Phase 4 via .input-text / .select classes.
 */
.sbx.actions .section-action-contact fieldset.action-contact-fs {
  border:  none;
  padding: 0;
  margin:  0;
}

.sbx.actions .form-actions.action-contact-formactions {
  margin-top: var(--sbx-space-lg);
}

/* -- Social share -- shared: Actions + Petitions --------------------------
 * .sbx covers both .sbx.actions and .sbx.petitions; no other Soapbox app
 * under .sbx uses .share-link / .share-list.
 */
.sbx .section-socialshare {
  margin-top: var(--sbx-space-xl);
}

.sbx .share-list {
  list-style: none;
  margin:     0;
  padding:    0;
  display:    flex;
  flex-wrap:  wrap;
  gap:        var(--sbx-space-sm);
}

.sbx .share-item {
  margin: 0;
}

.sbx .share-link {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           44px;
  height:          44px;
  border-radius:   50%;
  background:      var(--sbx-primary);
  color:           var(--sbx-text-on-primary);
  text-decoration: none;
  font-size:       1.125rem;
  transition:      background var(--sbx-transition),
                   box-shadow  var(--sbx-transition);
}

.sbx .share-link:hover {
  background: var(--sbx-primary-dark);
}

.sbx .share-link:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

.sbx h5.share-title {
  font-size:      var(--sbx-font-size-sm);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
  margin:         0 0 var(--sbx-space-sm) 0;
}

/* -- Actions: optional header image --------------------------------------- */
.sbx.actions .section-action-media img {
  display:       block;
  width:         100%;
  max-height:    280px;
  object-fit:    cover;
  border-radius: var(--sbx-radius-card);
}

/* -- Actions: letter / compose zone --------------------------------------- */
.sbx.actions .section-action-letter {
  background:    var(--sbx-surface-alt);
  border:        1.5px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-lg);
}

/* -- Actions: textarea auto-sizing ----------------------------------------
 * field-sizing: content lets the textarea grow with its content.
 * max-height caps runaway expansion; overflow-y reveals a scrollbar if the
 * user types past the cap. A JS MutationObserver fallback in index.php
 * handles the same resize logic for browsers without field-sizing support.
 */
.sbx.actions textarea.input-block-level {
  field-sizing: content;
  min-height:   8rem;
  max-height:   24rem;
  overflow-y:   auto;
}

/* -- Actions: section heading treatment ------------------------------------
 * Phase 3 (h3.section-title) sets font, size, color, border-bottom: none.
 * Only override the margin to match the larger spacing used in action flows.
 */
.sbx.actions h3.section-title {
  margin-bottom: var(--sbx-space-md);
}

/* -- Actions: letter address placeholder ----------------------------------
 * Rendered below the closing textarea as "[Your name] / [Your email]".
 * Styled as a muted caption — no semantic weight.
 */
.sbx.actions .action-letter-address {
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
  font-style: italic;
  margin:     var(--sbx-space-sm) 0 0 0;
  line-height: 1.5;
}

/* -- Actions: contact form — first/last name side by side -----------------
 * Grid on the contact fieldset. <fieldset> has a Chrome auto-placement bug
 * where grid-column:auto is misassigned; use explicit col + row instead.
 * All .control-group elements default to full-width (1/-1); the name pair
 * gets explicit (col,row) placement so the grid algorithm can't misplace them.
 * Collapses to 1-column below 600px.
 */
.sbx.actions .section-action-contact .action-contact-fs {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   var(--sbx-space-sm) var(--sbx-space-md);
}

.sbx.actions .section-action-contact .action-contact-fs > .control-group {
  grid-column: 1 / -1;
}

.sbx.actions .section-action-contact .action-contact-fs > .cg-firstname {
  grid-column: 1;
  grid-row:    1;
}

.sbx.actions .section-action-contact .action-contact-fs > .cg-lastname {
  grid-column: 2;
  grid-row:    1;
}

@media (max-width: 599px) {
  .sbx.actions .section-action-contact .action-contact-fs > .cg-firstname,
  .sbx.actions .section-action-contact .action-contact-fs > .cg-lastname {
    grid-column: 1 / -1;
    grid-row:    auto;
  }
}

/* -- Actions: inline radio option groups (Salesforce Boolean fields) ------
 * SF Boolean fields render Yes/No as two .span-block radio items inside .cntr.
 * By default .span-block is block-level, stacking options vertically.
 * :has(input[type="radio"]) scopes to radio .cntr only — avoids select wrappers.
 */
.sbx.actions .control-group .cntr:has(input[type="radio"].field) {
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
  gap:         var(--sbx-space-md);
}

/* -- Actions: opt-in checkbox toggles -------------------------------------
 * label.checkbox wraps the native input (label > input, not input + label).
 * Phase 12 input+label sibling combinator cannot be reused here.
 * :has() handles checked/focus-visible state; already used in this file.
 */

/* Hide native checkbox; preserve keyboard + screen-reader access */
.sbx.actions .cg-checkboxes label.checkbox input[type="checkbox"] {
  position: absolute;
  opacity:  0;
  width:    1px;
  height:   1px;
  margin:   0;
}

/* Label row: pad left for track + gap; stack rows with gap */
.sbx.actions .cg-checkboxes label.checkbox {
  position:      relative;
  display:       flex;
  align-items:   center;
  padding-left:  52px;    /* 40px track + 12px gap */
  min-height:    26px;
  margin-bottom: var(--sbx-space-sm);
  cursor:        pointer;
  user-select:   none;
  font-size:     var(--sbx-font-size-base);
  color:         var(--sbx-text-body);
  line-height:   1.4;
}

.sbx.actions .cg-checkboxes label.checkbox:last-child {
  margin-bottom: 0;
}

/* Track */
.sbx.actions .cg-checkboxes label.checkbox::before {
  content:          '';
  position:         absolute;
  left:             0;
  top:              50%;
  transform:        translateY(-50%);
  width:            40px;
  height:           24px;
  border-radius:    12px;
  background-color: var(--sbx-surface-muted);
  border:           1.5px solid var(--sbx-border-color);
  transition:       background-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                    border-color     var(--sbx-motion-fast) var(--sbx-motion-ease);
}

/* Thumb */
.sbx.actions .cg-checkboxes label.checkbox::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0, 0, 0, 0.20);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}

/* Checked: track fill + thumb slide */
.sbx.actions .cg-checkboxes label.checkbox:has(input:checked)::before {
  background-color: var(--sbx-primary);
  border-color:     var(--sbx-primary-dark);
}

.sbx.actions .cg-checkboxes label.checkbox:has(input:checked)::after {
  left: 19px;
}

/* Focus ring for keyboard navigation */
.sbx.actions .cg-checkboxes label.checkbox:has(input:focus-visible)::before {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* -- Actions: submit button ------------------------------------------------ */
.sbx.actions .btn.btn-contact-submit {
  min-width: 140px;
}

/* -- Actions: thank-you / confirmation view --------------------------------
 * Body class: actions-view-thankyou. Inner content is CMS-configured.
 * Phase 3 typography applies to headings/body text within.
 */
.sbx.actions.actions-view-thankyou .section-action-thankyou {
  padding:       var(--sbx-space-xl);
  background:    var(--sbx-surface-muted);
  border:        1.5px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  margin-bottom: var(--sbx-space-xl);
  text-align:    center;
}

.sbx.actions.actions-view-thankyou .section-action-thankyou a.btn,
.sbx.actions.actions-view-thankyou .section-action-thankyou button {
  margin-top: var(--sbx-space-md);
}

/* Checkmark: mirrors .compScsMsg-wrap::before; margin auto centers the 48px
 * circle within the full-width block inside the text-align:center card. */
.sbx.actions.actions-view-thankyou .section-action-thankyou::before {
  content:          '✓';
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            48px;
  height:           48px;
  border-radius:    50%;
  background:       var(--sbx-success);
  color:            white;
  font-size:        var(--sbx-font-size-lg);
  font-weight:      700;
  margin:           0 auto var(--sbx-space-md);
  flex-shrink:      0;
}


/* ========================================================================== */
/* 7. PETITIONS (com_sbxpetitions)                                            */
/* Scope: .sbx.petitions                                                      */
/* ========================================================================== */

/* -- Petitions: thank-you / confirmation view ---------------------------------
 * Body class: petitions-view-thankyou. Inner content (section-thankyou) is
 * CMS-configured. Mirrors the Actions thank-you card treatment.
 */
.sbx.petitions.petitions-view-thankyou .section-thankyou {
  padding:       var(--sbx-space-xl);
  background:    var(--sbx-surface-muted);
  border:        1.5px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  margin-bottom: var(--sbx-space-xl);
  text-align:    center;
}

.sbx.petitions.petitions-view-thankyou .section-thankyou a.btn,
.sbx.petitions.petitions-view-thankyou .section-thankyou button {
  margin-top: var(--sbx-space-md);
}

/* Checkmark: mirrors Actions treatment above; centered via margin auto. */
.sbx.petitions.petitions-view-thankyou .section-thankyou::before {
  content:          '✓';
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            48px;
  height:           48px;
  border-radius:    50%;
  background:       var(--sbx-success);
  color:            white;
  font-size:        var(--sbx-font-size-lg);
  font-weight:      700;
  margin:           0 auto var(--sbx-space-md);
  flex-shrink:      0;
}


/* Top-level sections */
.sbx.petitions .section {
  margin-bottom: var(--sbx-space-xl);
}

/* Form section: wraps the sign form (controlled by formtoggle JS)
 * DO NOT set display or visibility -- the form may be initially hidden via
 * .is-hidden class (set by PHP) and revealed by the formtoggle button JS.
 * We must not define .is-hidden or override display:none on this element. */
.sbx.petitions .section-petition-form h3.petition-formtitle {
  font-size:      var(--sbx-font-size-h3);
  font-weight:    600;
  color:          var(--sbx-text-heading);
  margin:         0 0 var(--sbx-space-md) 0;
  padding-bottom: var(--sbx-space-sm);
  border-bottom:  2px solid var(--sbx-primary);
}

/* -- Petitions: progress widget ------------------------------------------
 * .petition-progress -- flex row containing chart (if enabled), count, goal.
 * Each metric has a .petition-prognum (large number) + .petition-proglabel.
 */
.sbx.petitions .petition-progress {
  display:        flex;
  flex-wrap:      wrap;
  align-items:    flex-start;
  gap:            var(--sbx-space-xl);
  padding:        var(--sbx-space-lg);
  background:     var(--sbx-surface-muted);
  border:         1.5px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-card);
  margin-bottom:  var(--sbx-space-xl);
}

.sbx.petitions .petition-count,
.sbx.petitions .petition-goal {
  text-align: center;
}

.sbx.petitions .petition-prognum {
  font-size:   clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color:       var(--sbx-primary);
  margin:      0 0 var(--sbx-space-xs) 0;
  line-height: 1;
}

.sbx.petitions .petition-proglabel {
  font-size:     var(--sbx-font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color:         var(--sbx-text-muted);
  margin:        0;
  font-weight:   600;
}

/* -- Petitions: letter section -------------------------------------------
 * .section-petition-letter contains the petition letter text.
 * Styled as a blockquote-like region to visually distinguish it from
 * the supporter form.
 */
.sbx.petitions .section-petition-letter {
  background:    var(--sbx-surface-muted);
  border-left:   4px solid var(--sbx-primary);
  border-radius: 0 var(--sbx-radius-sm) var(--sbx-radius-sm) 0;
  padding:       var(--sbx-space-lg);
}

.sbx.petitions h3.petition-letter-title {
  margin:        0 0 var(--sbx-space-md) 0;
  padding-bottom: var(--sbx-space-sm);
  border-bottom:  2px solid var(--sbx-primary);
}

/* -- Petitions: supporters section --------------------------------------
 * .section-petition-supporters contains the supporter list.
 * hidden-phone class toggles it on mobile (Zozo accordion; do not fight it).
 */
.sbx.petitions .section-petition-supporters h3.petition-supporterstitle {
  margin:        0 0 var(--sbx-space-md) 0;
  padding-bottom: var(--sbx-space-sm);
  border-bottom:  2px solid var(--sbx-primary);
}

/* -- Petitions: mobile accordion -----------------------------------------
 * The Zozo accordion is enabled on mobile and wraps letter + supporters.
 * h3.accordion-petition-header is the accordion trigger -- DO NOT style it.
 * The accordion adds open/close indicator classes and controls display;
 * any height, display, or color override here would break the accordion.
 */


/* ========================================================================== */
/* PHASE 21 — DONATIONS: PEER-TO-PEER MODERNIZATION                          */
/* Scopes:                                                                    */
/*   .donations (campaign page)                                               */
/*   .section-team-header / .team-content (team detail page)                 */
/*   .fundraiser-content / #section-fundraiser-header (fundraiser detail)    */
/*   form.formDonateTeamCreate / form.formDonateFundraiserCreate (edit forms) */
/* Added: v75, 2026-05-05; refined v76, 2026-05-05; cleanup v77, 2026-05-05; cleanup v78, 2026-05-05; cleanup v79, 2026-05-05; cleanup v80, 2026-05-05; pill-fix v81, 2026-05-05; hero-center+gradient+tile-fade v82, 2026-05-05; required-text+other-amount+search-snap v83, 2026-05-05; other-amount-height:100% v84, 2026-05-05; manage-fundraising-modernization v85, 2026-05-05; fundraising-btn-row+bar-color v86, 2026-05-05; fundraising-grid-layout v87-90, 2026-05-05 */
/* ========================================================================== */

/* ── Campaign hero banner ──────────────────────────────────────────────── */
/*
 * The component sets height:300px + background-size:cover on the row wrapper.
 * Title is centered horizontally and vertically inside the hero.
 */
.donations .section-campaign-header {
  position:         relative;
  display:          flex;
  align-items:      center;
  justify-content:  center;
  padding:          var(--sbx-space-lg) var(--sbx-space-xl);
  margin-bottom:    var(--sbx-space-xl);
  background-color: var(--sbx-surface-alt);  /* fallback before JS + when no image */
}

/* Gradient overlay — gated on data-sbx-hero (set by JS after verifying computed bg-image).
 * Symmetric center-dark band keeps the centered title readable over any photo. */
.donations .section-campaign-header[data-sbx-hero]::after {
  content:  '';
  position: absolute;
  inset:    0;
  background: linear-gradient(
    to bottom,
    rgba(var(--sbx-overlay-rgb), 0.20) 0%,
    rgba(var(--sbx-overlay-rgb), 0.55) 38%,
    rgba(var(--sbx-overlay-rgb), 0.55) 62%,
    rgba(var(--sbx-overlay-rgb), 0.20) 100%
  );
  pointer-events: none;
}

.donations .col-campaign-image {
  position:   relative;
  z-index:    1;
  flex:        1;
  text-align:  center;
}

.donations h1.title-over-hero-image {
  font-size:   clamp(1.25rem, 4vw, 2rem);
  font-weight: 700;
  color:       var(--sbx-text-on-primary);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  margin:      0;
  line-height: 1.25;
  text-align:  center;
}

/* No-image fallback — JS leaves data-sbx-hero unset when no background-image is injected.
 * Gradient matches the P2P card and fundraiser page empty-state pattern. */
.donations .section-campaign-header:not([data-sbx-hero]) {
  background-image: var(--sbx-p2p-gradient-empty);
}
.donations .section-campaign-header:not([data-sbx-hero]) h1.title-over-hero-image {
  color:       var(--sbx-text-heading);
  text-shadow: none;
}

/* ── Create-Fundraiser CTA section ─────────────────────────────────────── */
.donations .section-create-fundraiser {
  text-align:    center;
  margin-bottom: var(--sbx-space-xl);
  padding:       var(--sbx-space-lg);
  background:    var(--sbx-surface-muted);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
}

.donations .section-create-fundraiser p {
  color:         var(--sbx-text-muted);
  font-size:     var(--sbx-font-size-sm);
  margin-bottom: var(--sbx-space-md);
}

.donations .section-create-fundraiser-buttons {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: center;
  gap:             var(--sbx-space-sm);
}

.donations .section-create-fundraiser-buttons .btn {
  margin: 0;
}

/* ── Tab navigation ─────────────────────────────────────────────────────── */
/*
 * Markup: div.section-tab > div.bar > a[href="#teams"].active + a[href="#fundraisers"]
 * The component toggles "hide" on the panel divs (#teams / #fundraisers) via JS.
 * We style the bar as a segmented-control strip.
 */
.donations .section-tab {
  margin-bottom: var(--sbx-space-lg);
  border:        none !important;  /* donation-campaign.css: .section-tab { border:1px solid !important } */
}

/* Strip Bootstrap .tab padding that creates a white boxed-area effect around the grid */
.donations #teams,
.donations #fundraisers {
  padding: 0;
  background: transparent;
}

/* donation-campaign.css sets .section-tab .bar { background:gray !important; border-bottom:1px solid !important }.
 * Our higher-specificity (.donations context) + !important beats both. */
.donations .section-tab .bar {
  display:          inline-flex !important;
  gap:              2px;
  background:       var(--sbx-surface-muted) !important;
  border:           1px solid var(--sbx-border-subtle) !important;
  border-radius:    var(--sbx-radius-pill);
  padding:          3px;
  position:         relative;  /* anchor for .sbx-pill-slider */
}

.donations .section-tab .bar a {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  padding:         0.375rem 1.25rem;
  border-radius:   var(--sbx-radius-pill);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  color:           var(--sbx-text-muted);
  text-decoration: none !important;
  position:        relative;  /* float above .sbx-pill-slider */
  z-index:         1;
  transition:      color var(--sbx-transition);
}

/* donation-campaign.css: .bar a:hover { color:white !important; background:rgb(97,97,97) !important }
 * Suppress hover state — pill is the only visual affordance. */
.donations .section-tab .bar a:hover {
  background:      transparent !important;
  color:           var(--sbx-text-muted) !important;
  text-decoration: none !important;
}

/* donation-campaign.css: .bar a.active { background:gray !important; color:#fff !important }.
 * Pill provides the background when JS runs (sbx-has-pill). CSS fallback keeps blue pill
 * when JS is absent. */
.donations .section-tab .bar a.active {
  background:  var(--sbx-primary) !important;
  color:       var(--sbx-text-on-primary) !important;
  box-shadow:  0 1px 4px rgba(var(--sbx-primary-rgb), 0.3);
}

/* JS-initialized: pill provides background — strip it from the link element */
.donations .section-tab .bar.sbx-has-pill a.active,
.donations .section-tab .bar.sbx-has-pill a.active:hover {
  background: transparent !important;
  box-shadow: none;
  color:      var(--sbx-text-on-primary) !important;
}

.donations .section-tab .bar a:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* ── Tile search filter ──────────────────────────────────────────────────── */
/*
 * Appears on campaign page (inside .donations) and team page (no .donations).
 * Use bare .sbx-tiles-search selector.
 */
.sbx-tiles-search {
  position:      relative;
  margin-bottom: var(--sbx-space-md);
  max-width:     360px;
}

.sbx-tiles-search .slds-input__icon {
  position:  absolute;
  left:      0.75rem;
  top:       50%;
  transform: translateY(-50%);
  color:     var(--sbx-text-muted);
  font-size: var(--sbx-font-size-sm);
  pointer-events: none;
}

.sbx-tiles-search input.slds-input {
  padding-left: 2.25rem;
}

/* ── Card grid: Teams and Fundraisers ───────────────────────────────────── */
/*
 * Three grid contexts:
 *   .sbx-grid.teams-grid        — campaign page teams tab
 *   .fundraiser-grid            — campaign page fundraisers tab
 *   .section-donors .sbx-grid   — team detail page members grid (bare .sbx-grid)
 *
 * Team page uses no .donations scope and no .fundraiser-grid — must target
 * .section-donors .sbx-grid directly.
 */
.sbx-grid.teams-grid,
.fundraiser-grid,
.section-donors .sbx-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap:                   var(--sbx-space-md);
}

/* ── Card: base ─────────────────────────────────────────────────────────── */
/*
 * .sbx-panel.filterDiv is the card element across all P2P contexts.
 * Not scoped to .donations because team page has no .donations wrapper.
 * Specificity: (0,2,0) beats component rules that use single-class selectors.
 */
.sbx-panel.filterDiv {
  position:       relative;
  display:        flex;
  flex-direction: column;
  width:          100%;       /* override donation-tiles.css .sbx-size_medium { width:20rem } */
  min-width:      0;          /* prevent overflow out of grid cell */
  background:     var(--sbx-surface);
  border:         1px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-card);
  overflow:       hidden;
  box-shadow:     var(--sbx-shadow-card);
  transition:     box-shadow var(--sbx-transition),
                  transform  var(--sbx-transition);
  margin:         0;          /* override sbx-m-top_medium */
}

.sbx-panel.filterDiv:hover {
  box-shadow: var(--sbx-shadow-card-hover);
  transform:  translateY(-2px);
}

/* ── Card: overlay link ─────────────────────────────────────────────────── */
/*
 * .sbx-link-overlay makes the whole card tappable.
 * Scoped to .filterDiv to avoid colliding with other sbx-link-overlay uses.
 */
.sbx-panel.filterDiv .sbx-link-overlay {
  position:  absolute;
  inset:     0;
  z-index:   1;
  font-size: 0;
}

.sbx-panel.filterDiv .sbx-link-overlay:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: -2px;
  border-radius:  var(--sbx-radius-card);
}

/* ── Card: image area ───────────────────────────────────────────────────── */
/*
 * Two markup patterns exist:
 *   Campaign page:  sbx-panel__body > div.text-center > img.avatar_thumbnail
 *   Team page:      sbx-panel__body > img.avatar_thumbnail  (no wrapper div)
 *
 * Campaign inline style: width:180px!important; height:180px!important → need !important.
 * Team page inline style: width:180px; height:180px (no !important) → class specificity wins.
 *
 * Pattern A — .text-center wrapper container (campaign cards):
 */
.sbx-panel.filterDiv .sbx-panel__body > .text-center:first-child {
  width:        100%;
  aspect-ratio: 1 / 1;
  overflow:     hidden;
  background:   var(--sbx-p2p-gradient-empty);
}

/* Suppress Bootstrap/.img-thumbnail 0.25rem padding+border inside P2P grid cards.
 * Scoped to filterDiv cards only — does not affect upload preview thumbnails. */
.sbx-panel.filterDiv img.img-thumbnail {
  padding:       0;
  border:        none;
  border-radius: 0;
}

.sbx-panel.filterDiv .sbx-panel__body > .text-center:first-child img.avatar_thumbnail {
  width:      100% !important;   /* beat: width:180px!important */
  height:     100% !important;   /* beat: height:180px!important */
  object-fit: cover;
  display:    block;
}

/* Pattern B — direct img in sbx-panel__body (team page fundraiser cards) */
.sbx-panel.filterDiv .sbx-panel__body > img.avatar_thumbnail {
  display:      block;
  width:        100%;
  aspect-ratio: 1 / 1;
  object-fit:   cover;
  height:       auto;           /* override inline height:180px */
  background:   var(--sbx-p2p-gradient-empty);
}

/* ── Card: text area ────────────────────────────────────────────────────── */
.sbx-panel.filterDiv .sbx-panel__body > .text-center:last-child {
  padding:    var(--sbx-space-sm) var(--sbx-space-md) 0;
  text-align: left;
}

/* Title/description styles: no scope needed — classes are P2P-specific */
.fundraiser-tiles_title {
  font-size:   var(--sbx-font-size-base);
  font-weight: 600;
  color:       var(--sbx-text-heading);
  line-height: 1.3;
  margin:      0 0 var(--sbx-space-xs);
}

.fundraiser-tiles_description {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  line-height: 1.45;
  margin:      0;
}

/* ── Card: body ─────────────────────────────────────────────────────────── */
.sbx-panel.filterDiv .sbx-panel__body {
  flex:    1;
  padding: var(--sbx-space-sm) var(--sbx-space-md) 0;
}

/* Reset padding when image wrapper is present (Pattern A) — :has() is already
 * accepted throughout this file; non-supporting browsers get a minor padding gap. */
.sbx-panel.filterDiv .sbx-panel__body:has(> .text-center:first-child) {
  padding: 0;
}

/* ── Card: footer ───────────────────────────────────────────────────────── */
.sbx-panel.filterDiv .sbx-panel__footer {
  padding:    var(--sbx-space-sm) var(--sbx-space-md) var(--sbx-space-md);
  margin-top: auto;
}

.sbx-panel.filterDiv .sbx-panel__footer > div:first-child,
.sbx-panel.filterDiv .sbx-panel__footer > div:last-child {
  display:         flex;
  justify-content: space-between;
  align-items:     baseline;
}

.sbx-panel.filterDiv .sbx-panel__footer > div:first-child { margin-bottom: var(--sbx-space-xs); }

.fundraiser-tiles_percentage {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 700;
  color:       var(--sbx-primary);
}

.fundraiser-tiles_donors {
  font-size: var(--sbx-font-size-xs);
  color:     var(--sbx-text-muted);
}

/* ── Card: progress bar ─────────────────────────────────────────────────── */
/*
 * Component uses div.sbx-progress-bar > span.sbx-progress-bar__value.
 * Width is set inline by JS: style="width: N%".
 * Scoped to .filterDiv to avoid touching the team/fundraiser detail progress bars.
 */
.sbx-panel.filterDiv .sbx-progress-bar {
  height:        6px;
  background:    var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-pill);
  overflow:      hidden;
  margin:        var(--sbx-space-xs) 0;
}

.sbx-panel.filterDiv .sbx-progress-bar__value {
  display:        block;
  height:         100%;
  background:     var(--sbx-primary);
  border-radius:  var(--sbx-radius-pill);
  min-width:      4px;
  transition:     width var(--sbx-transition-slow);
}

.sbx-panel.filterDiv .sbx-panel__footer > div:last-child { margin-top: var(--sbx-space-xs); }

.fundraiser-tiles_raised {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

.fundraiser-tiles_goal {
  font-size: var(--sbx-font-size-xs);
  color:     var(--sbx-text-muted);
}

/* ── Team detail page: hero banner ──────────────────────────────────────── */
/*
 * Team page renders without #page wrapper; content starts at #section-team-header.
 * Background image and height are set inline by the component.
 */
#section-team-header {
  position:      relative;
  min-height:    220px;
  background-size:     cover !important;
  background-position: center !important;
  display:         flex;
  align-items:     flex-end;
  padding:         var(--sbx-space-lg) var(--sbx-space-xl);
  margin-bottom:   var(--sbx-space-xl);
}

#section-team-header::after {
  content:  '';
  position: absolute;
  inset:    0;
  background: linear-gradient(
    to top,
    rgba(var(--sbx-overlay-rgb), 0.65) 0%,
    rgba(var(--sbx-overlay-rgb), 0.20) 60%,
    transparent 100%
  );
  pointer-events: none;
}

#section-team-header > * {
  position: relative;
  z-index:  1;
}

/* ── Team detail page: content grid ─────────────────────────────────────── */
/*
 * sbx-grid.sbx-gutters.team-content
 *   col-25 team-logo: team image
 *   col-50 progress-bar: progress widget
 *   col-25 info-block team-buttons: donate/join buttons
 *   col-75 team-info: title, description, fundraiser cards
 */
.team-content.sbx-grid {
  margin-bottom: var(--sbx-space-xl);
}

.donations .team-logo img.img-thumbnail,
.team-logo img.img-thumbnail {
  width:         100%;
  aspect-ratio:  1 / 1;
  object-fit:    cover;
  border-radius: var(--sbx-radius-card);
  border:        1px solid var(--sbx-border-subtle);
  display:       block;
}

/* ── Team detail: progress bar widget ───────────────────────────────────── */
/*
 * Component uses <progress> element for the native bar + div.sbx-progress-bar.
 * Normalise the native <progress> and the custom sbx one consistently.
 * No .donations scope: team page has no .donations wrapper.
 */
.sbx-col.progress-bar progress,
progress#fundraiser-progress-bar {
  -webkit-appearance: none;
  appearance:        none;
  width:    100%;
  height:   8px;
  border:   none;
  border-radius: var(--sbx-radius-pill);
  background:    var(--sbx-border-subtle);
  display:  block;
  margin-bottom: var(--sbx-space-xs);
}

progress#fundraiser-progress-bar::-webkit-progress-bar  { background: var(--sbx-border-subtle); border-radius: var(--sbx-radius-pill); }
progress#fundraiser-progress-bar::-webkit-progress-value { background: var(--sbx-primary);       border-radius: var(--sbx-radius-pill); }
progress#fundraiser-progress-bar::-moz-progress-bar     { background: var(--sbx-primary);       border-radius: var(--sbx-radius-pill); }

.info-block.sbx-grid .header.raised,
.info-block.sbx-grid .header.supporters {
  font-size:   var(--sbx-font-size-h3);
  font-weight: 700;
  color:       var(--sbx-primary);
  display:     block;
}

.info-block.sbx-grid .desc {
  font-size: var(--sbx-font-size-xs);
  color:     var(--sbx-text-muted);
}

/* ── Team/fundraiser page: action buttons ───────────────────────────────── */
/*
 * .info-block (outer wrapper class — shares the .team-buttons/.fundraiser-buttons
 * class name) applies align-items:center via component CSS, shrink-wrapping buttons.
 * align-items:stretch on the inner buttons container overrides that.
 * NO width:100% on the container — the outer .sbx-col.fundraiser-buttons wrapper shares
 * this class and would expand to full content width; use > direct-child selector on btns.
 */
.team-buttons,
.fundraiser-buttons {
  display:        flex;
  flex-direction: column;
  align-items:    stretch;
  gap:            var(--sbx-space-sm);
}

/* Direct-child .btn elements fill the container (safe: outer .sbx-col.fundraiser-buttons
 * has no direct .btn children — they live inside the nested inner div). */
.team-buttons > .btn,
.fundraiser-buttons > .btn {
  width:           100%;
  justify-content: center;
}

/* donation-fundraiser.css sets #btnLogin/#btnLogout/#btnFundraisingEdit { width:80% }
 * using ID specificity (1,0,0) which overrides our class rule (0,2,0).
 * Qualifying with the container bumps our specificity to (1,1,0). */
.fundraiser-buttons #btnFundraisingEdit,
.fundraiser-buttons #btnLogout,
.fundraiser-buttons #btnLogin,
.team-buttons #btnLogin,
.team-buttons #btnLogout {
  width: 100%;
}

/* Clear:both divs injected between buttons — suppress layout impact */
.fundraiser-buttons > div[style*="clear"] {
  display: none;
}

/* Share link in fundraiser buttons: remove Phase 20 social-share circle (44px/50%).
 * The .sbx .share-link rule targets share icons in Actions/Petitions; here it's a
 * full-width CTA that should match the other fundraiser buttons. */
.fundraiser-buttons > .share-link {
  width:         100%;
  height:        auto;
  border-radius: var(--sbx-radius-btn);
  font-size:     var(--sbx-font-size-btn);
  background:    var(--sbx-primary);
  color:         var(--sbx-text-on-primary);
}

/* .mobile class should remain hidden on desktop (component: .mobile { display:none }).
 * Our (0,2,0) rule was overriding it — exclude .mobile from the selector. */
.team-info > .campaign-section:not(.mobile),
.fundraiser-info > .team-section:not(.mobile) {
  display:       flex;
  align-items:   center;
  gap:           var(--sbx-space-xs);
  margin-bottom: var(--sbx-space-xs);
  font-size:     var(--sbx-font-size-sm);
}

.team-info .campaign-link a,
.fundraiser-info .team-link a {
  color:           var(--sbx-primary);
  text-decoration: none;
  font-weight:     600;
}

.team-info .campaign-link a:hover,
.fundraiser-info .team-link a:hover {
  text-decoration: underline;
}

.team-info .campaign-label,
.fundraiser-info .team-label {
  font-size:      var(--sbx-font-size-xs);
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight:    600;
}

/* ── Team detail: section titles ─────────────────────────────────────────── */
.team-info .section-header h1,
.team-info h1.title,
.fundraiser-info h1.title.fundraiser-title {
  font-size:     var(--sbx-font-size-h1);
  font-weight:   700;
  color:         var(--sbx-text-heading);
  margin:        0 0 var(--sbx-space-sm);
  line-height:   1.25;
}

/* ── Fundraiser detail page: hero banner ─────────────────────────────────── */
#section-fundraiser-header.row {
  position:     relative;
  margin-bottom: var(--sbx-space-xl);
}

.col-fundraiser-image-left {
  min-height:          220px;
  background-size:     cover !important;
  background-position: center !important;
  position:            relative;
}

.col-fundraiser-image-left::after {
  content:  '';
  position: absolute;
  inset:    0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(20, 28, 50, 0.55) 100%
  );
  pointer-events: none;
}

/* Fundraiser page: no hero image — gradient placeholder.
 * Component sets the real image via a <style> tag using #section-fundraiser-image (specificity 1,0,0).
 * Our class selector (0,1,0) deliberately loses to that ID rule, so real images show.
 * When no image is set, no competing background-image rule → gradient shows as fallback.
 * Using background-image (not the shorthand) preserves component's background-size/position. */
.col-fundraiser-image-left {
  background-image: var(--sbx-p2p-gradient-empty);
}

/* ── Fundraiser page: user avatar ─────────────────────────────────────────── */
.donations .user-avatar {
  text-align: center;
}

.donations .user-avatar-img-wrapper {
  position:      relative;
  display:       inline-block;
  margin-bottom: var(--sbx-space-sm);
}

.donations .user-avatar-img-wrapper img.img-thumbnail {
  width:         100%;
  max-width:     140px;
  aspect-ratio:  1 / 1;
  object-fit:    cover;
  border-radius: 50%;
  border:        3px solid var(--sbx-surface);
  box-shadow:    0 2px 8px rgba(0,0,0,0.12);
  display:       block;
  margin:        0 auto;
}

/* Hide the SLDS SVG camera icon overlay — visual noise */
.donations .user-avatar-img-wrapper .slds-icon_container {
  display: none;
}

.donations .user-name {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 600;
  color:       var(--sbx-text-heading);
  text-align:  center;
}

/* ── Fundraiser page right-info column ───────────────────────────────────────
 * .sbx-col-25 (no extra class) holds team-section.desktop, campaign-section.desktop,
 * and section-campaign-supporters. Distinct from .info-block.fundraiser-buttons col.
 */
.sbx-col-25 > .team-section.desktop,
.sbx-col-25 > .campaign-section.desktop {
  display:        flex;
  flex-direction: column-reverse;   /* label visually above value (DOM: value, label) */
  gap:            2px;
  margin-bottom:  var(--sbx-space-md);
  padding-bottom: var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-subtle);
}

.sbx-col-25 .team-label,
.sbx-col-25 .campaign-label {
  font-size:      var(--sbx-font-size-xs);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          var(--sbx-text-muted);
}

.sbx-col-25 .team-link a,
.sbx-col-25 .campaign-link a {
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  color:           var(--sbx-text-heading);
  text-decoration: none;
}

.sbx-col-25 .team-link a:hover,
.sbx-col-25 .campaign-link a:hover {
  color:           var(--sbx-primary);
  text-decoration: underline;
}

/* ── Campaign supporters section ─────────────────────────────────────────── */
.donations .section-campaign-supporters {
  margin-top:  var(--sbx-space-sm);
  padding-top: 0;
}

/* Donors heading: card-label style, no underline */
.donations h3.campaign-supporters-title,
.donations h3.section-title {
  font-size:      var(--sbx-font-size-xs);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          var(--sbx-text-muted);
  margin:         0 0 var(--sbx-space-sm);
  padding-bottom: 0;
  border-bottom:  none;
}

/* Supporter list */
.donations .campaign-supporters-list {
  list-style: none;
  padding:    0;
  margin:     0;
}

.donations .supporter-item {
  padding:       var(--sbx-space-sm) 0;
  border-bottom: 1px solid var(--sbx-border-subtle);
}

.donations .supporter-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.donations .supporter-headline {
  display:         flex;
  justify-content: space-between;
  align-items:     baseline;
  gap:             var(--sbx-space-xs);
}

.donations .supporter-name {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 600;
  color:       var(--sbx-text-heading);
}

.donations .supporter-elapsed {
  font-size:   var(--sbx-font-size-xs);
  color:       var(--sbx-text-muted);
  white-space: nowrap;
}

.donations .supporter-amount {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 700;
  color:       var(--sbx-primary);
}

/* ── Campaign page donor list: inline amount ─────────────────────────────────
 * On the full-width campaign page the supporter section's parent is .item.
 * Put name/time/amount on one row instead of stacking amount below name.
 * The sidebar variant (inside .sbx-col-25) keeps the stacked layout.
 */
/* Hide empty .supporter-text div in all donor list contexts */
.donations .section-campaign-supporters .supporter-text {
  display: none;
}

/* Campaign page (full-width .item context): 2-line card — name above time, amount right.
 * Grid puts headline (name+time stacked as block) in col 1, amount in col 2.
 * No divider borders — vertical padding provides natural breathing room. */
.item .section-campaign-supporters .supporter-item {
  display:               grid;
  grid-template-columns: 1fr auto;
  align-items:           start;
  column-gap:            var(--sbx-space-lg);
  padding:               var(--sbx-space-md) 0;
  border-top:            none;  /* component sets border-top on li+li */
  border-bottom:         none;
}

.item .section-campaign-supporters .supporter-headline {
  grid-column: 1;
  display:     block;  /* override base flex; col-supporter-name + col-supporter-time stack */
  margin:      0;
}

.item .section-campaign-supporters .col-supporter-name {
  display:       block;
  margin-bottom: 2px;
}

.item .section-campaign-supporters .col-supporter-time {
  display: block;
}

.item .section-campaign-supporters .supporter-tag {
  grid-column: 2;
  margin:      0;
  text-align:  right;
  align-self:  start;
  padding-top: 1px;  /* optical alignment with first text line */
}

/* Fundraiser sidebar (.sbx-col-25 context, ~216px wide): stacked layout.
 * supporter-item: flex row — left = headline (name + time stacked as block), right = amount.
 * Overrides .donations .supporter-headline { display: flex } for the narrow column. */
.sbx-col-25 .section-campaign-supporters .supporter-item {
  display:     flex;
  align-items: flex-start;
  gap:         var(--sbx-space-sm);
  padding:     var(--sbx-space-sm) 0;
}

.sbx-col-25 .section-campaign-supporters .supporter-headline {
  flex:    1;
  min-width: 0;
  display: block;  /* override base flex so name + time stack vertically */
  margin:  0;
}

.sbx-col-25 .section-campaign-supporters .supporter-name {
  display:       block;
  margin-bottom: 2px;
}

.sbx-col-25 .section-campaign-supporters .supporter-tag {
  flex-shrink: 0;
  text-align:  right;
  margin:      0;
}

/* ── Edit Team / Edit Fundraiser forms ───────────────────────────────────── */
/*
 * Scopes:
 *   form.formDonateTeamCreate       — edit team
 *   form.formDonateFundraiserCreate — edit fundraiser
 * Both use ul.team-list.compList / ul.fundraiser-list.compList for fields.
 * Inherits Phase 4 input/label styles via .compList selectors.
 */
.formDonateTeamCreate .section-content,
.formDonateFundraiserCreate .section-content {
  padding-top: var(--sbx-space-sm);
}

/* ── Upload thumbnail preview containers ─────────────────────────────────
 * display:block so flex-order reordering works inside the upload .cntr.
 * (inline-block caused the thumbnail to float next to the upload button.)
 */
.uploaded_logo,
.uploaded_photo,
div[id$="_thumbnail"],
div.uploaded {
  display:       block;
  border-radius: var(--sbx-radius-card);
  overflow:      hidden;
  border:        1px solid var(--sbx-border-subtle);
}

.uploaded_logo img,
.uploaded_photo img,
div[id$="_thumbnail"] img,
div.uploaded img {
  display:    block;
  max-width:  200px;
  height:     auto;
  object-fit: contain;   /* preserve proportions in preview context */
}

/* ── Upload field: image preview above button ──────────────────────────────
 * DOM order: label → hidden input → .btn-cloudinary → hidden widget btn → thumbnail.
 * flex-column + CSS order puts thumbnail (order:1) between label (order:0) and button (order:2).
 */
.formDonateTeamCreate .cntr:has(.btn-cloudinary),
.formDonateFundraiserCreate .cntr:has(.btn-cloudinary) {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--sbx-space-xs);
}

.formDonateTeamCreate .cntr:has(.btn-cloudinary) > label,
.formDonateFundraiserCreate .cntr:has(.btn-cloudinary) > label { order: 0; }

.formDonateTeamCreate .cntr:has(.btn-cloudinary) > .uploaded_logo,
.formDonateTeamCreate .cntr:has(.btn-cloudinary) > .uploaded_photo,
.formDonateTeamCreate .cntr:has(.btn-cloudinary) > [id$="_thumbnail"],
.formDonateFundraiserCreate .cntr:has(.btn-cloudinary) > .uploaded,
.formDonateFundraiserCreate .cntr:has(.btn-cloudinary) > [id$="_thumbnail"] { order: 1; }

.formDonateTeamCreate .cntr:has(.btn-cloudinary) > .btn,
.formDonateFundraiserCreate .cntr:has(.btn-cloudinary) > .btn { order: 2; }

/* ── Goal field: $ prefix inline with amount input ──────────────────────────
 * The .field class (Soapbox component) sets inputs to display:block, pushing
 * the inline $ span to its own line. flex row + wrap keeps them side-by-side
 * while letting the hint label wrap below on a full-width row.
 */
.formDonateTeamCreate .cntr:has(#team-goal-currency),
.formDonateFundraiserCreate .cntr:has(#fundraiser-goal-currency) {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         0 var(--sbx-space-xs);
}

.formDonateTeamCreate .cntr:has(#team-goal-currency) > input,
.formDonateFundraiserCreate .cntr:has(#fundraiser-goal-currency) > input {
  flex:      1;
  min-width: 0;
}

.formDonateTeamCreate .cntr:has(#team-goal-currency) > label,
.formDonateFundraiserCreate .cntr:has(#fundraiser-goal-currency) > label {
  flex:       0 0 100%;
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
  font-weight: 400;
  margin-top: var(--sbx-space-xs);
}

/* Goal currency prefix (shared by both forms) */
#team-goal-currency,
#fundraiser-goal-currency {
  font-size:  var(--sbx-font-size-base);
  font-weight: 600;
  color:      var(--sbx-text-muted);
  flex-shrink: 0;
}

/* ── Mobile: P2P grids ──────────────────────────────────────────────────── */
/* 480–599px: 2-col grid — 2 cards per row is comfortable at these widths */
@media (min-width: 480px) and (max-width: 599px) {
  .sbx-grid.teams-grid,
  .fundraiser-grid,
  .section-donors .sbx-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sbx-space-sm);
  }
}

/* < 480px: 1-col */
@media (max-width: 479px) {
  .sbx-grid.teams-grid,
  .fundraiser-grid,
  .section-donors .sbx-grid {
    grid-template-columns: 1fr;
  }

  .donations .section-campaign-header {
    padding: var(--sbx-space-md);
  }
}

/* ── Mobile: hero height reduction ──────────────────────────────────────── */
@media (max-width: 767px) {
  .donations .section-campaign-header {
    min-height: 160px;
  }

  #section-team-header,
  .col-fundraiser-image-left {
    min-height: 160px;
  }

  .team-content.sbx-grid,
  .fundraiser-content.sbx-grid {
    display:        flex;
    flex-direction: column;
    gap:            var(--sbx-space-md);
  }

  .team-content .sbx-col,
  .fundraiser-content .sbx-col {
    width: 100% !important;
  }
}


/* ========================================================================== */
/* MANAGE MY FUNDRAISING  (.donationsFundraiser-layDefault)                   */
/* v93: fill gap fixed (::before on .bar replaces ::after flex layout);      */
/*      goal moved above bar, same line as percentage, right-aligned;        */
/*      percent and goal font sizes equalized at 0.875rem.                   */
/* ========================================================================== */

/* -- Page heading ---------------------------------------------------------- */
.donationsFundraiser-layDefault h1.componentheading {
  font-size:      clamp(1.5rem, 3vw, 2rem);
  font-weight:    700;
  color:          var(--sbx-text-heading);
  margin-bottom:  var(--sbx-space-xl);
  padding-bottom: 0;
  border-bottom:  none;
  letter-spacing: -0.01em;
}

/* -- Card grid: auto-fill (3-col desktop / 2 tablet / 1 mobile) ------------ */
.donationsFundraiser-layDefault #sectFundraisers-wrap {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:                   var(--sbx-space-md);
  align-items:           start;
}

/* -- Card: vertical flex column -------------------------------------------- */
.donationsFundraiser-layDefault #fundraiser-list .row {
  display:        flex;
  flex-direction: column;
  gap:            var(--sbx-space-md);
  background:     var(--sbx-surface);
  border:         1px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-card);
  padding:        var(--sbx-space-lg);
  margin:         0; /* zero Bootstrap .row negative gutters */
  box-shadow:     var(--sbx-shadow-card);
}

/* -- Title ------------------------------------------------------------------ */
.donationsFundraiser-layDefault .fundraiser-title { min-width: 0; }
.donationsFundraiser-layDefault .fundraiser-title h4 {
  font-size:   var(--sbx-font-size-md);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0;
  line-height: 1.35;
}

/* -- Details wrapper -------------------------------------------------------- */
.donationsFundraiser-layDefault .fundraiser-details { min-width: 0; }

/* -- Progress bar ----------------------------------------------------------- */
/* Stats-row layout above the 20px track:                                     */
/*   [1020%]──────────────────────[$100.00 Goal]   ← same line, above bar   */
/*   [════════fill════╡═══════track══════════]                               */
/*                                                                             */
/* .bar (absolute, bottom:0) has explicit height = text + gap + 20px, so it  */
/* extends above the track container. Text sits at .bar's top, above the      */
/* track. .bar::before is the fill: absolute, left:0, bottom:0, width:100%  */
/* of .bar (= PHP inline width:X%). Using ::before avoids the flex-column    */
/* alignment offset that was causing the left-edge gap.                       */
/*                                                                             */
/* .total: top = -(text-height + gap) puts it on the same line as .bar text. */
/* margin-top:0 !important cancels component's ~-40px negative margin.       */
.donationsFundraiser-layDefault .fundraiser-progress-bar {
  position:      relative;
  overflow:      visible;
  background:    transparent !important;
  border:        none !important;
  height:        20px;           /* track height */
  max-width:     none;
  margin-top:    1.5rem;         /* clearance above for stats row */
  margin-bottom: 0;
  isolation:     isolate;
}

/* Gray track */
.donationsFundraiser-layDefault .fundraiser-progress-bar::before {
  content:       '';
  position:      absolute;
  inset:         0;
  background:    rgb(214, 218, 227);
  border-radius: 5px;
  z-index:       0;
}

/* .bar: absolute, spans text area + gap + 20px fill.                         */
/* Text appears at .bar's top (above container). ::before draws the fill.    */
.donationsFundraiser-layDefault .fundraiser-progress-bar .bar {
  position:    absolute;
  left:        0;
  bottom:      0;
  min-width:   3%;
  height:      calc(20px + 1.09375rem + 1rem); /* track + text-h + gap */
  overflow:    visible;
  padding:     0;
  background:  transparent !important;
  z-index:     1;
  color:       var(--sbx-primary) !important;
  font-size:   0.875rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
  line-height: 1.25;
}

/* Fill: absolutely flush at .bar bottom = at track level, no flex offset */
.donationsFundraiser-layDefault .fundraiser-progress-bar .bar::before {
  content:       '';
  position:      absolute;
  left:          0;
  bottom:        0;
  width:         100%;   /* = .bar's own inline width% from PHP */
  height:        20px;
  background:    var(--sbx-primary) !important;
  border-radius: 5px;
  z-index:       0;
}

/* Goal: same line as percentage, right-aligned.                              */
/* top = -(text-height + gap) = -(0.875rem * 1.25 + 1rem)                   */
.donationsFundraiser-layDefault .fundraiser-progress-bar .total {
  position:    absolute;
  left:        auto !important;
  right:       0;
  top:         calc(-1.09375rem - 1rem);      /* = .bar top = % text top */
  margin-top:  0 !important;                  /* cancel component ~-40px margin */
  transform:   none !important;
  font-size:   0.875rem !important;           /* same size as percentage */
  font-weight: 500 !important;
  color:       var(--sbx-text-muted);
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
  z-index:     2;
}
.donationsFundraiser-layDefault .fundraiser-progress-bar .total::before {
  content: none;
}
.donationsFundraiser-layDefault .fundraiser-progress-bar .total::after {
  content: '\00a0Goal';
}

/* -- Buttons: full-width column stack, pushed to card bottom --------------- */
.donationsFundraiser-layDefault .fundraiser-buttons {
  margin-top:     auto;
  height:         auto !important;   /* override donation-fundraiser.css height:270px */
  display:        flex;
  flex-direction: column;
  gap:            var(--sbx-space-sm);
  align-items:    stretch;
}
.donationsFundraiser-layDefault .fundraiser-buttons > div {
  float: none;
  width: auto;
}
.donationsFundraiser-layDefault .fundraiser-buttons .btn {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           100%;
  padding:         0.6rem 1rem;
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  border-radius:   var(--sbx-radius-btn);
  white-space:     nowrap;
  height:          auto;
  box-sizing:      border-box;
  transition:      background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
/* View = primary filled */
.donationsFundraiser-layDefault .fundraiser-buttons .section-view-fundraiser .btn {
  background: var(--sbx-primary);
  border:     2px solid var(--sbx-primary);
  color:      var(--sbx-text-on-primary);
}
.donationsFundraiser-layDefault .fundraiser-buttons .section-view-fundraiser .btn:hover {
  opacity: 0.88;
}
/* Edit = secondary outline */
.donationsFundraiser-layDefault .fundraiser-buttons .section-edit-fundraiser .btn {
  background: transparent;
  border:     2px solid var(--sbx-primary);
  color:      var(--sbx-primary);
}
.donationsFundraiser-layDefault .fundraiser-buttons .section-edit-fundraiser .btn:hover {
  background: var(--sbx-primary);
  color:      var(--sbx-text-on-primary);
}

/* PHASE 22 — MY TRANSACTIONS MODERNIZATION                                   */
/* Scope: .donationsManage  (My Transactions view of com_donations)           */
/*                                                                            */
/* DOM scope: div.com_donations.donationsManage wraps the entire page view.   */
/* NOTE: resultsTBL is shared with Events — always scope under .donationsManage.*/
/* Added: v117, 2026-05-08                                                    */
/* ========================================================================== */

/* -- Typography normalization: soapboxTypography inflates base to 1.2em ------ */
.donationsManage {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-body);
}

/* -- Page heading ------------------------------------------------------------ */
.donationsManage h1.componentheading {
  font-size:   var(--sbx-font-size-h1);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0 0 var(--sbx-space-md);
  line-height: 1.3;
}

/* -- Section headings (One-Time Transactions, Recurring Donations) ----------- */
/*
 * Headings are div.compSect-title wrappers (not h3.compSect-title elements).
 * Phase 3 / global .donations .compSect-title applies a 2px primary border-bottom.
 * Remove it — the table card immediately below provides visual separation.
 * Small margin-bottom pulls heading close to the card so they read as a unit.
 */
.donationsManage .compSect-title {
  border-bottom:  none;
  padding-bottom: 0;
  margin-bottom:  var(--sbx-space-sm);
}
.donationsManage .compSect-title h3 {
  margin: 0;
}

/* -- Results table wrapper: horizontal scroll guard ------------------------- */
.donationsManage .compResTbl-content {
  overflow:      hidden;
  overflow-x:    auto;
  -webkit-overflow-scrolling: touch;
}

/* -- Results table ---------------------------------------------------------- */
.donationsManage table.resultsTBL {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-sm) !important; /* soapboxTypography inflates to ~19.2px */
}

.donationsManage table.resultsTBL thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
  text-align:     left;
}

.donationsManage table.resultsTBL tbody td {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-subtle);
  vertical-align: middle;
  color:          var(--sbx-text-body);
  transition:     background var(--sbx-transition);
}

.donationsManage table.resultsTBL tbody tr:last-child td {
  border-bottom: none;
}

.donationsManage table.resultsTBL tbody tr:hover td {
  background: var(--sbx-surface-alt);
}

/* Remove Bootstrap zebra — hover state provides the scan aid */
.donationsManage table.resultsTBL tbody tr.row0,
.donationsManage table.resultsTBL tbody tr.row1 {
  background: transparent;
}

/* -- Column alignment: amount right-aligned --------------------------------- */
.donationsManage table.resultsTBL th.ot-amount,
.donationsManage table.resultsTBL td.ot-amount,
.donationsManage table.resultsTBL th.rec-amount,
.donationsManage table.resultsTBL td.rec-amount {
  text-align: right;
}

/* -- Amount value: slight emphasis ------------------------------------------ */
.donationsManage td.ot-amount,
.donationsManage td.rec-amount {
  font-weight: 600;
  color:       var(--sbx-text-heading);
}

/* -- Transaction title / description: muted secondary text ------------------ */
.donationsManage td.ot-desc span.title,
.donationsManage td.rec-desc span.title {
  font-weight: 500;
  color:       var(--sbx-text-body);
}

/* -- Status cell: keep on one line ------------------------------------------ */
.donationsManage td.rec-status {
  white-space: nowrap;
}

/* -- Manage column: sticky right + keep Update/Cancel on one line ----------- */
/*
 * position:sticky; right:0 keeps the actions visible while the data columns
 * scroll horizontally inside the overflow-x:auto wrapper.
 * Explicit background required — sticky cells are transparent by default,
 * which causes scrolling cells to bleed through the stuck column.
 * z-index:1 (td) / z-index:2 (th) ensures the header stacks above sticky TDs.
 * box-shadow casts a soft left-facing shadow to mark the sticky boundary.
 */
.donationsManage th.rec-manage {
  position:   sticky;
  right:      0;
  z-index:    2;
  background: var(--sbx-surface-alt);
  box-shadow: -3px 0 6px rgba(0, 0, 0, 0.06);
}
.donationsManage td.rec-manage {
  position:   sticky;
  right:      0;
  z-index:    1;
  background: #ffffff;
  box-shadow: -3px 0 6px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}
.donationsManage table.resultsTBL tbody tr:hover td.rec-manage {
  background: var(--sbx-surface-alt); /* mirror row hover state on sticky cell */
}

/* -- Update button (primary pill) ------------------------------------------- */
/*
 * .ra-updateLink is a SqueezeBox trigger (has class .modal as well). The
 * global content link rule excludes .modal, so no underline/color conflict.
 * soapbox-bootstrap.min.css applies `position: absolute` to .modal — override
 * with position: static (this rule has higher specificity: 0,1,0,1 vs 0,1,0,0).
 * Styled as a filled primary pill to signal the primary action.
 */
.donationsManage a.ra-updateLink {
  display:          inline-flex;
  align-items:      center;
  position:         static;
  height:           26px;
  padding:          0 var(--sbx-space-sm);
  background:       var(--sbx-primary);
  color:            var(--sbx-text-on-primary) !important;
  border:           none;
  border-radius:    var(--sbx-radius-btn);
  font-size:        var(--sbx-font-size-xs);
  font-weight:      600;
  text-decoration:  none !important;
  white-space:      nowrap;
  cursor:           pointer;
  transition:       background var(--sbx-transition), opacity var(--sbx-transition);
}
.donationsManage a.ra-updateLink:hover {
  background:      var(--sbx-primary-dark);
  text-decoration: none !important;
}

/* -- Cancel link (destructive subtle) --------------------------------------- */
/*
 * Styled as a small plain link in error color — visually subordinate to Update.
 * Margin-left separates it from the pill without requiring a wrapper element.
 */
.donationsManage a.ra-cancelLink {
  display:         inline-flex;
  align-items:     center;
  height:          26px;
  margin-left:     var(--sbx-space-sm);
  font-size:       var(--sbx-font-size-xs);
  font-weight:     500;
  color:           var(--sbx-error) !important;
  text-decoration: none !important;
  white-space:     nowrap;
  cursor:          pointer;
  transition:      color var(--sbx-transition), opacity var(--sbx-transition);
}
.donationsManage a.ra-cancelLink:hover {
  color:           var(--sbx-error-text) !important;
  text-decoration: underline !important;
  opacity:         0.85;
}

/* -- Update subscription modal (body.contentpane) ---------------------------
 * The modal opens via SqueezeBox; body gets class="contentpane" only —
 * no component-specific class is emitted. Rules scoped to body.contentpane
 * affect all modals, so keep these minimal and additive only.
 *
 * HEADING: .compSect-title (div#sectBilling-title) gets border-bottom:2px solid
 * primary from a global Phase 3 rule. Remove — no underline needed in modal.
 *
 * CC FIELD ROW (exp + cvc): soapbox-bootstrap sets span.span-block to ~85% width
 * inside li.complex, causing .el-expiration and .el-cvc (floated left/right)
 * to both take 85% and stack vertically. Fix: flex container on .cntr.right so
 * child span-blocks become proper flex items with explicit sizing.
 *
 * SUBMIT AREA: li.buttons is display:list-item; required text (#reqLine) is
 * an inline sibling pushed far right. Fix: flex container moves required text
 * below the button row as a full-width item.
 *
 * Required text: soapbox-bootstrap declares `ul.compList span.req { color:red!important }`.
 * Body.contentpane has no .sbx ancestor so the global muted rule doesn't apply.
 * Fix: assert muted color directly. Asterisk markers (inside .desc.descLrg) stay red.
 */

/* Billing Information heading — remove primary underline */
body.contentpane .compSect-title {
  border-bottom:  none;
  padding-bottom: 0;
  margin-bottom:  var(--sbx-space-sm);
}

/* CC fields: flex container so firstname/lastname, cc-num, and exp+cvc layout correctly */
body.contentpane #sectCC .cntr.right.rightColPad {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--sbx-space-sm);
}
body.contentpane #cc-firstname,
body.contentpane #cc-lastname {
  flex:       0 0 calc(50% - var(--sbx-space-sm) / 2);
  float:      none;
  min-width:  0;
}
body.contentpane #cc-num {
  flex:  0 0 100%;
  float: none;
}
/* Expiration row: flex so month/slash/year are inline */
body.contentpane #cc-exp {
  flex:        0 0 auto;
  float:       none;
  display:     flex;
  align-items: flex-start;
  gap:         var(--sbx-space-sm);
  width:       auto;
}
body.contentpane #cc-exp > .span-block:not(.symbol) {
  display:        inline-flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            2px;
  width:          auto;
}
body.contentpane #cc-exp > .span-block.symbol {
  padding-top: 6px;
}
/* CVC field: auto-sized, sits beside expiration in flex row */
body.contentpane #cc-cvc {
  flex:           0 0 auto;
  float:          none;
  display:        inline-flex;
  flex-direction: column;
  align-items:    flex-start;
  width:          auto;
}
body.contentpane #cc-cvc input#card_code {
  width: 80px; /* CVV is 3–4 digits; narrow field is intentional */
}

/* Submit area: flex row so button + "or" + cancel read as a coherent unit;
 * required text pushed below via flex-basis:100% + order:10. */
body.contentpane li.buttons {
  display:     flex;
  flex-wrap:   wrap;
  align-items: center;
  gap:         var(--sbx-space-xs) var(--sbx-space-sm);
  list-style:  none;
  padding:     var(--sbx-space-sm) 0 0;
  margin:      0;
}
body.contentpane li.buttons > span.req {
  flex-basis: 100%;
  order:      10; /* push below button row regardless of DOM order */
  margin-top: var(--sbx-space-xs);
}

/* Required text: muted color (soapbox-bootstrap sets red !important via ul.compList span.req) */
body.contentpane .buttons > span.req {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 400;
  color:       var(--sbx-text-muted) !important;
}

/* Whitespace reduction: tighten section wrappers and field-row top padding ---
 * .item-section default: margin-top ~22px + padding-top 24px = 46px overhead.
 * .compSect-wrap default: margin-bottom 32px.
 * li.complex.extraPad default: padding-top 24px.
 * Halved in each case — modal stays breathable, not crammed. */
body.contentpane .item-section {
  margin-top:  12px;
  padding-top: 12px;
}
body.contentpane .compSect-wrap {
  margin-bottom: 16px;
}
body.contentpane li.complex.extraPad {
  padding-top: 10px;
}

/* Field width fix: convert li.complex to flex so label column stays narrow
 * and the field column (.cntr.right / .cntr.address) fills remaining space.
 * Root cause: Bootstrap `ul.compList li.complex div.cntr { margin: 0 15px }`
 * makes both .cntr.left and .cntr.right inherit 85% of the container width.
 * Overriding margin requires !important to beat equal-specificity Bootstrap rule. */
body.contentpane li.complex {
  display:     flex;
  align-items: flex-start;
  flex-wrap:   nowrap;
}
body.contentpane li.complex .cntr.left {
  flex:   0 0 auto;
  float:  none;
  width:  auto;
  margin: 0 !important;
}
body.contentpane li.complex .cntr.right {
  flex:       1;
  float:      none;
  margin:     0 !important;
  min-width:  0;
}
/* Billing address section uses label.desc.descLrg (not .cntr.left) + .cntr.address */
body.contentpane li.complex label.desc.descLrg {
  flex:  0 0 auto;
  float: none;
}
body.contentpane li.complex .cntr.address {
  flex:        1;
  float:       none;
  margin-left: 0 !important;
  min-width:   0;
}

/* "or" spacing: add horizontal breathing room to the symbol span between
 * the Update button (48px tall) and the Cancel link so both gaps feel even. */
body.contentpane li.buttons span.symbol {
  padding: 0 var(--sbx-space-xs);
}

/* -- Modal header: "Update" heading ----------------------------------------
 * soapbox-bootstrap.css applies a grey background to .modal-hdr.
 * Reset and apply standard heading treatment.
 */
body.contentpane .modal-hdr {
  background:      transparent;
  border-bottom:   1px solid var(--sbx-border-subtle);
  padding:         var(--sbx-space-sm) var(--sbx-space-md);
  margin-bottom:   var(--sbx-space-md);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
}

body.contentpane h1.modaltitle {
  font-size:   var(--sbx-font-size-h3); /* 20px — proportionate for modal context */
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0;
  padding:     0;
  background:  transparent;
}

/* -- Cancel button in modal-toolbar ----------------------------------------
 * Bootstrap renders button.button as a grey-filled pill. Convert to the
 * same plain destructive hyperlink used by .cart-item-remove a.btn and
 * button.remove-item (Shop product detail / Shop cart).
 */
body.contentpane .modal-toolbar button.button {
  display:          inline;
  background:       transparent !important;
  background-image: none !important;
  border:           none !important;
  box-shadow:       none !important;
  text-shadow:      none !important;
  padding:          0;
  min-height:       auto;
  color:            var(--sbx-error) !important;
  font-family:      var(--sbx-font-ui);
  font-size:        var(--sbx-font-size-sm);
  font-weight:      400;
  text-decoration:  underline;
  cursor:           pointer;
  border-radius:    0;
}

body.contentpane .modal-toolbar button.button:hover {
  background:      transparent !important;
  text-decoration: underline;
  opacity:         0.8;
}

/* -- Cancel link in form actions -------------------------------------------
 * a.buttonLink.cancel ("or Cancel") — match the toolbar Cancel treatment
 * for visual consistency within the modal.
 */
body.contentpane a.buttonLink.cancel {
  color:           var(--sbx-error) !important;
  text-decoration: underline;
  font-size:       var(--sbx-font-size-sm);
  font-weight:     400;
}

body.contentpane a.buttonLink.cancel:hover {
  opacity: 0.8;
}

/* -- Mobile: condensed padding for narrow viewports ------------------------- */
@media (max-width: 599px) {
  .donationsManage table.resultsTBL thead th,
  .donationsManage table.resultsTBL tbody td {
    padding: var(--sbx-space-xs) var(--sbx-space-sm);
    font-size: var(--sbx-font-size-xs) !important;
  }
  .donationsManage a.ra-updateLink,
  .donationsManage a.ra-cancelLink {
    height:    22px;
    font-size: 0.65rem;
  }
  .donationsManage a.ra-cancelLink {
    margin-left: var(--sbx-space-xs);
  }
}

/* -- My Pledges — empty state ------------------------------------------------
 * When no pledges exist the app renders div.no_contactid_message.alert
 * (Bootstrap yellow alert box). Replace with modern ghost empty-state card.
 * Scope: .donationsMyPledges (body class applied by com_donations pledges view)
 */
.donationsMyPledges .no_contactid_message.alert {
  background:    var(--sbx-surface-alt);
  border:        1.5px dashed var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  color:         var(--sbx-text-muted);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   500;
  padding:       var(--sbx-space-xl) var(--sbx-space-lg);
  text-align:    center;
  max-width:     480px;
  margin:        var(--sbx-space-xl) auto;
  line-height:   1.65;
}


/* ========================================================================== */
/* PHASE 22b — MY PLEDGES: POPULATED STATE MODERNIZATION                     */
/* Scope: .donationsMyPledges (list), .donationsMyPledge (detail + payment)  */
/*                                                                            */
/* Views:                                                                     */
/*   List:    /my-pledges                     — table.tblMyPledges, action   */
/*   Detail:  /my-pledges/pledge/detail/{id}  — bare table, dl, btn          */
/*   Payment: /my-pledges/pledge/payment/{id} — billing section, dl, form    */
/*                                                                            */
/* Added: v137, 2026-05-10                                                    */
/* ========================================================================== */

/* -- Typography base normalization ------------------------------------------ */
/*
 * soapboxTypography inflates base font to 1.2em (≈19px). Reset to base token
 * so table and form text sits at 1rem (16px).
 */
.donationsMyPledges,
.donationsMyPledge {
  font-size: var(--sbx-font-size-base);
  color:     var(--sbx-text-body);
}

/* -- Page headings ----------------------------------------------------------- */
.donationsMyPledges h1.componentheading,
.donationsMyPledge  h1.componentheading {
  font-size:   var(--sbx-font-size-h1);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0 0 var(--sbx-space-md);
  line-height: 1.3;
}

/* -- Intro / outro text: reset system-stylesheet card treatment -------------- */
/*
 * div.section-intro.item-desc carries bg:rgb(249,249,249), border-bottom:5px
 * solid rgb(238,238,238), border-radius:10px, padding:15px from a system
 * stylesheet. Standard intro/outro pattern (matches .donations .section-intro):
 * plain text — font-size, muted color, line-height, margin only.
 */
.donationsMyPledges .section-intro,
.donationsMyPledges .section-outro,
.donationsMyPledge  .section-intro,
.donationsMyPledge  .section-outro {
  background:    transparent !important;
  border:        none !important;
  border-radius: 0 !important;
  padding:       0 !important;
  font-size:     var(--sbx-font-size-lg);
  color:         var(--sbx-text-muted);
  line-height:   1.65;
  margin-bottom: var(--sbx-space-lg);
}

/* -- Table wrapper: horizontal scroll guard on narrow viewports ------------- */
.donationsMyPledges .compResTbl-content,
.donationsMyPledge  .compResTbl-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* -- Table normalization: list (tblMyPledges) and detail (bare table) -------- */
/*
 * Canonical TH pattern (ADR 15): surface-alt bg, muted text, label font-size
 * (13px), uppercase, 0.05em letter-spacing, 1px border-color separator.
 * Row separator on tbody TD border-bottom; last row has no border.
 */
.donationsMyPledges table.tblMyPledges,
.donationsMyPledge  table {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-base);
  color:           var(--sbx-text-body);
}

.donationsMyPledges table.tblMyPledges thead th,
.donationsMyPledge  table thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-family:    var(--sbx-font-ui);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-top:     none;
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
}

/* Suppress 3px border-bottom set by donation-mypledges.css on the tr element.
 * In border-collapse, the tr rule wins over the th 1px rule unless overridden. */
.donationsMyPledges table thead tr,
.donationsMyPledge  table thead tr {
  border-bottom: 0;
}

/* Currency/numeric column headers — right-align to match canonical pattern */
.donationsMyPledges table.tblMyPledges thead th:nth-child(3),  /* PLEDGE AMOUNT */
.donationsMyPledges table.tblMyPledges thead th:nth-child(4),  /* PAID AMOUNT */
.donationsMyPledges table.tblMyPledges thead th:nth-child(5) { /* REMAINING BALANCE */
  text-align: right;
}

.donationsMyPledges table.tblMyPledges tbody td,
.donationsMyPledge  table tbody td {
  padding:        var(--sbx-space-sm);
  border-bottom:  1px solid var(--sbx-border-subtle);
  vertical-align: middle;
  font-size:      var(--sbx-font-size-base);
}

.donationsMyPledges table.tblMyPledges tbody tr:last-child td,
.donationsMyPledge  table tbody tr:last-child td {
  border-bottom: none;
}

/* -- Action button: "View Pledge" (list) ------------------------------------- */
/*
 * a.a2button.btn.btnViewMyPledge — Bootstrap .btn applies box-shadow (inset
 * white + drop) and text-shadow (white 1px). Both reset. Primary fill matches
 * btnMakePayment on the detail view for visual consistency within this flow.
 */
.donationsMyPledges a.a2button {
  display:         inline-flex;
  align-items:     center;
  height:          34px;
  padding:         0 var(--sbx-space-sm);
  background:      var(--sbx-primary);
  border:          1px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  color:           var(--sbx-btn-primary-text);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  text-decoration: none;
  white-space:     nowrap;
  box-shadow:      none;
  text-shadow:     none;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition),
                   color var(--sbx-transition);
}

.donationsMyPledges a.a2button:hover,
.donationsMyPledges a.a2button:focus {
  background:      var(--sbx-primary-dark);
  border-color:    var(--sbx-primary-dark);
  color:           var(--sbx-btn-primary-text);
  text-decoration: none;
  outline:         none;
}

/* -- Action button: "Make Payment" (detail) ---------------------------------- */
/*
 * a.a2button.btn.btnMakePayment — Bootstrap .btn box-shadow and text-shadow
 * make white text on primary bg look thick/muddy. Both explicitly reset.
 */
.donationsMyPledge a.btnMakePayment {
  display:         inline-flex;
  align-items:     center;
  height:          38px;
  padding:         0 var(--sbx-space-md);
  background:      var(--sbx-primary);
  border:          1px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  color:           var(--sbx-btn-primary-text);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-base);
  font-weight:     600;
  text-decoration: none;
  white-space:     nowrap;
  box-shadow:      none;
  text-shadow:     none;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition),
                   color var(--sbx-transition);
}

.donationsMyPledge a.btnMakePayment:hover,
.donationsMyPledge a.btnMakePayment:focus {
  background:      var(--sbx-primary-dark);
  border-color:    var(--sbx-primary-dark);
  color:           var(--sbx-btn-primary-text);
  text-decoration: none;
  outline:         none;
}

/* -- Definition list: pledge summary (detail + payment top) ----------------- */
/*
 * dl.definition-list.flex.row-wrap.align-content-start — two-column dt/dd
 * layout with row separator borders. Same 40/60 split used in eventsManage.
 */
.donationsMyPledge dl.definition-list {
  display:    flex;
  flex-wrap:  wrap;
  gap:        0;
  margin:     0 0 var(--sbx-space-md);
  padding:    0;
  list-style: none;
}

.donationsMyPledge dl.definition-list dt {
  flex-basis:  40%;
  font-size:   var(--sbx-font-size-sm);
  font-weight: 600;
  color:       var(--sbx-text-muted);
  padding:     var(--sbx-space-xs) var(--sbx-space-sm) var(--sbx-space-xs) 0;
  border-bottom: 1px solid var(--sbx-border-subtle);
  margin:      0;
}

.donationsMyPledge dl.definition-list dd {
  flex-basis:  60%;
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-body);
  padding:     var(--sbx-space-xs) 0;
  border-bottom: 1px solid var(--sbx-border-subtle);
  margin:      0;
}

.donationsMyPledge dl.definition-list dt:last-of-type,
.donationsMyPledge dl.definition-list dd:last-of-type {
  border-bottom: none;
}

/* -- Payment: billing section — remove legacy grey background ---------------- */
/*
 * .section-billing#donate-billing carries background:rgb(241,241,241) from
 * soapboxTypography / module inline styles. Replace with bordered card using
 * surface-alt bg to maintain visual grouping without the dated grey wash.
 */
.donationsMyPledge .section-billing {
  background:    var(--sbx-surface-alt) !important;
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-md) !important;
  margin-bottom: var(--sbx-space-md);
}

/* -- Payment: "Secure Payment" section heading ------------------------------- */
/*
 * h3.title renders at ~30px (1.6em × inflated 1.2em base). Normalize to h3 token.
 */
.donationsMyPledge h3.title {
  font-size:   var(--sbx-font-size-h3);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0 0 var(--sbx-space-md);
  line-height: 1.3;
}

/* -- Responsive: ≤767px ----------------------------------------------------- */
@media (max-width: 767px) {
  /*
   * Horizontal scroll: div#page (the scope div) is the direct parent of both
   * the pledge list table and the payment schedule table — and already our CSS
   * scope target. Setting overflow-x:auto here turns the content section into
   * an intentional horizontal scroll zone. All ancestors are position:static
   * with no height constraint, so the overflow-y upgrade to auto is harmless.
   * The scroll applies only at ≤767px; desktop is unaffected.
   */
  .donationsMyPledges,
  .donationsMyPledge {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .donationsMyPledges table.tblMyPledges thead th,
  .donationsMyPledge  table thead th {
    font-size:   var(--sbx-font-size-xs);
    padding:     var(--sbx-space-xs);
    white-space: normal; /* allow header text to wrap, reducing minimum column width */
  }

  .donationsMyPledges table.tblMyPledges tbody td,
  .donationsMyPledge  table tbody td {
    font-size: var(--sbx-font-size-sm);
    padding:   var(--sbx-space-xs);
  }

  .donationsMyPledge dl.definition-list dt { flex-basis: 45%; }
  .donationsMyPledge dl.definition-list dd { flex-basis: 55%; }

  .donationsMyPledge .section-billing {
    padding: var(--sbx-space-sm) !important;
  }
}


/* ========================================================================== */
/* PHASE 23 — EVENTS: MONTHLY CALENDAR MODERNIZATION                         */
/* Scope: .sbxEvents-cal  (monthly calendar view of com_sbxEvents)           */
/*                                                                            */
/* DOM scope: div.com_sbxEvents.sbxEvents-cal                                */
/* Key tables:                                                                */
/*   table.cal-monthNavTBL — 3-cell navigation (prev / current month / next) */
/*   table.cal-monthTBL    — 7-col grid (thead weekday heads + tbody rows)   */
/* Cell classes:                                                              */
/*   td.cal-wd      — active day cells                                        */
/*   td.cal-wdEmpty — other-month filler cells                                */
/*   td.cal-today   — current day (no built-in styling)                       */
/* Interior structure:                                                        */
/*   div.cal-wdBox > div.cal-wdNum > span.cal-num > a  (day number link)     */
/*   div.cal-wdBox > div.cal-wdEmptyName > span        (empty-cell month name)*/
/*   div.cal-wdBox > div.cal-wdItem > a                (event links, if any) */
/* Mobile: th.cal-wdHead contains .hidden-phone (3-letter) + .visible-phone  */
/*   (1-letter) spans; Bootstrap 2 visibility utilities control display.     */
/* Added: v122, 2026-05-08                                                    */
/* ========================================================================== */

/* -- Base normalization: kill soapboxTypography inflation in cal scope ----- */
.sbxEvents-cal {
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-body);
}

/* ── Navigation bar ────────────────────────────────────────────────────────── */

/*
 * Nav uses a 3-column <table>: prev cell / current month / next cell.
 * Each prev/next cell contains two stacked divs: div.cal-year (year nav)
 * and div.cal-month (month nav). display:flex on <table> does not propagate
 * to td children (TDs stay table-cell), so we keep native table layout and
 * use display:inline-block on the inner divs to lay them side-by-side.
 *
 * Visual hierarchy:
 *   Left:   [« year]  [‹ Month Name]    — year icon (quiet) + month ghost btn
 *   Center: [May 2026]                  — bold heading
 *   Right:  [Month Name ›]  [» year]   — month ghost btn + year icon (quiet)
 */
.sbxEvents-cal table.cal-monthNavTBL {
  width:           100%;
  border:          none;
  border-collapse: separate;
  table-layout:    fixed;
  margin-bottom:   var(--sbx-space-md);
  background:      transparent;
}

.sbxEvents-cal table.cal-monthNavTBL td {
  border:         none;
  background:     transparent;
  padding:        var(--sbx-space-xs) 0;
  vertical-align: middle;
  white-space:    nowrap;
}

/* -- Cell text alignment ---------------------------------------------------- */
.sbxEvents-cal table.cal-monthNavTBL td.cal-navmonthPrev { text-align: left; }
.sbxEvents-cal table.cal-monthNavTBL td.cal-navthismonth { text-align: center; }
.sbxEvents-cal table.cal-monthNavTBL td.cal-navmonthNext { text-align: right; }

/* -- Year/month divs inline within prev/next cells -------------------------- */
.sbxEvents-cal table.cal-monthNavTBL td .cal-year,
.sbxEvents-cal table.cal-monthNavTBL td .cal-month {
  display:        inline-block;
  vertical-align: middle;
}

.sbxEvents-cal table.cal-monthNavTBL td.cal-navmonthPrev .cal-prevyear { margin-right: var(--sbx-space-xs); }
.sbxEvents-cal table.cal-monthNavTBL td.cal-navmonthNext .cal-nextyear { margin-left: var(--sbx-space-xs); }

/* -- Current month title ---------------------------------------------------- */
/*
 * Scoped to .cal-thismonth > span to avoid matching span.month inside
 * the prev/next link buttons (which also live under td.cal-navmonth).
 */
.sbxEvents-cal table.cal-monthNavTBL td.cal-navthismonth .cal-thismonth span {
  display:     block;
  font-family: var(--sbx-font-ui);
  font-size:   var(--sbx-font-size-h3);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  white-space: nowrap;
}

/* -- Month nav links: primary ghost buttons --------------------------------- */
.sbxEvents-cal table.cal-monthNavTBL td .cal-month a {
  display:         inline-flex;
  align-items:     center;
  gap:             var(--sbx-space-xs);
  height:          36px;
  padding:         0 var(--sbx-space-sm);
  background:      transparent;
  border:          1px solid var(--sbx-border-color);
  border-radius:   var(--sbx-radius-btn);
  color:           var(--sbx-text-body);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  text-decoration: none;
  white-space:     nowrap;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition),
                   color var(--sbx-transition);
}

.sbxEvents-cal table.cal-monthNavTBL td .cal-month a:hover,
.sbxEvents-cal table.cal-monthNavTBL td .cal-month a:focus {
  background:   var(--sbx-surface-alt);
  border-color: var(--sbx-primary);
  color:        var(--sbx-primary);
  outline:      none;
}

/* -- Year nav links: quiet secondary icon buttons --------------------------- */
.sbxEvents-cal table.cal-monthNavTBL td .cal-year a {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           28px;
  height:          28px;
  background:      transparent;
  border:          1px solid var(--sbx-border-subtle);
  border-radius:   var(--sbx-radius-sm);
  color:           var(--sbx-text-muted);
  font-size:       var(--sbx-font-size-xs);
  text-decoration: none;
  transition:      background var(--sbx-transition), border-color var(--sbx-transition),
                   color var(--sbx-transition);
}

.sbxEvents-cal table.cal-monthNavTBL td .cal-year a:hover,
.sbxEvents-cal table.cal-monthNavTBL td .cal-year a:focus {
  background:   var(--sbx-surface-alt);
  border-color: var(--sbx-border-color);
  color:        var(--sbx-text-body);
  outline:      none;
}

/* em.arrow: non-italic, inherit parent size */
.sbxEvents-cal table.cal-monthNavTBL a em.arrow {
  font-style:  normal;
  line-height: 1;
}

/* ── Calendar grid table ────────────────────────────────────────────────────── */

.sbxEvents-cal table.cal-monthTBL {
  width:           100%;
  border-collapse: collapse;
  border:          none;
  table-layout:    fixed;
}

/* ── Weekday header row ──────────────────────────────────────────────────── */
/*
 * Canonical table-heading pattern (v120 ADR 15): surface-alt bg, muted text,
 * font-size-label (13px), uppercase, 0.05em letter-spacing, 1px border-color.
 * No row-level background — styling lives on th.
 */
.sbxEvents-cal table.cal-monthTBL thead tr.cal-weekHead {
  background: transparent;
}

.sbxEvents-cal table.cal-monthTBL thead th.cal-wdHead {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-family:    var(--sbx-font-ui);
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align:     center;
  padding:        var(--sbx-space-sm) var(--sbx-space-xs);
  border:         1px solid var(--sbx-border-color);
}

/* ── Grid cell base ─────────────────────────────────────────────────────────── */

.sbxEvents-cal table.cal-monthTBL tbody td.cal-wd,
.sbxEvents-cal table.cal-monthTBL tbody td.cal-wdEmpty,
.sbxEvents-cal table.cal-monthTBL tbody td.cal-today {
  border:          1px solid var(--sbx-border-subtle);
  vertical-align:  top;
  padding:         0;
  background:      var(--sbx-surface);
}

/* Inner box: consistent min-height and padding */
.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdBox {
  min-height: 80px;
  padding:    var(--sbx-space-xs);
}

/* ── Date number ─────────────────────────────────────────────────────────────── */

.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdNum {
  text-align:    right;
  margin-bottom: var(--sbx-space-xs);
}

.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdNum .cal-num a,
.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdNum .cal-num {
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  color:           var(--sbx-text-muted);
  text-decoration: none;
}

.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdNum .cal-num a:hover {
  color:           var(--sbx-primary);
  text-decoration: none;
}

/* ── Today cell: distinctive but not loud ───────────────────────────────────── */

.sbxEvents-cal table.cal-monthTBL tbody td.cal-today {
  background: var(--sbx-primary-pale);
  border:     1px solid var(--sbx-primary);
}

/*
 * Today's date number: circular primary badge.
 * width/height explicit (not min-width) to guarantee a true square before
 * border-radius:50% renders it as a circle. padding:0 (flex centering handles
 * the text alignment). !important on color: beats the #content a:not(...)
 * rule at specificity (1,5,1) which would otherwise override to --sbx-text-link.
 */
.sbxEvents-cal table.cal-monthTBL tbody td.cal-today .cal-wdNum .cal-num a,
.sbxEvents-cal table.cal-monthTBL tbody td.cal-today .cal-wdNum .cal-num {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           24px;
  height:          24px;
  padding:         0;
  background:      var(--sbx-primary);
  border-radius:   50%;
  color:           var(--sbx-text-on-primary) !important;
  font-weight:     700;
  font-size:       var(--sbx-font-size-xs);
  text-decoration: none;
}

/* ── Empty (other-month) cells: visually quiet ──────────────────────────────── */

.sbxEvents-cal table.cal-monthTBL tbody td.cal-wdEmpty {
  background: var(--sbx-surface-muted);
  border:     1px solid var(--sbx-border-subtle);
}

/* Other-month name text: small, muted, unobtrusive */
.sbxEvents-cal table.cal-monthTBL tbody td.cal-wdEmpty .cal-wdEmptyName span {
  display:    block;
  text-align: center;
  color:      var(--sbx-text-muted);
  font-size:  var(--sbx-font-size-xs);
  opacity:    0.6;
  margin-top: var(--sbx-space-xs);
}

/* ── Event links inside cells ───────────────────────────────────────────────── */
/*
 * Event items render as div.cal-wdItem > a. Pill/label treatment: primary bg
 * at low opacity so the grid date hierarchy stays dominant. Text truncates on
 * narrow cells; tooltip on title attr handles overflow.
 */
.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdItem {
  margin-top: 2px;
}

.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdItem a {
  display:         block;
  padding:         2px var(--sbx-space-xs);
  background:      rgba(var(--sbx-primary-rgb), 0.12);
  border-left:     2px solid var(--sbx-primary);
  border-radius:   var(--sbx-radius-sm);
  color:           var(--sbx-primary);
  font-size:       var(--sbx-font-size-xs);
  font-weight:     600;
  text-decoration: none;
  white-space:     nowrap;
  overflow:        hidden;
  text-overflow:   ellipsis;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdItem a:hover,
.sbxEvents-cal table.cal-monthTBL tbody td .cal-wdItem a:focus {
  background:      rgba(var(--sbx-primary-rgb), 0.22);
  color:           var(--sbx-primary);
  text-decoration: none;
  outline:         none;
}

/* ── MooTools popup overlay ──────────────────────────────────────────────────── */
/*
 * openPopOut(day) renders a #calPopOut div via Fx.Style opacity fade.
 * Give it surface treatment + shadow so it reads clearly above the grid.
 */
#calPopOut {
  background:  var(--sbx-surface);
  border:      1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-card);
  box-shadow:  0 4px 16px rgba(0, 0, 0, 0.12);
  padding:     var(--sbx-space-md);
}

/* ── Filter bar (category/month selector above grid) ───────────────────────── */
/*
 * The CMS renders: form#filter > label.desc + span > select + span > button
 * Base styles float all children left → form height:0 (clearfix failure) and
 * the 26px label top-aligns against 48px select/button.
 * display:flex on the form overrides float layout and centers the label.
 */
.sbxEvents-cal #filter {
  display:       flex;
  flex-wrap:     wrap;
  align-items:   center;
  gap:           var(--sbx-space-sm);
  margin-bottom: var(--sbx-space-md);
}

.sbxEvents-cal #filter label.desc {
  float:          none;   /* neutralize the base float:left */
  margin-bottom:  0;      /* neutralize block label bottom margin */
  font-size:      var(--sbx-font-size-label);
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sbxEvents-cal #filter > span {
  float: none;  /* flex parent ignores float; explicit for clarity */
}

/* ── Responsive: ≤767px (Bootstrap 2 phone breakpoint) ─────────────────────── */

@media (max-width: 767px) {
  /* -- Nav: arrow-only month buttons, hide year nav and month names ---------- */
  /* Year nav takes up precious space at 7-column mobile width; hide it. */
  .sbxEvents-cal table.cal-monthNavTBL td .cal-year {
    display: none;
  }
  /* Hide the month name text inside each nav button; show arrow only. */
  .sbxEvents-cal table.cal-monthNavTBL td .cal-month a .month {
    display: none;
  }
  /* Square up the arrow-only button: 36×36px centered. */
  .sbxEvents-cal table.cal-monthNavTBL td .cal-month a {
    width:           36px;
    padding:         0;
    justify-content: center;
  }
  /* Reduce month title size */
  .sbxEvents-cal table.cal-monthNavTBL td.cal-navthismonth .cal-thismonth span {
    font-size: var(--sbx-font-size-base);
  }

  /* -- Grid: compress min-height so 7 columns fit comfortably --------------- */
  .sbxEvents-cal table.cal-monthTBL tbody td .cal-wdBox {
    min-height: 44px;
    padding:    2px;
  }

  /* -- Date numbers smaller on mobile --------------------------------------- */
  .sbxEvents-cal table.cal-monthTBL tbody td .cal-wdNum .cal-num a,
  .sbxEvents-cal table.cal-monthTBL tbody td .cal-wdNum .cal-num {
    font-size: var(--sbx-font-size-xs);
  }

  /* -- Today badge: slightly smaller, remains circular ---------------------- */
  .sbxEvents-cal table.cal-monthTBL tbody td.cal-today .cal-wdNum .cal-num a,
  .sbxEvents-cal table.cal-monthTBL tbody td.cal-today .cal-wdNum .cal-num {
    width:     20px;
    height:    20px;
    font-size: 0.6rem;
  }

  /* -- Event dot indicators (iOS Calendar pattern) -------------------------- */
  /*
   * At 7 columns and ~375px, cell width is ≈53px — too narrow for text pills.
   * Replace with a centered 6px primary dot per event. The link remains
   * clickable (navigates to event detail); the dot signals "event exists here."
   */
  .sbxEvents-cal table.cal-monthTBL tbody td .cal-wdItem {
    text-align: center;
    margin-top: 2px;
  }
  .sbxEvents-cal table.cal-monthTBL tbody td .cal-wdItem a {
    display:       inline-block;
    width:         6px;
    height:        6px;
    padding:       5px;
    box-sizing:    content-box;
    background:    var(--sbx-primary);
    border:        none;
    border-radius: 50%;
    font-size:     0;
    text-decoration: none;
  }

  /* -- Empty-cell month name: hide at mobile (no column space) -------------- */
  .sbxEvents-cal table.cal-monthTBL tbody td.cal-wdEmpty .cal-wdEmptyName span {
    display: none;
  }
}

/* -- Page Intro / Outro normalization (v208) -------------------------------- */
/*
 * !important required on font-size and line-height: .com_sbxEvents .compDesc-content
 * (Phase 14, line 4570) carries !important and the calendar wrapper
 * .com_sbxEvents.sbxEvents-cal is an ancestor — same conflict resolved for
 * Classes Browse in v206 (.sbxEvents-insLayDefault).
 */
.sbxEvents-calLayDefault .compDescIntro-content {
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-lg) !important;
  line-height: 1.65 !important;
}
.sbxEvents-calLayDefault .calDesc-intro {
  margin-bottom: var(--sbx-space-lg);
}
.sbxEvents-calLayDefault .compDescOutro-content {
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-lg) !important;
  line-height: 1.65 !important;
}
.sbxEvents-calLayDefault .calDesc-outro {
  margin-top: var(--sbx-space-xl);
}


/* ========================================================================== */
/* PHASE 24 — EVENTS: SHOPPING CART ALIGNMENT                                 */
/* Scope: .sbxEvents-cartLayDefault (events-only discriminator)               */
/*        .sbxEvents-cart where shared with Shop cart                         */
/* Added: v152, 2026-05-11; Extended: v160–v161, 2026-05-12 (Shop parity)    */
/*                                                                            */
/* Events cart wrapper:                                                       */
/*   div.com_sbxEvents.sbxEvents-cart.sbxEvents-cartLayDefault                */
/* .sbxEvents-cartLayDefault NOT present on Shop cart — safe discriminator.   */
/*                                                                            */
/* Confirmed markup (Playwright recon):                                       */
/*   Item table: table.table.events-cart.cart-table                           */
/*   Attendee remove: td.cart-ticket-attendee-remove > a.btn                  */
/*   Donation section: div.foot-donation inside .cart-total                   */
/*   Section heading: div.compSect-title > h3 > span                          */
/*   Checkbox: li.notStacked > span.span-block                                */
/*             input.field.checkbox + label.choice.desc                       */
/* ========================================================================== */

/* -- Attendee-row remove link: match Shop cart destructive link style ------- */
.sbxEvents-cart .cart-ticket-attendee-remove a.btn {
  background:      transparent;
  border:          none;
  box-shadow:      none;
  padding:         0;
  color:           var(--sbx-error);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     400;
  text-decoration: underline;
  line-height:     1;
}

.sbxEvents-cart .cart-ticket-attendee-remove a.btn:hover {
  color:           var(--sbx-error);
  text-decoration: underline;
  background:      transparent;
  box-shadow:      none;
}

.sbxEvents-cart .cart-ticket-attendee-remove a.btn:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
  border-radius:  var(--sbx-radius-sm);
}

/* -- Item table: right-align numeric columns -------------------------------- */
/*
 * Events cart uses .item-price / .item-qty / .item-total as td class names.
 * (Shop cart uses .item-price-column etc. — different selector set.)
 */
.sbxEvents-cartLayDefault .cart-table td.item-price,
.sbxEvents-cartLayDefault .cart-table td.item-qty,
.sbxEvents-cartLayDefault .cart-table td.item-total {
  text-align: right;
}

/* Ticket and attendee name: heading weight */
.sbxEvents-cartLayDefault .cart-table .cart-ticket-name {
  font-weight: 600;
  color:       var(--sbx-text-heading);
  font-size:   var(--sbx-font-size-base);
}

.sbxEvents-cartLayDefault .cart-table .cart-ticket-attendee-name {
  font-weight: 500;
  color:       var(--sbx-text-body);
  font-size:   var(--sbx-font-size-sm);
}

/* -- Label font weight: normalize cart form labels -------------------------- */
/*
 * label.desc emits at 600/14px from component defaults.
 * Normalize to 500 to reduce visual weight and match Shop form labels.
 */
.sbxEvents-cartLayDefault .compSect-contentwrap label.desc {
  font-weight: 500 !important;
  font-size:   var(--sbx-font-size-base) !important;
}

/* -- Contact / Section headings --------------------------------------------- */
/*
 * Events cart uses div.compSect-title > h3 > span (not div.section-header > h3.title).
 * Mirror Shop cart section-header treatment: heading color, strip system chrome.
 */
.sbxEvents-cartLayDefault .compSect-title {
  padding:       0;
  margin-bottom: var(--sbx-space-sm);
  background:    transparent;
  border-bottom: none;
}

.sbxEvents-cartLayDefault .compSect-title h3 {
  color:         var(--sbx-text-heading) !important;
  margin-bottom: 0;
  font-size:     var(--sbx-font-size-h3);
  font-weight:   700;
}

.sbxEvents-cartLayDefault .compSect-title h3 span {
  font-size:   inherit;
  font-weight: inherit;
  color:       inherit;
}

.sbxEvents-cartLayDefault .compSect-wrap {
  margin-bottom: var(--sbx-space-lg);
}

/* -- Optional Donation section: card block treatment ------------------------ */
/*
 * div.foot-donation lives inside .cart-total in Events cart (unlike Shop where
 * it is above .cart-total). Strategy: flex-column on .cart-total, render
 * foot-donation as a full-width card above the total row via order:-1.
 */
.sbxEvents-cartLayDefault .cart-total {
  display:        flex;
  flex-direction: column;
  gap:            var(--sbx-space-md);
}

.sbxEvents-cartLayDefault .cart-total .foot-donation {
  display:       flex;
  align-items:   center;
  gap:           var(--sbx-space-md);
  padding:       var(--sbx-space-md);
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  order:         -1;
  width:         100%;
  box-sizing:    border-box;
}

.sbxEvents-cartLayDefault .cart-total .foot-donation-left {
  flex:      1;
  min-width: 0;
}

#form-donation-title {
  font-weight: 600;
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-heading);
}

#form-donation-desc {
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-muted);
  margin-top: 2px;
}

.sbxEvents-cartLayDefault .cart-total .foot-donation-right {
  flex-shrink: 0;
}

.sbxEvents-cartLayDefault .cart-total .foot-donation-clear {
  display: none;
}

/* -- Checkbox slider toggle ------------------------------------------------- */
/*
 * Events cart Salesforce checkbox: mirrors Phase 17 (Shop product detail) and
 * Phase 12 (eventsManage) patterns.
 * For/id mismatch (_true suffix) is fixed via JS (fixEventsCartCheckboxToggle).
 */
.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox {
  position: absolute;
  opacity:  0;
  width:    0;
  height:   0;
  margin:   0;
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox:focus {
  outline:    none;
  box-shadow: none;
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox + label.choice {
  position:     relative;
  display:      flex;
  align-items:  center;
  padding-left: 52px;
  min-height:   26px;
  margin:       0 !important;
  cursor:       pointer;
  user-select:  none;
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox + label.choice::before {
  content:       '';
  position:      absolute;
  left:          0;
  top:           50%;
  transform:     translateY(-50%);
  width:         40px;
  height:        24px;
  border-radius: 12px;
  background:    var(--sbx-surface-control);
  border:        1.5px solid var(--sbx-border-strong);
  transition:    background   var(--sbx-motion-fast) var(--sbx-motion-ease),
                 border-color var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox + label.choice::after {
  content:       '';
  position:      absolute;
  left:          3px;
  top:           50%;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    white;
  box-shadow:    0 1px 3px rgba(0,0,0,0.15);
  transition:    left var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox:checked + label.choice::before {
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary-dark);
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox:checked + label.choice::after {
  left: 19px;
}

.sbxEvents-cartLayDefault li.notStacked input[type="checkbox"].field.checkbox:focus-visible + label.choice::before {
  box-shadow: var(--sbx-shadow-focus);
}

/* -- Class name heading: match Shop .item-name ------------------------------ */
/*
 * Events cart td.item-product > h4 carries browser h4 defaults (~1.1rem/bold).
 * Restyle to match Shop cart div.item-name (600/base/heading).
 */
.sbxEvents-cartLayDefault .cart-table td.item-product h4 {
  font-weight: 600;
  font-size:   var(--sbx-font-size-base);
  color:       var(--sbx-text-heading);
  line-height: 1.35;
  margin:      0 0 var(--sbx-space-xs);
}

/* -- Class metadata (.element-data): match Shop .item-custom-fields ul li -- */
/*
 * div.element-data holds Class Number, Instructor, dates, time, days, location.
 * Match the label/muted style of Shop custom-field list items (13px muted).
 */
.sbxEvents-cartLayDefault .cart-table td.item-product .element-data {
  font-size:   var(--sbx-font-size-label);
  color:       var(--sbx-text-muted);
  line-height: 1.5;
  margin:      0;
}

.sbxEvents-cartLayDefault .cart-table td.item-product .element-data strong {
  font-weight: 400;
}

/* -- Course image: match Shop product image (120×120px) --------------------- */
/*
 * Phase 23 set .item-thumb-wrapper to 56×56 for all Events cart pages.
 * Override for the shopping cart specifically to 120×120 to match Shop.
 * Phase 24 (later source order) wins over Phase 23 at equal specificity.
 */
.sbxEvents-cartLayDefault .cart-table .item-thumb-column .item-thumb-wrapper {
  width:  120px;
  height: 120px;
}

/* -- Suppress border between class row and ticket rows ---------------------- */
/*
 * tbody tr has border-bottom:1px solid border-subtle (Phase 23).
 * Event rows (those with td.item-product) should not carry a bottom border;
 * the visual separator appears only after the last ticket row of each class.
 */
.sbxEvents-cartLayDefault .cart-table tbody tr:has(td.item-product) {
  border-bottom: none;
}

/* -- Attendee details: match Shop .item-custom-fields ul li font ------------ */
/*
 * Phase 14 (line 4092) sets .cart-ticket-attendee-details to xs/muted globally.
 * Raise to label-size (13px) inside the shopping cart to match Shop's custom
 * field list text.
 */
.sbxEvents-cartLayDefault .cart-table .cart-ticket-attendee-details {
  font-size:   var(--sbx-font-size-label);
  color:       var(--sbx-text-muted);
  line-height: 1.5;
}

/* -- Total bar: match Shop Subtotal (surface-muted bg + 2px top/bottom border) */
/*
 * Shop form.form-cart .cart-total: surface-muted, border-top/bottom 2px,
 * padding md, font-weight 700.
 * Events .foot-total sits in the .cart-total flex-column; float:none neutralizes
 * the component's class="right" (float:right).
 */
.sbxEvents-cartLayDefault .cart-total .foot-total {
  float:           none;
  width:           100%;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--sbx-space-md);
  background:      var(--sbx-surface-muted);
  border-top:      2px solid var(--sbx-border-color);
  border-bottom:   2px solid var(--sbx-border-color);
  font-weight:     700;
  box-sizing:      border-box;
}

/* -- Ticket price / qty / total: match Shop cart .original style ----------- */
/*
 * Events cart ticket rows use span.cart-ticket-price, span.cart-ticket-quantity,
 * span.cart-ticket-total (not Shop's .original class). Mirror the 700/base/heading
 * style from Phase 23's .item-price-column .original rule.
 */
.sbxEvents-cartLayDefault .cart-table td.item-price span.cart-ticket-price,
.sbxEvents-cartLayDefault .cart-table td.item-total span.cart-ticket-total {
  font-size:   var(--sbx-font-size-base);
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

.sbxEvents-cartLayDefault .cart-table td.item-qty span.cart-ticket-quantity {
  font-size:   var(--sbx-font-size-base);
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

.sbxEvents-cartLayDefault .cart-table td.item-price span.discount,
.sbxEvents-cartLayDefault .cart-table td.item-total span.discount {
  color:     var(--sbx-error);
  font-size: var(--sbx-font-size-sm);
}

/* -- Optional donation input: match Shop cart donation field size + alignment */
/*
 * Shop: form.form-cart .donation-content input { text-align:right; min-height:
 * --sbx-btn-height-sm; width/max-width:90px }.
 * Events: input#donation_option inside .foot-donation-right. Mirror exactly.
 */
.sbxEvents-cartLayDefault #form-donation-input input {
  height:     auto;
  min-height: var(--sbx-btn-height-sm);
  width:      90px;
  max-width:  90px;
  text-align: right;
  flex-shrink: 0;
}

/* -- Required text: move below Checkout button ------------------------------ */
/*
 * .sbx .compList-btns is already flex-wrap (line 1891). Mirror the Donations
 * and .sbxEvents-eventReg patterns: order:2 + flex-basis:100% push the
 * required text to a new full-width row below the button.
 */
.sbxEvents-cartLayDefault .compList-btns li.requiredtext {
  order:      2;
  flex-basis: 100%;
}


/* ========================================================================== */
/* PHASE 5 QA CHECKLIST                                                       */
/*                                                                            */
/* 1. DONATIONS                                                               */
/*    [ ] Section borders appear between Donation / Payment / Contact sections  */
/*    [ ] Amount buttons display as flex row; Phase 3 styles apply correctly    */
/*    [ ] Payment method row shows icons + radio inputs side-by-side            */
/*    [ ] Selected payment type panel gets primary border + focus ring          */
/*    [ ] :has() fallback check -- in older browsers, no panel highlight         */
/*      (functional, just no visual highlight). Acceptable.                   */
/*    [ ] CC / eCheck / Billing address sections show top border separator      */
/*    [ ] Confirmation page shows green success card                            */
/*                                                                            */
/* 2. EVENTS                                                                  */
/*    [ ] Event list: cards separated by bottom border (not separator element)  */
/*    [ ] Event meta: date in semi-bold, host/venue in muted small text         */
/*    [ ] Ticket table: pale-primary header row + alternating row1 background   */
/*    [ ] Subevent accordion: custom border/shadow replaces JS-injected inline  */
/*    [ ] .slds-badge "Required" / "Optional" badges NOT modified               */
/*    [ ] Chevron icon renders as down-pointing triangle                        */
/*    [ ] Subevent table is hidden by default and revealed on click (JS)        */
/*                                                                            */
/* 3. SHOP                                                                    */
/*    [ ] Cart table: primary-pale header, alternating row borders              */
/*    [ ] Item name in heading weight; Remove link in error-red underline       */
/*    [ ] Cart total: flex row label + amount, strong border                    */
/*    [ ] Quantity select: auto height (not 48px) -- proportionate in cart row  */
/*    [ ] Donation add-on input (if enabled): stays 20px height                 */
/*    [ ] App-controlled disabled states (out-of-stock) NOT overridden          */
/*                                                                            */
/* 4. FORMS                                                                   */
/*    [ ] Intro / outro text blocks render in larger muted font                 */
/*    [ ] Submit area has top border separator                                  */
/*    [ ] Repeatable form: add/remove buttons functional (Phase 3 styles apply) */
/*                                                                            */
/* 5. DIRECTORIES                                                             */
/*    [ ] Horizontal search form: fields flex-wrap in a row                     */
/*    [ ] Show/Hide link displays in primary color small text                   */
/*    [ ] Search/Reset/Cancel buttons in inline flex row                        */
/*    [ ] Results blog list: entries separated by bottom border                 */
/*                                                                            */
/* 6. ACTIONS                                                                 */
/*    [ ] Step 1: zip/address form uses Phase 4 input styling                   */
/*    [ ] Target cards: flex row with photo + info; wrap on mobile              */
/*    [ ] Target names in heading weight; title/org/address in muted small      */
/*    [ ] Contact section: fieldset has no border (already removed)             */
/*    [ ] Social share: icon links are 44px circles in primary color            */
/*                                                                            */
/* 7. PETITIONS                                                               */
/*    [ ] Progress widget: flex row with chart + count + goal                   */
/*    [ ] Progress numbers in large primary-color font                          */
/*    [ ] Form section title has primary underline; form fields Phase 4 styles  */
/*    [ ] Letter section styled as left-bordered blockquote region              */
/*    [ ] .is-hidden still hides the form when formtoggle_enable is set         */
/*    [ ] Mobile accordion (Zozo): h3.accordion-petition-header NOT modified    */
/*    [ ] Triple-select (State/Province/Other): JS show/hide still works        */
/*    [ ] Social share: same 44px circle pattern as Actions                     */
/* ========================================================================== */


/* ===========================================================================
   PHASE 15E — Browse Classes / Instructor views
   (.sbxEvents-ins — sbxEvents-insLayDefault)

   Three views share this scope:
     1. Browse Classes  — course section headers + class rows
     2. Instructor grid — profile card grid
     3. Instructor detail — profile header + course section headers + class rows
   =========================================================================== */

/* -- Page intro description ------------------------------------------------- */
/*
 * !important on font-size and line-height required: the Events-scoped rule
 * (.com_sbxEvents .compDesc-content, Phase 14) carries !important to suppress
 * Bootstrap's inflated font size. The Browse wrapper div also carries the
 * com_sbxEvents class, so that rule bleeds onto this element. Both are
 * documented conflicts within template.css — not from a third-party sheet.
 */
.sbxEvents-insLayDefault .compDescIntro-content {
  color:       var(--sbx-text-muted);
  font-size:   var(--sbx-font-size-lg) !important; /* was var(--sbx-font-size-sm)/14px */
  line-height: 1.65 !important;
}

.sbxEvents-insLayDefault .insDesc-intro {
  margin-bottom: var(--sbx-space-lg);
}


/* ===========================================================================
   INSTRUCTOR GRID  (view: instructor list)
   =========================================================================== */

/*
 * Bootstrap .row has negative left/right margins; clear them so the grid
 * fills #content without side bleed. CSS Grid replaces inline-block layout.
 */
/*
 * Bootstrap .row::before/.row::after are clearfix pseudo-elements (display:table).
 * In a CSS Grid context they become extra grid items, pushing .row-cell 5 to a
 * second row. Suppress them — same technique as nav gap fix (Phase 2 v136).
 */
.sbxEvents-insLayDefault .row.instructor-grid::before,
.sbxEvents-insLayDefault .row.instructor-grid::after {
  display: none;
}

.sbxEvents-insLayDefault .row.instructor-grid {
  display:       grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:           var(--sbx-space-xl);
  margin-left:   0;
  margin-right:  0;
  margin-top:    var(--sbx-space-lg);
}

/* Card: centered column, no Bootstrap inline-block behavior */
.sbxEvents-insLayDefault .row-cell {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  width:          auto;   /* override Bootstrap inline-block width */
}

/* Circular avatar — 120px
 * soapbox-responsive-bootstrap.min.css sets img { height: auto !important };
 * !important required on height to fix the square crop. */
.sbxEvents-insLayDefault .event-instructor-image {
  margin-bottom: var(--sbx-space-sm);
}

.sbxEvents-insLayDefault .event-instructor-image img {
  display:       block;
  width:         120px !important;
  height:        120px !important;
  border-radius: 50%;
  object-fit:    cover;
  border:        3px solid var(--sbx-surface);
  box-shadow:    0 0 0 2px var(--sbx-border-color);
  margin:        0 auto;
}

/* Instructor name */
.sbxEvents-insLayDefault .event-instructor-name {
  margin-bottom: var(--sbx-space-xs);
}

.sbxEvents-insLayDefault .event-instructor-name h2.contentheading {
  font-size:   var(--sbx-font-size-base);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0;
  line-height: 1.3;
  word-break:  break-word;
}

/*
 * !important on color + text-decoration: beats
 * "#content a:not(.btn):not(.readon):..." at specificity (0,5,0,1)=101pts.
 */
.sbxEvents-insLayDefault .event-instructor-name a.contentpagetitle {
  color:           var(--sbx-text-link) !important;
  text-decoration: none !important;
}

.sbxEvents-insLayDefault .event-instructor-name a.contentpagetitle:hover {
  color:           var(--sbx-text-link-hover) !important;
  text-decoration: underline !important;
}

/* Instructor title: small muted label */
.sbxEvents-insLayDefault .event-instructor-title {
  flex:          1;        /* push the button to the bottom of each card */
  margin-bottom: var(--sbx-space-sm);
}

.sbxEvents-insLayDefault .event-instructor-title h3 {
  font-size:      var(--sbx-font-size-label); /* 13px */
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin:         0;
}

/* "Profile & Classes" button: outlined primary */
.sbxEvents-insLayDefault .event-instructor-readmore a.btn {
  background:      transparent;
  border:          1.5px solid var(--sbx-primary);
  color:           var(--sbx-primary);
  border-radius:   var(--sbx-radius-btn);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  padding:         6px 14px;
  text-decoration: none;
  display:         inline-block;
  white-space:     nowrap;
  box-shadow:      none;
  text-shadow:     none;
}

.sbxEvents-insLayDefault .event-instructor-readmore a.btn:hover {
  background:   var(--sbx-primary-pale);
  border-color: var(--sbx-primary-dark);
  color:        var(--sbx-primary-dark);
}


/* ===========================================================================
   INSTRUCTOR DETAIL  (view: single instructor profile header)
   =========================================================================== */

.sbxEvents-insLayDefault .instructor-row {
  display:       flex;
  align-items:   flex-start;
  gap:           var(--sbx-space-lg);
  margin-bottom: var(--sbx-space-xl);
}

/* Constrain and neutralize the Bootstrap col-sm-2 width percentage */
.sbxEvents-insLayDefault .instructor-row .col-sm-2 {
  flex:    0 0 auto;
  width:   auto;
  padding: 0;
}

/* Circular avatar — 96px (larger than the 40px on class detail row)
 * !important on height: same soapbox-responsive-bootstrap conflict as above. */
.sbxEvents-insLayDefault .instructor-row .col-sm-2 img {
  display:       block;
  width:         96px;
  height:        96px !important;
  border-radius: 50%;
  object-fit:    cover;
  border:        3px solid var(--sbx-surface);
  box-shadow:    0 0 0 2px var(--sbx-border-color);
}

/* Bio column */
.sbxEvents-insLayDefault .instructor-row .col-sm-9 {
  flex:      1;
  min-width: 0;
  padding:   0;
}

/* Role / title: small muted label */
.sbxEvents-insLayDefault .instructor-row h4 {
  font-size:      var(--sbx-font-size-label); /* 13px */
  font-weight:    600;
  color:          var(--sbx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin:         0 0 var(--sbx-space-sm);
}


/* ===========================================================================
   COURSE SECTION HEADER  (Browse Classes + Instructor Detail)
   =========================================================================== */

/*
 * .row-fluid is already display:flex from Phase 2. Override Bootstrap column
 * percentages so the image cell is fixed-width and the info cell is flexible.
 */
.sbxEvents-insLayDefault .course-row {
  align-items:    flex-start;
  gap:            var(--sbx-space-md);
  padding-bottom: var(--sbx-space-md);
  padding-top:    var(--sbx-space-md);
  border-top:     1px solid var(--sbx-border-subtle);
  margin-top:     0;
}

/* No top border on the very first course row in a section */
.sbxEvents-insLayDefault .instructor-row + .course-row,
.sbxEvents-insLayDefault .page-content > .sbx .course-row:first-child {
  border-top: none;
  padding-top: 0;
}

/* Image column */
.sbxEvents-insLayDefault .course-row .col-sm-2 {
  flex:    0 0 auto;
  width:   auto;
  padding: 0;
}

/* Course image: square thumbnail
 * !important on height: soapbox-responsive-bootstrap conflict. */
.sbxEvents-insLayDefault .course-row .col-sm-2 img {
  display:       block;
  width:         80px;
  height:        80px !important;
  object-fit:    cover;
  border-radius: var(--sbx-radius-sm);
  border:        1px solid var(--sbx-border-subtle);
}

/* Info column */
.sbxEvents-insLayDefault .course-row .col-sm-9 {
  flex:      1;
  min-width: 0;
  padding:   0;
}

/* Strip Bootstrap .panel.panel-default chrome */
.sbxEvents-insLayDefault .course-row .panel.panel-default {
  background:    transparent;
  border:        none;
  box-shadow:    none;
  border-radius: 0;
  padding:       0;
  margin:        0;
}

/* Course name */
.sbxEvents-insLayDefault .course-row .panel-title {
  font-size:   var(--sbx-font-size-h3); /* 20px */
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0 0 var(--sbx-space-xs);
  padding:     0;
  border:      none;
}

/* Course description */
.sbxEvents-insLayDefault .course-row .hidden-xs p {
  margin:    0;
  color:     var(--sbx-text-muted);
  font-size: var(--sbx-font-size-sm);
}


/* ===========================================================================
   CLASS TABLE  (Browse Classes + Instructor Detail)
   =========================================================================== */

.sbxEvents-insLayDefault .course-table-row {
  margin-bottom: var(--sbx-space-lg);
}

.sbxEvents-insLayDefault table.search-result {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-sm);
  margin:          0;
}

/* Row separators */
.sbxEvents-insLayDefault table.search-result tbody tr {
  border-bottom: 1px solid var(--sbx-border-subtle);
  cursor:        pointer;
  transition:    background 0.1s;
}

.sbxEvents-insLayDefault table.search-result tbody tr:last-child {
  border-bottom: none;
}

.sbxEvents-insLayDefault table.search-result tbody tr:hover {
  background: var(--sbx-surface-alt);
}

/* All cells: consistent padding + baseline alignment */
.sbxEvents-insLayDefault table.search-result td {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  vertical-align: top;
}

/* Column 1: Class name + instructor line + class code */
.sbxEvents-insLayDefault table.search-result td:first-child {
  min-width: 180px;
}

.sbxEvents-insLayDefault table.search-result td:first-child .element-data:first-child strong {
  font-size:   var(--sbx-font-size-base);
  font-weight: 600;
  color:       var(--sbx-text-heading);
}

/* Instructor name and class code: muted small text */
.sbxEvents-insLayDefault table.search-result td:first-child .element-data:not(:first-child) {
  color:     var(--sbx-text-muted);
  font-size: var(--sbx-font-size-xs);
  margin-top: 2px;
}

/* Class code: monospace */
.sbxEvents-insLayDefault table.search-result td:first-child .element-data.hidden-xs {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

/* Column 2: Dates / times / days / age range */
.sbxEvents-insLayDefault table.search-result td:nth-child(2) .element-data {
  line-height: 1.6;
}

/* Column 3: Status + ticket names */
.sbxEvents-insLayDefault table.search-result td.elements-data {
  color:     var(--sbx-text-muted);
  font-size: var(--sbx-font-size-xs);
}

.sbxEvents-insLayDefault table.search-result td.elements-data > div {
  line-height: 1.6;
}

/* Column 4: Details button — filled primary */
.sbxEvents-insLayDefault table.search-result td.text-right {
  white-space:    nowrap;
  vertical-align: middle;
}

.sbxEvents-insLayDefault a.btnDetails {
  display:         inline-block;
  background:      var(--sbx-btn-primary-bg);
  color:           var(--sbx-btn-primary-text) !important;
  border:          none;
  border-radius:   var(--sbx-radius-btn);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  padding:         6px 14px;
  text-decoration: none !important;
  white-space:     nowrap;
  box-shadow:      none;
  text-shadow:     none;
}

.sbxEvents-insLayDefault a.btnDetails:hover {
  background: var(--sbx-primary-dark);
}


/* -- Responsive: instructor grid ------------------------------------------- */
@media (max-width: 767px) {
  .sbxEvents-insLayDefault .row.instructor-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sbx-space-lg);
  }
}

@media (max-width: 400px) {
  .sbxEvents-insLayDefault .row.instructor-grid {
    grid-template-columns: 1fr;
  }
}

/* -- Responsive: class table horizontal scroll ----------------------------- */
@media (max-width: 767px) {
  .sbxEvents-insLayDefault .course-table-row .col-sm-12 {
    overflow-x:                  auto;
    -webkit-overflow-scrolling:  touch;
  }

  .sbxEvents-insLayDefault .instructor-row {
    gap: var(--sbx-space-md);
  }

  .sbxEvents-insLayDefault .instructor-row .col-sm-2 img {
    width:  72px;
    height: 72px !important;
  }
}


/* ===========================================================================
   STREAM 19 — Layout System, Header Polish, Full-Bleed Content Architecture
   v172 | 2026-05-17
   ===========================================================================

   Parts implemented:
     S19 P1 — Desktop header polish (header-padding-x, border-bottom — see Phase 2 edits above)
     S19 P2 — Body width strategy tokens (content-width-wide, content-width-text — see :root above)
     S19 P3 — Footer philosophy (border-top accent — see Phase 2 edit above)
     S19 P4 — Full-bleed hero system (.sbx-hero + modifiers)
     S19 P5 — Editorial utility patterns (.sbx-callout, .sbx-stat-block, .sbx-banner)
     S19 P6 — Events My Classes (search view modernization)

   =========================================================================== */

/* ===========================================================================
   S19 P4 — FULL-BLEED HERO SYSTEM
   ===========================================================================

   .sbx-hero
     Canonical breakout hero — escapes #content card padding on top/left/right,
     fills the full card width (touching the card border). The hero still respects
     the content card's max-width; it does NOT break to viewport edge.

     This is intentional: the card-contained hero keeps visual consistency with
     the header/footer layout rhythm and avoids overflow issues on all devices.

     Usage: apply .sbx-hero to the outermost element of any hero/banner section
     that lives as the FIRST child of #content.

   Modifiers:
     .sbx-hero--tall      min-height 360px (event / campaign page flagship)
     .sbx-hero--short     min-height 180px (supplementary banners)
     .sbx-hero--overlay   dark gradient for text legibility over photography
     .sbx-hero--bottom    aligns content to bottom-left (editorial style)
   =========================================================================== */

.sbx-hero {
  position:      relative;
  overflow:      hidden;
  display:       flex;
  /* COLUMN, not the flex default.
     The documented usage is "wrap the page title and introductory description",
     and without an explicit direction those two became side-by-side columns at
     different vertical offsets — a heading beside its own paragraph. A single
     child was unaffected, which is why it survived unnoticed: the pattern only
     worked for the one case nobody writes. */
  flex-direction: column;
  align-items:   center;      /* cross axis: horizontal centering */
  justify-content: center;    /* main axis: vertical centering   */
  /* Room for text on narrow screens; without it a centered line touches the
     edges the moment the viewport is smaller than the line. */
  padding:       var(--sbx-space-lg) var(--sbx-space-xl);
  /* Escape #content padding — mirrors clamp(1rem, 3vw, 2rem) in #content */
  margin-top:    calc(-1 * clamp(1rem, 3vw, 2rem));
  margin-left:   calc(-1 * clamp(1rem, 3vw, 2rem));
  margin-right:  calc(-1 * clamp(1rem, 3vw, 2rem));
  margin-bottom: var(--sbx-space-xl);
  min-height:    260px;
  background:    var(--sbx-surface-alt);
  /* Inherit card's top border-radius for flush appearance */
  border-radius: var(--sbx-radius-card) var(--sbx-radius-card) 0 0;
  background-size:     cover;
  background-position: center;
  background-repeat:   no-repeat;
}

/* Gradient overlay for photography legibility — opt-in via .sbx-hero--overlay */
.sbx-hero--overlay::after {
  content:  '';
  position: absolute;
  inset:    0;
  background: linear-gradient(
    to bottom,
    rgba(var(--sbx-overlay-rgb), 0.20) 0%,
    rgba(var(--sbx-overlay-rgb), 0.58) 40%,
    rgba(var(--sbx-overlay-rgb), 0.58) 65%,
    rgba(var(--sbx-overlay-rgb), 0.20) 100%
  );
  pointer-events: none;
}

/* The overlay's light text belongs to the HERO, not to one class inside it.
 *
 * .sbx-hero-title carried the white; anything an admin actually writes — a
 * plain h2 and p — inherits the page's dark body color instead and lands as
 * dark text on a dark scrim. Measured on the lane: both computed
 * rgb(44,44,44) against a 0.58-alpha overlay.
 *
 * Setting it on the container works because the headings inherit: the rules
 * that would otherwise win, like h2.contentheading, are keyed on classes a
 * WYSIWYG never emits. .sbx-hero-title stays more specific and is unaffected.
 */
.sbx-hero--overlay {
  color:       var(--sbx-text-on-primary);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* Hero content sits above overlay */
.sbx-hero > * {
  position: relative;
  z-index:  1;
}

/* -- Modifiers ----------------------------------------------------------- */
.sbx-hero--tall  { min-height: 360px; }
.sbx-hero--short { min-height: 180px; }

/* Bottom-left alignment: editorial/event-detail style.
   The two properties are swapped relative to what they were, because the axes
   swapped with flex-direction. In a row, flex-end was the bottom and flex-start
   was the left; in a column it is the other way round. Left unchanged, --bottom
   would have aligned content top-RIGHT. */
.sbx-hero--bottom {
  align-items:     flex-start;   /* cross axis: left  */
  justify-content: flex-end;     /* main axis: bottom */
  padding:         var(--sbx-space-xl) var(--sbx-space-xl);
}

/* -- Hero inside a content band ------------------------------------------- */
/*
 * The negative margins above exist to escape #content's own clamp() padding,
 * which is correct where the pattern was designed to live — as the first child
 * of #content. Inside a band there is no such padding to escape, so they would
 * pull the hero roughly 29px out of its own module box on three sides.
 *
 * Bleed inside a band is already an admin decision with its own control:
 * sbxw-full. Zeroing here means Emphasis and Width compose instead of fighting,
 * rather than the hero having an opinion about bleed that the Width control
 * then has to argue with. Specificity (0,2,0) beats the base rule's (0,1,0).
 */
.sbxMod-content.sbx-hero {
  margin-top:   0;
  margin-left:  0;
  margin-right: 0;
  border-radius: var(--sbx-radius-card);
}

/* -- Title inside hero --------------------------------------------------- */
.sbx-hero-title {
  font-size:   clamp(1.25rem, 4vw, 2.25rem);
  font-weight: 700;
  color:       var(--sbx-text-on-primary);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  margin:      0;
  line-height: 1.2;
  text-align:  center;
}

.sbx-hero--bottom .sbx-hero-title {
  text-align:  left;
  font-size:   clamp(1.5rem, 4vw, 2.5rem);
}

/* No-image fallback: gradient placeholder, dark title */
.sbx-hero:not([style*="background-image"]) {
  background-image: var(--sbx-p2p-gradient-empty);
}
.sbx-hero:not([style*="background-image"]) .sbx-hero-title {
  color:       var(--sbx-text-heading);
  text-shadow: none;
}

/* -- Mobile: reduce hero height ----------------------------------------- */
@media (max-width: 767px) {
  .sbx-hero        { min-height: 180px; border-radius: var(--sbx-radius-sm) var(--sbx-radius-sm) 0 0; }
  .sbx-hero--tall  { min-height: 240px; }
  .sbx-hero--short { min-height: 120px; }
  .sbx-hero--bottom { padding: var(--sbx-space-lg); }
}


/* ===========================================================================
   S19 P5 — EDITORIAL UTILITY PATTERNS
   ===========================================================================

   Constrained set of opt-in class-based editorial treatments for use inside
   WYSIWYG content areas. Admins apply the class to a container element.

   Patterns:
     .sbx-callout        — highlighted info block with left accent bar
     .sbx-callout--warn  — warning variant (amber)
     .sbx-callout--tip   — tip/success variant (green)
     .sbx-stat-block     — centered large-number + label (fundraising stats)
     .sbx-banner         — full-width tinted campaign band

   NOT a utility-class framework. These are complete, self-contained patterns.
   Do not add arbitrary variants or expose raw layout properties as classes.
   =========================================================================== */

/* -- Callout: highlighted info block with accent bar --------------------- */
.sbx-callout {
  border-left:   4px solid var(--sbx-primary);
  background:    var(--sbx-primary-pale);
  border-radius: 0 var(--sbx-radius-card) var(--sbx-radius-card) 0;
  padding:       var(--sbx-space-md) var(--sbx-space-lg);
  margin:        var(--sbx-space-lg) 0;
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-body);
  line-height:   1.65;
}

.sbx-callout p:last-child,
.sbx-callout ul:last-child {
  margin-bottom: 0;
}

.sbx-callout--warn {
  border-left-color: var(--sbx-warning);
  background:        var(--sbx-warning-bg);
  color:             var(--sbx-warning-text);
}

.sbx-callout--tip {
  border-left-color: var(--sbx-success);
  background:        var(--sbx-success-bg);
  color:             var(--sbx-success-text);
}

/* -- Stat block: large fundraising number + label ------------------------ */
.sbx-stat-block {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  padding:        var(--sbx-space-lg) var(--sbx-space-xl);
  background:     var(--sbx-surface-alt);
  border-radius:  var(--sbx-radius-card);
  border:         1px solid var(--sbx-border-subtle);
}

.sbx-stat-block__number {
  font-size:      clamp(2rem, 6vw, 3.5rem);
  font-weight:    700;
  color:          var(--sbx-primary);
  line-height:    1.1;
  font-variant-numeric: tabular-nums;
}

.sbx-stat-block__label {
  font-size:      var(--sbx-font-size-sm);
  color:          var(--sbx-text-muted);
  margin-top:     var(--sbx-space-xs);
  font-weight:    500;
}

/* -- Banner: full-width tinted content band ------------------------------ */
.sbx-banner {
  background:    var(--sbx-primary-pale);
  border-radius: var(--sbx-radius-card);
  padding:       var(--sbx-space-xl) var(--sbx-space-xl);
  margin:        var(--sbx-space-xl) 0;
  text-align:    center;
  border:        1px solid rgba(var(--sbx-primary-rgb), 0.12);
}

/* Inside a band the Banner is a LAYOUT treatment, not a second background.
   Stacked on a surface it produced two tints doing the same job — measured as
   peach rgb(243,212,196) on near-white rgb(245,247,251) — which reads as an
   unintended box rather than a feature. The band's Surface control owns the
   color; Banner owns the centering and the generous padding. Outside a band it
   keeps its own ground, because there is no surface underneath it there. */
.sbxMod-content.sbx-banner {
  background:    transparent;
  border:        none;
  border-radius: 0;
  margin:        0;
}

/* Banner hardcodes --sbx-text-heading on its headings, which is right on the
   page but wrong on a band: the surface already pairs its own foreground, and
   the heading came out dark navy at 3.64:1 on a brand ground while the
   paragraph beside it was white. Inheriting puts them back in agreement. */
.sbxMod-content.sbx-banner h2,
.sbxMod-content.sbx-banner h3 { color: inherit; }

/* ── item 4: a Hero on a full-bleed band bleeds with it ──
   A rounded inset card inside a stripe that already reaches both edges is the
   worst of both — it reads as a mistake rather than as a card. Callout and Card
   deliberately keep their radius: those ARE insets, and reading as one is the
   point. */
/* A full-bleed hero fills the band outright, so the band's own padding goes.
   Left as-is it showed as a strip of the surface color above and below the
   hero — the band peeking out around its own content.

   This keys off .sbxpat-hero* on the MODULE, which modChrome_sbxBand already
   emits alongside the mapped pattern classes on .sbxMod-content. That is why
   negative vertical margins are not used here: the vertical padding differs by
   position (--below-header and --above-footer each add lg on one side), so any
   margin that cancelled it would have to know which band it was in. */
.sbx-band > .sbxMod.sbxw-full.sbxpat-hero,
.sbx-band > .sbxMod.sbxw-full.sbxpat-hero-overlay {
  padding: 0;
}

/* Scoped exactly like the rule it overrides. `.sbx-band > .sbxMod.sbxw-full
   .sbxMod-content` is (0,3,0) and sits LATER in this file, so an equally
   specific selector here loses on source order — the hero stayed capped at the
   content width and read as a grey card floating on the band's surface. */
.sbx-band > .sbxMod.sbxw-full .sbxMod-content.sbx-hero {
  border-radius: 0;
  margin:        0;
  /* Also drops the content-width cap sbxw-full puts on .sbxMod-content. A hero
     brings its OWN ground — an image, or the placeholder gradient — so leaving
     it capped produced a second background floating on the band's surface, the
     same double-tint that made Banner look like an unintended box. Everything
     else keeps the cap: their job is to sit in the measure. */
  max-width:     none;
  /* sbxw-full puts --sbx-space-lg of padding on the module so ordinary text does
     not touch the viewport edge. A hero has its own padding and wants the true
     edge, so it pulls back out by exactly that amount. Any change to the
     sbxw-full padding has to change here too — they are the same value by
     necessity, not by coincidence. */
  margin-left:   calc(-1 * var(--sbx-space-lg));
  margin-right:  calc(-1 * var(--sbx-space-lg));
}

/* -- Hero on an image band: the band owns the photograph ------------------- */
/*
 * A hero and an image band were two separate ways to put text on a photograph,
 * and used together the hero won by covering the band.
 *
 * The band writes its image as an inline style on .sbxMod (the OUTER element).
 * .sbx-hero sits on .sbxMod-content (the INNER one) and paints an opaque
 * ground of its own, so the photo was hidden underneath it. Worse, the
 * placeholder rule
 *
 *     .sbx-hero:not([style*="background-image"]) { background-image: ... }
 *
 * tests the CONTENT element's own style attribute, which never carries the
 * image -- so it always matched, and a hero with a photograph reliably rendered
 * the "no image chosen" gradient instead.
 *
 * The test itself was not wrong, only misplaced: it moves to the OUTER element,
 * where the style attribute actually is. So a hero with no image chosen still
 * gets its placeholder gradient -- the correct empty state -- and only steps
 * aside once there is a photograph to step aside for.
 *
 * ONE mechanism wins: the band's. The admin picks the image with the Image
 * control that already exists, gets the focal point and Darken controls that
 * come with it, and the hero contributes what it is actually for -- height,
 * centering and content position. Nothing here re-implements a second image
 * picker on the inner element.
 *
 * Specificity (0,5,0) against the placeholder's (0,2,0), so no !important.
 */
.sbx-band > .sbxMod.sbxsurf-image[style*="background-image"] > .sbxMod-content.sbx-hero {
  background-color: transparent;
  background-image: none;
}

/* Light text over the photograph is ALREADY set by .sbxsurf-image on the band
   and inherits down, so the hero does not need .sbx-hero--overlay to get it.
   What the overlay also carried was a shadow, which earns its place over
   photography the moment the scrim is anything but none -- so it moves here,
   keyed on the scrim rather than on a pattern value the admin no longer picks. */
.sbx-band > .sbxMod.sbxsurf-image[style*="background-image"]:not(.sbxscrim-none)
  > .sbxMod-content.sbx-hero {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* DOUBLE DARKENING, suppressed for content saved before Hero had its own type.
 *
 * .sbx-hero--overlay lays its own gradient over the content while the band lays
 * a scrim under it, so `hero-overlay` on an image surface shaded the photo
 * twice and no Darken setting could lighten it back -- Darken controlled only
 * one of the two layers.
 *
 * "Hero over an image" is no longer offered: Hero is one style, and darkening
 * is the Darken control. The pattern value is still RECOGNIZED so existing
 * modules keep classifying as heroes; this rule is what makes them look the
 * same as a newly created one. */
.sbx-band > .sbxMod.sbxsurf-image > .sbxMod-content.sbx-hero--overlay::after {
  display: none;
}

.sbx-banner h2,
.sbx-banner h3 {
  font-family: var(--sbx-font-heading);
  color:       var(--sbx-text-heading);
  margin-top:  0;
}

.sbx-banner p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .sbx-banner { padding: var(--sbx-space-lg); }
  .sbx-callout { padding: var(--sbx-space-sm) var(--sbx-space-md); }
}


/* ===========================================================================
   S19 P6 — EVENTS: MY CLASSES SEARCH VIEW
   ===========================================================================
   Body class: .sbxEvents-search (com_events view=search)

   The component ships search-template.css with hardcoded 'Raleway', #000, #9e9e9e.
   These rules override the component styles to bring the search view into the
   Soapbox Modern token system without modifying the component file.
   =========================================================================== */

/* -- Page title ---------------------------------------------------------- */
.sbxEvents-search h1.componentheading {
  font-family:  var(--sbx-font-heading);
  font-size:    var(--sbx-font-size-h1);
  font-weight:  700;
  color:        var(--sbx-text-heading);
  margin:       0 0 var(--sbx-space-lg);
}

/* -- Page Intro description (v208) --------------------------------------- */
/*
 * The Search Classes view (com_events view=search) does not emit an sbxEvents-*
 * wrapper class in the DOM (confirmed Playwright recon). Scope uses the
 * compound class pair unique to this view: .compDescIntro-content.srchDescIntro-content.
 * Directories intro also carries srchDescIntro-content but adds .compDesc-content;
 * the :not(.compDesc-content) guard isolates the margin rule to Search Classes only.
 * Directories is already canonical (18px/muted) via .com_jsfSearch .compDesc-content.
 */
.compDescIntro-content.srchDescIntro-content {
  font-size:   var(--sbx-font-size-lg);
  color:       var(--sbx-text-muted);
  line-height: 1.65;
}
/* component search.css uses #srchDescIntro-content (ID, specificity 1,0,0) → !important */
.compDescIntro-content.srchDescIntro-content:not(.compDesc-content) {
  margin-bottom: var(--sbx-space-lg) !important;
}

/* -- Search form --------------------------------------------------------- */
/* Override hardcoded Raleway + black border from search-template.css */
.sbxEvents-search input.s-field {
  font-family:   var(--sbx-font-body) !important;
  font-size:     var(--sbx-font-size-input) !important;  /* 1rem — iOS floor */
  color:         var(--sbx-text-body) !important;
  border:        1px solid var(--sbx-border-color) !important;
  border-radius: var(--sbx-radius-input) !important;
  padding:       0.625rem 0.875rem !important;
  height:        var(--sbx-input-height);
  background:    var(--sbx-input-bg);
  width:         100%;
  box-sizing:    border-box;
}

.sbxEvents-search input.s-field:focus {
  border-color:  var(--sbx-primary) !important;
  outline:       none;
  box-shadow:    var(--sbx-shadow-focus);
}

/* Search + Share buttons */
.sbxEvents-search input.s-button {
  font-family:   var(--sbx-font-body) !important;
  font-size:     var(--sbx-font-size-btn) !important;
  font-weight:   600 !important;
  background:    var(--sbx-primary) !important;
  border:        none !important;
  border-radius: var(--sbx-radius-btn) !important;
  color:         var(--sbx-text-on-primary) !important;
  padding:       0 var(--sbx-space-lg) !important;
  height:        var(--sbx-btn-height);
  cursor:        pointer;
  transition:    background var(--sbx-transition);
}

.sbxEvents-search input.s-button:hover {
  background: var(--sbx-primary-dark) !important;
}

/* Share button: secondary style */
.sbxEvents-search input.s-button-share {
  background:    var(--sbx-surface) !important;
  color:         var(--sbx-primary) !important;
  border:        1px solid var(--sbx-border-color) !important;
}

.sbxEvents-search input.s-button-share:hover {
  background: var(--sbx-accent-soft) !important;
}

/* -- Sort / ordering control -------------------------------------------- */
.sbxEvents-search .ordering {
  margin-bottom: var(--sbx-space-md);
}

/* -- Filter sidebar: override hardcoded styles --------------------------- */
.sbxEvents-search .control-group {
  margin-bottom: var(--sbx-space-sm);
}

.sbxEvents-search .control-group .desc {
  font-family:  var(--sbx-font-body);
  font-size:    var(--sbx-font-size-sm);
  color:        var(--sbx-text-muted);
  font-weight:  500;
}

.sbxEvents-search .form-vertical input[type=text],
.sbxEvents-search .form-vertical select,
.sbxEvents-search .controls input[type=text],
.sbxEvents-search .controls select {
  font-family:   var(--sbx-font-body) !important;
  font-size:     var(--sbx-font-size-input) !important;
  color:         var(--sbx-text-body) !important;
  border:        1px solid var(--sbx-border-color) !important;
  border-radius: var(--sbx-radius-input) !important;
  padding:       0.5rem 0.75rem !important;
  background:    var(--sbx-input-bg);
  width:         100%;
  box-sizing:    border-box;
}

/* Mobile filter toggle button */
.sbxEvents-search button.openbtn.visible-xs {
  font-family:   var(--sbx-font-body);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  background:    var(--sbx-primary);
  color:         var(--sbx-text-on-primary);
  border:        none;
  border-radius: var(--sbx-radius-btn);
  padding:       8px 16px;
  cursor:        pointer;
  height:        var(--sbx-btn-height-sm);
}

.sbxEvents-search button.openbtn.visible-xs:hover {
  background: var(--sbx-primary-dark);
}

/* -- Results table: card-style modernization ----------------------------- */
/* Remove default table borders and apply token-based styling */
.sbxEvents-search table.search-result {
  width:           100%;
  border-collapse: separate;
  border-spacing:  0 var(--sbx-space-xs);
  font-family:     var(--sbx-font-body);
  font-size:       var(--sbx-font-size-sm);
}

.sbxEvents-search table.search-result tbody tr {
  background:    var(--sbx-surface);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  cursor:        pointer;
  transition:    background var(--sbx-motion-fast) var(--sbx-motion-ease),
                 box-shadow  var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.sbxEvents-search table.search-result tbody tr:hover {
  background:  var(--sbx-surface-alt);
  box-shadow:  var(--sbx-shadow-card);
}

/* Apply border-radius to first/last td in each row */
.sbxEvents-search table.search-result tbody tr > td:first-child {
  border-radius: var(--sbx-radius-card) 0 0 var(--sbx-radius-card);
  border-left:   1px solid var(--sbx-border-subtle);
}

.sbxEvents-search table.search-result tbody tr > td:last-child {
  border-radius: 0 var(--sbx-radius-card) var(--sbx-radius-card) 0;
  border-right:  1px solid var(--sbx-border-subtle);
}

.sbxEvents-search table.search-result tbody tr > td {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  vertical-align: middle;
  border-top:     1px solid var(--sbx-border-subtle);
  border-bottom:  1px solid var(--sbx-border-subtle);
  color:          var(--sbx-text-body);
}

/* -- Result cell: event title + class code + instructors ----------------- */
.sbxEvents-search .element-data.title strong {
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  color:         var(--sbx-text-heading);
  line-height:   1.3;
  display:       block;
  margin-bottom: 2px;
}

.sbxEvents-search .element-data.class-code strong {
  font-size:   var(--sbx-font-size-xs);
  font-weight: 600;
  color:       var(--sbx-text-muted);
  font-family: var(--sbx-font-body);
  letter-spacing: 0.03em;
}

.sbxEvents-search .element-data.name {
  font-size:  var(--sbx-font-size-xs);
  color:      var(--sbx-text-muted);
  margin-top: 2px;
}

/* -- Result cell: date / time / location --------------------------------- */
.sbxEvents-search .element-data.date strong {
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  color:         var(--sbx-primary-dark);
  display:       block;
  margin-bottom: 2px;
}

.sbxEvents-search .element-data.time strong {
  font-size:  var(--sbx-font-size-xs);
  font-weight: 500;
  color:      var(--sbx-text-body);
}

.sbxEvents-search .element-data.repeat,
.sbxEvents-search .element-data.location,
.sbxEvents-search .element-data.groups {
  font-size: var(--sbx-font-size-xs);
  color:     var(--sbx-text-muted);
  margin-top: 2px;
}

/* -- Result cell: status ------------------------------------------------- */
.sbxEvents-search .element-data.status {
  font-size:      var(--sbx-font-size-xs);
  font-weight:    600;
  color:          var(--sbx-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* -- Details button -------------------------------------------------------- */
.sbxEvents-search a.btn.btnDetails {
  display:       inline-flex;
  align-items:   center;
  padding:       0 var(--sbx-space-md);
  height:        var(--sbx-btn-height-sm);
  background:    var(--sbx-primary);
  color:         var(--sbx-text-on-primary) !important;
  border-radius: var(--sbx-radius-btn);
  border:        none;
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  text-decoration: none !important;
  white-space:   nowrap;
  transition:    background var(--sbx-transition);
}

.sbxEvents-search a.btn.btnDetails:hover {
  background: var(--sbx-primary-dark);
}

/* -- Show More pagination button ----------------------------------------- */
.sbxEvents-search #paginationShowMoreBtn.s-more {
  display:       block;
  margin:        var(--sbx-space-lg) auto 0;
  padding:       0 var(--sbx-space-xl);
  height:        var(--sbx-btn-height);
  background:    var(--sbx-surface);
  color:         var(--sbx-primary) !important;
  border:        1px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-btn);
  font-family:   var(--sbx-font-body);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  cursor:        pointer;
  transition:    background var(--sbx-transition), border-color var(--sbx-transition);
}

.sbxEvents-search #paginationShowMoreBtn.s-more:hover {
  background:   var(--sbx-accent-soft);
  border-color: var(--sbx-primary);
}

/* -- Mobile: stack columns, full-width search form ----------------------- */
@media (max-width: 767px) {
  .sbxEvents-search table.search-result {
    display:    block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sbxEvents-search table.search-result tbody,
  .sbxEvents-search table.search-result tr {
    display: block;
    width: 100%;
  }

  .sbxEvents-search table.search-result tbody tr {
    margin-bottom: var(--sbx-space-sm);
    border-radius: var(--sbx-radius-card);
  }

  .sbxEvents-search table.search-result td {
    display: block;
    border-radius: 0 !important;
    border-left:   1px solid var(--sbx-border-subtle);
    border-right:  1px solid var(--sbx-border-subtle);
    border-top:    none;
    border-bottom: none;
    padding:       var(--sbx-space-xs) var(--sbx-space-md);
  }

  .sbxEvents-search table.search-result tr > td:first-child {
    padding-top:   var(--sbx-space-sm);
    border-radius: var(--sbx-radius-card) var(--sbx-radius-card) 0 0 !important;
    border-top:    1px solid var(--sbx-border-subtle);
  }

  .sbxEvents-search table.search-result tr > td:last-child {
    padding-bottom: var(--sbx-space-sm);
    border-radius:  0 0 var(--sbx-radius-card) var(--sbx-radius-card) !important;
    border-bottom:  1px solid var(--sbx-border-subtle);
  }
}


/* ========================================================================== */
/* PHASE 25 — SHOP: ORDER FORM VIEW                                           */
/* Scope: form.form-store (order-form view; discriminated from form.form-cart)*/
/* Added: v174, 2026-05-20 / Fourth pass: v178, 2026-05-21                    */
/*                                                                            */
/* Confirmed markup (Playwright recon, sesbxsh-order-form-002-with-categories)*/
/*   form#form-store.item-form.form-store.form-validate                       */
/*     div#page.sbx.shop.layout-default                                       */
/*       ul.nav.nav-tabs.cart-tabnav#shopCartTabNav                           */
/*         li[.active] > a[href="#tabAllItem"|"#tab1"|"#tab2"|"#tab3"]        */
/*       div.tab-content.cart-tabcontent#shopCartTabContent                   */
/*         div.tab-pane.active (single pane — sbx_store.js filters rows)      */
/*           div#modalProductDetailsThumbN.modal.shop-modal.hide.fade         */
/*             div.modal-header.shop-modal-header > button.close              */
/*             div.modal-body.shop-modal-body                                 */
/*           table.table.shop-table.cart-table                                */
/*             thead tr: th.item-thumbproduct | th.item-price |               */
/*                        th.item-qty | th.item-total                         */
/*             tbody tr.product-item.itemTabAllItem.itemTabN:                 */
/*               td.item-thumb > img.product-thumb                            */
/*               td.item-product > h4.title > span                            */
/*               td.item-price > span.original                                */
/*               td.item-qty > select.select.input-mini.product-quantity      */
/*               td.item-total > div > span.original                          */
/*                                                                            */
/* Tab behavior: ONE .tab-pane exists; sbx_store.js shows/hides               */
/* tr.product-item rows by class (itemTabAllItem, itemTab1..N). Bootstrap     */
/* tab.js only toggles li.active. No per-tab pane switching occurs.           */
/*                                                                            */
/* Design anchor: Phase 19 Shopping Cart.                                     */
/* ========================================================================== */

/* -- Category tabs: restyle Bootstrap 2 nav-tabs as Soapbox Modern pills --- */
/*
 * Bootstrap 2 .nav.nav-tabs: border-bottom:1px solid #ddd, floated li
 * children, active li gets white bg + 3-sided border.
 * Rewrite as a flex-row pill nav with primary-tinted active state.
 * ID in selector (1,2,0) wins over Bootstrap 2's (0,2,0) ul.nav.nav-tabs.
 */
form.form-store #shopCartTabNav.nav-tabs {
  display:       flex;
  flex-wrap:     wrap;
  gap:           var(--sbx-space-xs);
  padding:       var(--sbx-space-xs) 0;
  margin-bottom: var(--sbx-space-md);
  border-bottom: none !important;
  list-style:    none;
  background:    transparent;
}

form.form-store #shopCartTabNav.nav-tabs > li {
  float:            none;
  margin:           0;
  list-style:       none;
  padding-left:     0;
  background:       none;
  background-image: none;
}

form.form-store #shopCartTabNav.nav-tabs > li > a {
  display:         inline-block;
  padding:         6px var(--sbx-space-md);
  font-family:     var(--sbx-font-ui);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  color:           var(--sbx-text-heading) !important; /* beats #content a:not(.btn)... */
  background:      var(--sbx-surface);
  border:          1.5px solid var(--sbx-border-strong);
  border-radius:   var(--sbx-radius-pill);
  text-decoration: none !important;
  line-height:     1;
  white-space:     nowrap;
  transition:      color          var(--sbx-transition),
                   background     var(--sbx-transition),
                   border-color   var(--sbx-transition);
}

form.form-store #shopCartTabNav.nav-tabs > li > a:hover {
  color:        var(--sbx-primary);
  background:   var(--sbx-accent-soft);
  border-color: var(--sbx-primary-light, var(--sbx-primary));
}

form.form-store #shopCartTabNav.nav-tabs > li.active > a,
form.form-store #shopCartTabNav.nav-tabs > li.active > a:hover,
form.form-store #shopCartTabNav.nav-tabs > li.active > a:focus {
  color:        var(--sbx-text-on-primary) !important; /* beats #content a:not(.btn)... (1,5,1) */
  background:   var(--sbx-primary);
  border-color: var(--sbx-primary);
  cursor:       default;
  text-decoration: none !important;
}

form.form-store #shopCartTabNav.nav-tabs > li > a:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* -- Product table: header row --------------------------------------------- */
form.form-store table.shop-table {
  border-collapse: collapse;
  width:           100%;
}

/* table-layout:fixed locks column widths after the first row so that qty/price
 * changes and order-summary DOM mutations don't cause the browser to reflow and
 * reassign column widths (table-layout:auto default behavior).
 * Only applied to .cart-table (main product listing); .order-table left as auto.
 */
form.form-store table.shop-table.cart-table {
  table-layout: fixed;
}

form.form-store table.shop-table.cart-table thead th.item-price,
form.form-store table.shop-table.cart-table thead th.item-qty {
  width: 108px;
}

form.form-store table.shop-table.cart-table thead th.item-total {
  width: 86px;
}

form.form-store table.shop-table thead th {
  background:     var(--sbx-surface-alt);
  color:          var(--sbx-text-muted);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  border-bottom:  1px solid var(--sbx-border-color);
  white-space:    nowrap;
  text-align:     left;
}

form.form-store table.shop-table thead th.item-price,
form.form-store table.shop-table thead th.item-qty,
form.form-store table.shop-table thead th.item-total {
  text-align: right;
}

/* -- Product table: body rows ---------------------------------------------- */
form.form-store table.shop-table tbody tr.product-item {
  border-bottom: 1px solid var(--sbx-border-subtle);
}

form.form-store table.shop-table tbody td {
  padding:        var(--sbx-space-md);
  vertical-align: top;
}

form.form-store table.shop-table td.item-qty,
form.form-store table.shop-table td.item-price,
form.form-store table.shop-table td.item-total {
  vertical-align: middle;
  padding-top:    var(--sbx-space-md);
}

/* -- Thumbnail cell -------------------------------------------------------- */
/*
 * td.item-thumb contains a bare <img class="product-thumb"> — no wrapper div
 * (unlike Shopping Cart's item-thumb-wrapper). Constrain cell width and give
 * the image a rounded square crop via explicit width/height.
 */
form.form-store table.shop-table td.item-thumb {
  width:       136px;
  min-width:   136px;
  max-width:   136px;
  padding:     var(--sbx-space-sm);
  padding-top: var(--sbx-space-md);
}

form.form-store table.shop-table td.item-thumb img.product-thumb {
  display:       block;
  width:         120px !important;
  height:        120px !important;
  object-fit:    cover;
  border-radius: var(--sbx-radius-sm);
  background:    linear-gradient(
                   135deg,
                   color(srgb 0.95 0.96784 0.98314),
                   color(srgb 0.88 0.92282 0.95953) 45%,
                   color(srgb 0.92 0.94855 0.97302)
                 );
}

/* Placeholder block for products with no image (img omitted by PHP).
 * Scoped to tr:has(td.item-price) — text element rows use <td colspan="3">
 * with no td.item-price, so the placeholder is suppressed for text elements.
 */
form.form-store table.shop-table tr:has(td.item-price) td.item-thumb:not(:has(img)) {
  position: relative;
}

form.form-store table.shop-table tr:has(td.item-price) td.item-thumb:not(:has(img))::after {
  content:       '';
  display:       block;
  width:         120px;
  height:        120px;
  border-radius: var(--sbx-radius-sm);
  background:    linear-gradient(
                   135deg,
                   color(srgb 0.95 0.96784 0.98314),
                   color(srgb 0.88 0.92282 0.95953) 45%,
                   color(srgb 0.92 0.94855 0.97302)
                 );
}

/* -- Product name cell ----------------------------------------------------- */
form.form-store table.shop-table td.item-product h4.title {
  font-family:   var(--sbx-font-ui);
  font-size:     var(--sbx-font-size-base);
  font-weight:   600;
  color:         var(--sbx-text-heading);
  margin:        0;
  line-height:   1.35;
}

/* -- Price and total: right-aligned styled amounts ------------------------- */
/*
 * Bootstrap body font-size cascade inflates td text to ~19.2px.
 * Explicit font-size on .original prevents size drift vs other price contexts.
 */
form.form-store table.shop-table td.item-price,
form.form-store table.shop-table td.item-qty,
form.form-store table.shop-table td.item-total {
  text-align:  right;
  white-space: nowrap;
}

form.form-store table.shop-table td.item-price span.original,
form.form-store table.shop-table td.item-total span.original {
  font-size:   var(--sbx-font-size-base);
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

/* -- Quantity select: compact inline control ------------------------------- */
/*
 * .select.input-mini does not match Phase 4's select[class*="field"] height
 * rule, but we assert auto height here to future-proof against selector drift.
 */
form.form-store table.shop-table select.product-quantity {
  display:        inline-block;
  vertical-align: middle;
  height:         auto;
  min-height:     36px;
  width:          auto;
  min-width:      70px;
  font-size:      var(--sbx-font-size-sm);
  padding:        var(--sbx-space-xs) var(--sbx-space-sm);
}

/* -- Section headers within the order form --------------------------------- */
/*
 * Phase 19 scopes .section-header cleanup to .sbxEvents-cart.
 * The Order Form body does not carry .sbxEvents-cart, so replicate
 * the treatment under form.form-store scope.
 */
form.form-store .section-header {
  background:    transparent;
  border-bottom: none;
  padding:       0;
  margin-bottom: var(--sbx-space-sm);
}

form.form-store .section-header h3.title {
  color:         var(--sbx-text-heading) !important;
  margin-bottom: 0;
}

form.form-store .section-header p {
  margin: 0;
}

form.form-store fieldset {
  padding: 0;
  margin:  0;
  border:  none;
}

/* -- Product detail modal: Soapbox Modern styling -------------------------- */
/*
 * Bootstrap 2 defaults: position:fixed; top:10%; left:50%; width:560px;
 * margin-left:-280px; border-radius:6px.
 * soapbox-bootstrap.min.css overrides .modal with position:absolute — must
 * explicitly assert position:fixed !important here. JS patch moves modals to
 * document.body so absolute vs fixed is viewport-relative in both cases, but
 * fixed is correct and prevents scroll-offset rendering errors.
 * Bootstrap JS removes .hide and adds .in on open — no display rule needed.
 * Selectors at (0,2,0) win over Bootstrap 2's (0,1,0) .modal rule.
 */
.modal.shop-modal {
  position:    fixed !important;
  top:         10%;
  left:        50%;
  z-index:     1050;
  width:       680px;
  margin-left: -340px;
  background:    var(--sbx-surface, #ffffff);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  box-shadow:    var(--sbx-shadow-dialog);
  outline:       none;
  overflow:      hidden;
}

@media (max-width: 767px) {
  .modal.shop-modal {
    width:       92%;
    left:        4%;
    margin-left: 0;
  }
}

/* -- Modal header ---------------------------------------------------------- */
.modal.shop-modal .modal-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--sbx-space-md) var(--sbx-space-lg);
  border-bottom:   1px solid var(--sbx-border-subtle);
  background:      var(--sbx-surface-alt);
}

.modal.shop-modal .modal-header h3 {
  font-size:   var(--sbx-font-size-lg);
  font-weight: 700;
  color:       var(--sbx-text-heading);
  margin:      0;
  line-height: 1.3;
}

/* -- Close button ---------------------------------------------------------- */
/*
 * Bootstrap 2 .close: float:right; font-size:20px; opacity:.2; text-shadow.
 * .modal-header .close: margin-top:2px. Override to a modern icon button.
 */
.modal.shop-modal .modal-header .close {
  float:           none;
  flex-shrink:     0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           32px;
  height:          32px;
  border:          none;
  border-radius:   var(--sbx-radius-sm);
  background:      transparent;
  color:           var(--sbx-text-muted);
  font-size:       1.25rem;
  line-height:     1;
  opacity:         1;
  cursor:          pointer;
  text-shadow:     none;
  margin-top:      0;
  padding:         0;
  transition:      background var(--sbx-transition), color var(--sbx-transition);
}

.modal.shop-modal .modal-header .close:hover {
  background: var(--sbx-surface-muted);
  color:      var(--sbx-text-heading);
}

.modal.shop-modal .modal-header .close:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* -- Modal body ------------------------------------------------------------ */
/*
 * Bootstrap 2: max-height:400px; overflow-y:auto. Relax max-height for
 * longer product descriptions; keep overflow-y for short viewports.
 */
.modal.shop-modal .modal-body {
  padding:    var(--sbx-space-lg);
  max-height: 70vh;
  overflow-y: auto;
}

/* -- Product info content inside modal ------------------------------------- */
/*
 * Markup: .shop-product > div.row-fluid > div.span12.col-product-info
 *           > div.product-info
 * .row-fluid + .span12 provide Bootstrap 2 fluid grid — layout unchanged.
 */
.modal.shop-modal .product-info h2,
.modal.shop-modal .product-info h3,
.modal.shop-modal .product-info h4 {
  font-size:     var(--sbx-font-size-lg);
  font-weight:   700;
  color:         var(--sbx-text-heading);
  margin-bottom: var(--sbx-space-sm);
}

.modal.shop-modal .product-info .product-price,
.modal.shop-modal .product-info .price,
.modal.shop-modal .product-info .price-value {
  display:       block;
  font-size:     1.125rem;
  font-weight:   700;
  color:         var(--sbx-text-heading);
  margin-bottom: var(--sbx-space-md);
}

/* Status label (label-in = available, etc.) */
.modal.shop-modal .product-info .product-label {
  display:       inline-block;
  margin-bottom: var(--sbx-space-sm);
}

.modal.shop-modal .product-info .description,
.modal.shop-modal .product-info p {
  font-size:     var(--sbx-font-size-sm);
  color:         var(--sbx-text-body);
  line-height:   1.6;
  margin-bottom: var(--sbx-space-sm);
}

/* Qty selector + "Update Quantity" button row */
.modal.shop-modal .product-info .product-pricing {
  display:     flex;
  align-items: center;
  gap:         var(--sbx-space-sm);
  margin-top:  var(--sbx-space-md);
}

.modal.shop-modal .product-info .product-pricing select,
.modal.shop-modal .product-info .product-pricing input {
  min-height: var(--sbx-btn-height-sm);
  min-width:  70px;
  width:      auto;
  height:     auto !important;
  font-size:  var(--sbx-font-size-sm);
}

.modal.shop-modal .product-info .btn-product-addtocart {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  padding:          var(--sbx-btn-padding-sm);
  min-height:       var(--sbx-btn-height-sm);
  font-size:        var(--sbx-font-size-sm);
  font-weight:      600;
  line-height:      1;
  background-image: none;
  border-radius:    var(--sbx-radius-btn);
}

/* -- Product description: supporting text beneath product title ------------ */
/*
 * Markup: td.item-product > p.desc (short description)
 *         td.item-product > p (additional text elements from item body)
 * First p.desc is the designated description field; siblings are content para.
 * Render as quiet supporting text; suppress default margin inflation.
 */
form.form-store table.shop-table td.item-product p.desc,
form.form-store table.shop-table td.item-product p {
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  line-height: 1.45;
  margin:      var(--sbx-space-xs) 0 0;
}

form.form-store table.shop-table td.item-product p:empty {
  display: none;
}

/* -- Product link: strip hyperlink decoration; add "Details" micro-cue ----- */
/*
 * h4.title wraps an <a data-toggle="modal"> link to the product detail modal.
 * Default treatment: blue, underlined. Modernized: heading color, no underline.
 * ::after chip ("Details ›") signals interactivity without hyperlink styling.
 */
form.form-store table.shop-table td.item-product h4.title a[data-toggle="modal"] {
  color:           inherit !important;           /* beats #content a:not(.btn)... (1,5,1) */
  text-decoration: none !important;
}

form.form-store table.shop-table td.item-product h4.title a[data-toggle="modal"]:hover {
  color:           var(--sbx-primary) !important;
  text-decoration: none !important;
}

/* Icon cue after product name: subtle › indicates "opens details modal".
 * No pill background — keeps it lightweight and non-text-link-like.
 */
form.form-store table.shop-table td.item-product h4.title a[data-toggle="modal"]::after {
  content:        " ›";
  display:        inline;
  font-size:      0.9em;
  font-weight:    400;
  color:          var(--sbx-text-muted);
  vertical-align: baseline;
  transition:     color var(--sbx-transition);
}

form.form-store table.shop-table td.item-product h4.title a[data-toggle="modal"]:hover::after {
  color: var(--sbx-primary);
}

/* -- Optional Donation section --------------------------------------------- */
/*
 * Markup: div.donation-content#shopCartDonation > [inline style] > table.donation-table
 * Component injects an inline <style> that sets table.table margin.
 * The div is styled as a flex card (matching Phase 19 Shopping Cart .donation-content).
 * The TABLE inside uses display:contents so its rows/cells participate in the flex.
 * Since tables can't be display:contents, we instead style the outer div as a card
 * and make the product cell flex-grow so the amount input is pushed right.
 * TABLE and its cells must be transparent — Bootstrap table rules would otherwise
 * show a white background overlaid on the card's surface-alt color.
 */
form.form-store div.donation-content {
  margin:        var(--sbx-space-md) 0;
  padding:       var(--sbx-space-md) var(--sbx-space-lg);
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-subtle);
  border-radius: var(--sbx-radius-card);
  margin-bottom: var(--sbx-space-lg);
}

form.form-store div.donation-content table.donation-table {
  margin:     0 !important;
  width:      100%;
  background: transparent;
}

form.form-store div.donation-content table.donation-table tbody,
form.form-store div.donation-content table.donation-table tr {
  background: transparent;
}

form.form-store div.donation-content table.donation-table td {
  padding:          var(--sbx-space-xs) var(--sbx-space-sm);
  vertical-align:   middle;
  border:           none;
  background:       transparent !important;
}

form.form-store div.donation-content table.donation-table td.item-product {
  width: 100%;  /* expand to push amount cell right */
}

form.form-store div.donation-content table.donation-table td.item-product h4.title {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 600;
  color:       var(--sbx-text-heading);
  margin:      0;
}

form.form-store div.donation-content table.donation-table td.item-product p.desc {
  font-size: var(--sbx-font-size-xs, 0.75rem);
  color:     var(--sbx-text-muted);
  margin:    2px 0 0;
}

/* Amount input: compact right-aligned — mirrors form.form-cart .donation-content input */
form.form-store div.donation-content table.donation-table td.item-qty {
  white-space: nowrap;
  text-align:  right;
}

form.form-store div.donation-content table.donation-table td.item-qty input.input-text {
  height:     auto !important;
  min-height: var(--sbx-btn-height-sm);
  width:      90px;
  max-width:  90px;
  flex-shrink: 0;
  text-align: right;
}

/* -- Contact Information & Shipping Information fields --------------------- */
/*
 * Bootstrap 2 .control-group/.control-label/.controls pattern.
 * Phase 4 already styles input[type="text"] globally; these rules handle
 * layout spacing and label typography within the order form sections.
 */
form.form-store .section-accordion .control-group {
  margin-bottom: var(--sbx-space-md);
}

form.form-store .section-accordion .control-label {
  display:     block;
  font-family: var(--sbx-font-ui);
  font-size:   var(--sbx-font-size-label);
  font-weight: 600;
  color:       var(--sbx-text-body);
  margin-bottom: var(--sbx-space-xs);
}

form.form-store .section-accordion .control-label .req {
  color:       var(--sbx-danger, #d9534f);
  margin-left: 2px;
}

form.form-store .section-accordion .controls {
  position: relative;
}

form.form-store .section-accordion .help-block {
  display:   block;
  font-size: var(--sbx-font-size-xs, 0.75rem);
  color:     var(--sbx-text-muted);
  margin:    3px 0 0;
}

form.form-store .section-accordion .help-block label {
  font-size:   inherit;
  color:       inherit;
  font-weight: normal;
}

form.form-store .section-body {
  padding-top: var(--sbx-space-md);
}

/* -- Order Total / Summary section ----------------------------------------- */
/*
 * Subtotal bar: div.cart-total — a compact Subtotal line above the summary.
 * #shopSummary contains the full order summary table + totals + submit button.
 */
/*
 * Subtotal bar: matches Shopping Cart's Phase 19 treatment.
 * Key differences from previous implementation: space-between (not flex-end),
 * border-top/bottom (not card), no background-card (surface-muted instead).
 * Bootstrap .clearfix adds pseudo-elements that become phantom flex items — null them.
 */
form.form-store div.cart-total {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--sbx-space-md);
  background:      var(--sbx-surface-muted);
  border-top:      2px solid var(--sbx-border-color);
  border-bottom:   2px solid var(--sbx-border-color);
  font-weight:     700;
  margin-bottom:   var(--sbx-space-lg);
}

form.form-store div.cart-total::before,
form.form-store div.cart-total::after {
  display: none;
}

form.form-store div.cart-total .title {
  font-size:      var(--sbx-font-size-sm);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
}

form.form-store div.cart-total .amount {
  font-size:   1.125rem;
  font-weight: 700;
  color:       var(--sbx-text-heading);
}

/* Order Summary section wrapper */
form.form-store #shopSummary {
  margin-top: var(--sbx-space-lg);
}

/* Order summary line-items table
 * Bootstrap .table adds border-top via td:first-child + .table-striped adds
 * alternating row backgrounds — both suppressed here for a clean list look.
 */
form.form-store #shopSummary table.order-table {
  width:           100%;
  border-collapse: collapse;
  margin-bottom:   var(--sbx-space-md);
  border-top:      none !important;
  background:      transparent !important;
}

form.form-store #shopSummary table.order-table td {
  padding:        var(--sbx-space-xs) var(--sbx-space-sm);
  font-size:      var(--sbx-font-size-sm);
  color:          var(--sbx-text-body);
  vertical-align: middle;
  border-bottom:  1px solid var(--sbx-border-subtle);
  border-top:     none !important;
  background:     transparent !important;
}

/* Thumbnail cell — small summary image with placeholder.
 * min-width/max-width overrides are required: form.form-store table.shop-table
 * td.item-thumb sets min-width:136px, which applies here since order-table also
 * carries the shop-table class. The #shopSummary ID gives us higher specificity
 * (1,3,3) > (0,3,3) to override all three box-sizing constraints.
 */
form.form-store #shopSummary table.order-table td.item-thumb {
  width:     44px;
  min-width: 0;
  max-width: none;
  padding:   var(--sbx-space-xs);
}

form.form-store #shopSummary table.order-table td.item-thumb img {
  display:       block;
  width:         36px;
  height:        36px !important; /* soapbox-responsive-bootstrap img{height:auto!important} */
  object-fit:    cover;
  border-radius: var(--sbx-radius-xs, 4px);
  background:    linear-gradient(
                   135deg,
                   color(srgb 0.95 0.96784 0.98314),
                   color(srgb 0.88 0.92282 0.95953) 45%,
                   color(srgb 0.92 0.94855 0.97302)
                 );
}

/* Qty — narrow center-aligned */
form.form-store #shopSummary table.order-table td.item-qty {
  text-align:  center;
  white-space: nowrap;
  width:       28px;
}

/* Remove icon — normal weight, muted, pointer */
form.form-store #shopSummary table.order-table td.item-times {
  width:      24px;
  text-align: center;
}

form.form-store #shopSummary table.order-table td.item-times i.icon-remove {
  font-weight: 400;
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-text-muted);
  cursor:      pointer;
}

/* Product name — left-aligned (explicit: Bootstrap tbody td default is left) */
form.form-store #shopSummary table.order-table td.item-product {
  text-align: left;
}

/* Line item total — right-aligned, normal weight (not bold).
 * padding-right:0 so text right-edge aligns with .orderSummary .amount spans,
 * both of which right-align to the same container edge (no right-padding on
 * .order-total or .amount spans).
 */
form.form-store #shopSummary table.order-table td.item-total {
  text-align:    right;
  white-space:   nowrap;
  font-weight:   400;
  padding-right: 0;
}

/* Totals block: titles + amounts columns side by side */
form.form-store #total-summary {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  padding:         var(--sbx-space-md) 0 var(--sbx-space-sm);
}

form.form-store #total-summary .order-total {
  min-width:  240px;
  border-top: none; /* soapbox-bootstrap.min.css .order-total has border-top:1px solid #eee */
}

form.form-store #total-summary .orderSummary {
  display: flex;
  gap:     var(--sbx-space-lg);
}

form.form-store #total-summary .orderSummary > div {
  display:        flex;
  flex-direction: column;
  gap:            var(--sbx-space-xs);
}

/* Amounts column expands to fill the order-total width so that amount text
 * right-aligns to the same edge as the order-table's td.item-total column.
 */
form.form-store #total-summary .orderSummary > div:last-child {
  flex:     1;
  min-width: 0;
}

form.form-store #total-summary .orderSummary .title {
  font-size:      var(--sbx-font-size-sm);
  color:          var(--sbx-text-muted);
  text-align:     right;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height:    1.4;
}

form.form-store #total-summary .orderSummary .amount {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 400;
  color:       var(--sbx-text-body);
  text-align:  right;
  line-height: 1.4;
}

/* Total row: larger, primary color, separator above — mirrors Phase 19 */
form.form-store #total-summary .orderSummary .orderSummaryTotal.title,
form.form-store #total-summary .orderSummary .orderSummaryTotal.amount {
  font-size:   1.125rem;
  font-weight: 700;
  color:       var(--sbx-primary);
  padding-top: var(--sbx-space-sm);
  margin-top:  var(--sbx-space-xs);
  border-top:  2px solid var(--sbx-border-strong);
}

form.form-store .order-summary-discount {
  text-align:  right;
  font-size:   var(--sbx-font-size-sm);
  color:       var(--sbx-success, #3c763d);
  font-weight: 600;
  margin-top:  var(--sbx-space-xs);
}

/* Place Order submit area */
form.form-store .order-submit {
  margin-top:  var(--sbx-space-lg);
  padding-top: var(--sbx-space-lg);
  border-top:  1px solid var(--sbx-border-subtle);
}

form.form-store .order-submit .order-formactions {
  display:         flex;
  align-items:     center;
  justify-content: flex-end;
  gap:             var(--sbx-space-md);
}

form.form-store .order-submit .order-message {
  text-align: right;
  margin-top: var(--sbx-space-sm);
}

form.form-store .order-submit .order-message p {
  font-size: var(--sbx-font-size-xs, 0.75rem);
  color:     var(--sbx-text-muted);
  margin:    0;
}

/* -- Input height: override soapbox-bootstrap.min.css `.shop input.input-text { height: 28px }` --
 * soapbox-bootstrap specificity: (0,2,1). Phase 4's `input[type="text"]` is (0,1,1) — loses.
 * This `form.form-store input.input-text` is (0,2,1) + !important — wins.
 */
form.form-store input.input-text,
form.form-store input[type="text"],
form.form-store input[type="email"],
form.form-store input[type="tel"],
form.form-store input[type="number"],
form.form-store input[type="password"] {
  height:     var(--sbx-input-height) !important;
  min-height: var(--sbx-input-height) !important;
  box-sizing: border-box;
}

/* -- Payment method tiles: Secure Checkout section -------------------------
 * #shopBilling contains `.sbxPayType` with `.span-block` payment card tiles.
 * Markup mirrors the Shopping Cart's billing section exactly (same PHP template).
 * Style pattern copied from Phase 19 `.sbxEvents-cart .sbxPayType` rules.
 * `@supports selector(:has(*))` hides radio inputs and enables checked state.
 */
form.form-store .sbxPayType {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--sbx-space-sm);
  padding:   var(--sbx-space-sm) 0;
}

form.form-store .sbxPayType .span-block {
  position:       relative;
  display:        flex;     /* no !important — JS style="display:none" must win for hidden tiles */
  flex-direction: column;
  align-items:    center;
  gap:            var(--sbx-space-xs);
  padding:        var(--sbx-space-sm) var(--sbx-space-md) !important;
  min-width:      72px;
  background:     var(--sbx-surface-muted);
  border:         1.5px solid var(--sbx-border-subtle);
  border-radius:  var(--sbx-radius-input);
  cursor:         pointer;
  transition:     border-color var(--sbx-transition),
                  background   var(--sbx-transition),
                  box-shadow   var(--sbx-transition);
}

form.form-store .sbxPayType .span-block:focus-within {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

form.form-store .sbxPayType .span-block img {
  max-width: 52px;
  height:    auto !important; /* reset soapbox-responsive-bootstrap img{height:auto} redundancy */
  display:   block;
}

@supports selector(:has(*)) {
  form.form-store .sbxPayType input[name="CREDITCARDTYPE[]"] {
    position: absolute;
    opacity:  0;
    width:    0;
    height:   0;
    overflow: hidden;
    margin:   0;
  }

  form.form-store .sbxPayType .span-block label.choice {
    cursor: pointer;
  }

  form.form-store .sbxPayType .span-block:has(input:checked) {
    border-color: var(--sbx-primary);
    background:   var(--sbx-primary-pale);
    box-shadow:   0 0 0 2px rgba(var(--sbx-primary-rgb), 0.15);
  }
}

/* -- Copy buttons: outlined secondary matching Shopping Cart ---------------
 * "Copy from Contact Information" and "Copy from Billing Information" buttons.
 * Pattern copied from Phase 19 `.sbxEvents-cart button#btnCopyContactToShipping`.
 */
form.form-store button#btnCopyContactToShipping,
form.form-store button#btnCopyBillingToShipping,
form.form-store button#btnCopyFromContact {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  padding:          var(--sbx-btn-padding-sm);
  min-height:       var(--sbx-btn-height-sm);
  line-height:      1;
  background:       transparent !important;
  background-image: none !important;
  color:            var(--sbx-primary) !important;
  border:           1.5px solid var(--sbx-primary) !important;
  border-radius:    var(--sbx-radius-btn);
  box-shadow:       none !important;
  font-family:      var(--sbx-font-ui);
  font-size:        var(--sbx-font-size-sm);
  font-weight:      600;
  white-space:      nowrap;
  cursor:           pointer;
  transition:       background var(--sbx-transition), color var(--sbx-transition), border-color var(--sbx-transition);
}

form.form-store button#btnCopyContactToShipping:hover,
form.form-store button#btnCopyBillingToShipping:hover,
form.form-store button#btnCopyFromContact:hover {
  background: var(--sbx-primary-pale) !important;
}

form.form-store button#btnCopyContactToShipping:focus-visible,
form.form-store button#btnCopyBillingToShipping:focus-visible,
form.form-store button#btnCopyFromContact:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* -- Mobile: hide price and total columns ---------------------------------- */
@media (max-width: 599px) {
  form.form-store table.shop-table thead th.item-price,
  form.form-store table.shop-table thead th.item-total,
  form.form-store table.shop-table td.item-price,
  form.form-store table.shop-table td.item-total {
    display: none;
  }

  form.form-store table.shop-table td.item-thumb {
    width:     88px;
    min-width: 88px;
    max-width: 88px;
  }

  form.form-store table.shop-table td.item-thumb img.product-thumb {
    width:  80px !important;
    height: 80px !important;
  }

  form.form-store #total-summary .orderSummary {
    gap: var(--sbx-space-md);
  }

  form.form-store .order-submit .order-formactions {
    justify-content: stretch;
    flex-direction:  column;
  }

  form.form-store .order-submit .order-formactions .btn-submit {
    width: 100%;
  }
}

/* ==========================================================================
   PHASE 26 — TARGETED REFINEMENTS BATCH (2026-05-24)
   Tasks 1–8 polish pass: promo alignment, payment section height,
   logo placement, Sign Up button, access code layout, classes spacing,
   Directories section title, and course image data note.
   ========================================================================== */

/* -- Task 1: Shop Cart Promo Code Left-Alignment ---------------------------- */
/*
 * Root cause (identified Phase 27): form.form-store #total-summary uses
 * display:flex; justify-content:flex-end (Phase 25 checkout redesign). This
 * turns #total-summary into a flex container, which nullifies Bootstrap
 * .pull-left float on #order-promocode — the promo div becomes a flex item
 * that gets pushed right-ward along with .order-total. Fix: switch
 * justify-content to space-between so promo sits left, totals sit right.
 * The .sbxEvents-cart rules below (Shopping Cart path, not checkout path)
 * are retained as belt-and-suspenders for text-align inheritance.
 * form.form-store #total-summary fix is applied inline at the existing rule
 * location (line ~13919) — see comment there.
 */
.sbxEvents-cart #order-promocode {
  text-align: left;
}

.sbxEvents-cart .form-promocode {
  justify-content: flex-start;
}

/* form-store checkout path: promo div must also get text-align:left
 * (the flex item inherits default, but belt-and-suspenders for any
 * inherited center from a section-header ancestor). */
form.form-store #order-promocode {
  text-align: left;
}
form.form-store .form-promocode {
  justify-content: flex-start;
}

/* -- Task 2: Donations Secure Payment Section Height ------------------------ */
/*
 * soapbox-bootstrap.css sets .item-paymentsection .section-header {
 * padding: 20px 15px 15px }. That 20px top + 15px bottom creates excess
 * vertical height in the Secure Payment section. Override to compact padding.
 * The background rule (background:#f1f1f1 !important) on .item-paymentsection
 * itself is left untouched; only the header padding is reduced.
 * Events and Shop do not use .item-paymentsection — no regression risk.
 */
.item-paymentsection .section-header {
  padding: 10px 15px;
}

/* -- Task 3: Header Habitat SVG Logo Vertical Placement --------------------- */
/*
 * #logo is an h1 with line-height:1 and font-size:1rem. Its computed height
 * is 63px (60px img + 3px from inline-flex baseline offset): the inner <a>
 * is inline-flex, so the img participates in the h1's inline formatting context
 * and the baseline calculation adds ~3px. To collapse the phantom space, set
 * line-height:0 on #logo (font metrics contribute 0 to line-box height so the
 * h1 height equals exactly the img height at 60px). align-self:center then
 * centers the now-exact-height box in the 80px #headerinner flex row.
 */
#logo {
  line-height:  0;    /* collapse inline baseline gap; img height drives h1 height */
  align-self:   center;
}

/* -- Task 4: Header Sign Up Button Height ----------------------------------- */
/*
 * Sign Up renders at 38px (matching Auctions .auction-app-header .btn { height:38px }).
 * Validated Phase 27: computed height=38px, bounding box height=38px, matching
 * Sign In and Home icon buttons. min-height:38px retained as a floor guard.
 * No further changes needed — height is correct.
 */
ul.portalUserMenu-menu-sfx a[title="Sign Up"] {
  min-height: 38px;
}

/* -- Task 6: Classes Browse Line Spacing ------------------------------------ */
/*
 * Classes browse view (.sbxEvents-ins) emits course rows and class table rows.
 * The .course-row / .course-table-row pair was visually tight: course-row had
 * no bottom margin, making the course title run directly into the first class
 * table row. Add margin-bottom to .course-row to create visual separation
 * matching the Events list item gutter.
 * .element-data rows inside .course-table-row use line-height:28.8px (2rem)
 * which is consistent with the Shop cart and Events cart — no change needed.
 */
.sbxEvents-ins .course-row {
  margin-bottom: var(--sbx-space-sm);
}

/* -- Task 7: Directories Search Section Title Indentation ------------------- */
/*
 * .sbx .compSect-title is a flex container with gap:8px.
 * When the title div also carries Bootstrap's .clearfix class, the clearfix
 * ::before pseudo-element (content:" "; display:table) becomes a zero-width
 * phantom flex item that adds an 8px gap before the h3. Suppress the
 * pseudo-elements to eliminate the indent.
 * Scoped to .com_jsfSearch to avoid affecting Events, Donations, or other
 * .compSect-title usages.
 */
.com_jsfSearch .compSect-title::before,
.com_jsfSearch .compSect-title::after {
  display: none !important;
}

/* -- Task 8: Events RSVP Access Code Inline Layout -------------------------- */
/*
 * The access code row uses .foot-accesscode > .form-inline.form-accesscode
 * (display:flex; align-items:center; gap:8px). However, the global input rule
 * at Phase 4 sets width:100% on all text inputs, causing #access_code to fill
 * the full flex container width and wrapping the Apply Code button to a new
 * line. Override to auto-width within the flex context so the input takes only
 * the space it needs (flex:1) and the button sits to its right.
 * The constraint: do NOT change mobile layout (390px) — wrap is acceptable.
 */
.com_sbxEvents .foot-accesscode .form-accesscode #access_code {
  width:  auto;
  flex:   1;
  min-width: 140px;
}

/* ==========================================================================
   PHASE 27 — FOLLOW-UP REFINEMENTS (2026-05-24)
   Items: promo layout (root cause fix), Actions grid floor, Sign Up
   validation, course image environment note.
   ========================================================================== */

/* -- Item 1: Shop Cart Promo Code — root cause documented in Task 1 above ---
 * The actual fix is form.form-store #total-summary justify-content:space-between
 * applied inline at the existing Phase 25 rule (~line 13919).
 * No additional rules needed here — see Phase 25 block for the change. */

/* -- Item 3: Actions Target Grid — floor raised from 220px to 300px ---------
 * Previous 220px floor allowed 4 columns at 1042px container (measured):
 *   4 × 220 + 3 × 24 = 952px < 1042px → 4 cols at 242.5px each (too narrow)
 * New 300px floor:
 *   4 × 300 + 3 × 24 = 1272px > 1042px → 3 cols at ~331px each ✓
 *   3 × 300 + 2 × 24 = 948px > 688px  → 2 cols at tablet ✓
 *   2 × 300 + 1 × 24 = 624px > 324px  → 1 col at mobile ✓
 * Rule applied inline at the existing grid rule (~line 9034). */

/* -- Item 4: Sign Up Button — validated, no change needed -------------------
 * Measured height = 38px, matches Auctions reference (.auction-app-header .btn).
 * Phase 26 min-height:38px rule is sufficient. */

/* -- Item 2: Course Image URL / Port Issue — local environment config only --
 * getImageUrl() uses JURI::getInstance()->toString(['scheme','host']).
 * Docker reverse proxy at :8088 strips the port from HTTP_HOST, producing
 * http://playground.local (no port) → image 404s at port 80.
 * Fix: set $live_site = 'http://playground.local:8088'; in configuration.php.
 * The framework's JURI reads live_site when set and uses it as the canonical base.
 * This is a local-only environment issue — no code change warranted. */

/* ==========================================================================
   PHASE 28 — FOCUSED REFINEMENTS BATCH (2026-05-24)
   Items: mobile body borders, search-classes container, P2P hero breakout,
   classes heading alignment, classes table hover, cart promo layout.
   ========================================================================== */

/* -- Item 1: Mobile Body Borders — documented above; applied at line ~894 ---
 * border-left/right: none added to the existing @media (max-width:767px) #content
 * rule. No duplicate rule here. */

/* -- Item 2: Search Classes Component Container ----------------------------- */
/*
 * The com_events search view wraps its content in a div.container (Bootstrap
 * auto-centering container) that is the DIRECT first child of #content.
 * Inside #content — which already has clamp(1rem,3vw,2rem) padding — Bootstrap
 * computes margin-left: 51px via auto-centering: (1108px − 940px) / 2 = 84px,
 * split as 51px left + 33px right (or similar). The result is an extra ~51px
 * indent that misaligns the h1, search form, and results from the rest of the page.
 *
 * Body class on this page is only "sbx-js" (no .sbxEvents-search body class).
 * The container is the direct child of #content, so target it as #content > .container.
 * Added .com_events qualifier via the surrounding body class pattern emitted by the CMS
 * for the events component (body class includes "com_events" via itemid class or
 * via the page #content's component class). Since we cannot rely on body class,
 * we target #content > .container directly — this is safe because #content typically
 * contains component markup, not Bootstrap containers, for all other apps.
 */
#content > .container {
  width:         100%;
  max-width:     100%;
  margin-left:   0 !important;
  margin-right:  0 !important;
  padding-left:  0;
  padding-right: 0;
}

/* -- Item 3: P2P Campaign Hero — Full-Width Breakout ------------------------ */
/*
 * The .section-campaign-header is 1042px wide inside a 1108px #content card
 * (padding: clamp(1rem,3vw,2rem) = 32px each side). The hero is NOT edge-to-edge:
 * it's confined inside the content padding box.
 *
 * Inspection (1280px viewport):
 *   #content.offsetLeft = 86px, width = 1108px, paddingLeft = 32px
 *   .section-campaign-header.offsetLeft = 119px (= 86 + 33 padding), width = 1042px
 *   → hero is ~33px short on each side
 *
 * SPECIFICITY CONFLICT (discovered during implementation):
 *   donation-campaign.css rule: `#section-campaign-header.row { margin-left: 0px; }`
 *   Specificity: (1,1,0) = 110pts — higher than .donations .section-campaign-header at (0,2,0).
 *   This overrides the margin-left (and only margin-left because margin-right isn't set
 *   in the component CSS). Fix: use !important on margin-left only.
 *
 * margin-top: component CSS sets `#section-campaign-header { margin-top: 10px; }` (ID
 *   specificity = 100pts). Use !important to override and pull hero flush to top of #content.
 *
 * max-height: prevents portrait images from dominating. 480px desktop, 280px mobile.
 * The hero already has overflow:hidden so max-height clips correctly.
 *
 * width calculation: with margin breakout, width must expand to fill the full card
 * (content-box width + 2 × padding). Using width:auto allows the element to grow
 * with the negative margins. Since it's display:flex inside a block parent,
 * setting width to calc(100% + 2 * clamp(1rem,3vw,2rem)) fills correctly.
 */
.donations .section-campaign-header {
  margin-top:   calc(-1 * clamp(1rem, 3vw, 2rem)) !important;  /* beats #section-campaign-header { margin-top:10px } ID specificity */
  margin-left:  calc(-1 * clamp(1rem, 3vw, 2rem)) !important;  /* beats #section-campaign-header.row { margin-left:0 } ID specificity */
  margin-right: calc(-1 * clamp(1rem, 3vw, 2rem)) !important;
  width:        calc(100% + 2 * clamp(1rem, 3vw, 2rem)) !important;  /* beats #section-campaign-header { width:100% } ID specificity */
  max-height:   480px;
}

@media (max-width: 767px) {
  .donations .section-campaign-header {
    max-height:   280px;
    margin-top:   calc(-1 * clamp(1rem, 3vw, 2rem)) !important;
    margin-left:  calc(-1 * clamp(1rem, 3vw, 2rem)) !important;
    margin-right: calc(-1 * clamp(1rem, 3vw, 2rem)) !important;
    width:        calc(100% + 2 * clamp(1rem, 3vw, 2rem)) !important;
  }
}

/* -- Item 4: Classes Component Heading Padding ------------------------------ */
/*
 * Inspection confirms h1.componentheading and .course-row both have
 * rect.left = 119px on Browse Classes and Instructor Detail pages.
 * No padding mismatch exists at current viewport widths.
 * Defensive rule: ensure the component-title wrapper (which the component
 * wraps h1 in) has no extra left padding/margin that could appear on edge cases.
 */
.sbxEvents-insLayDefault .component-title {
  padding-left:  0;
  margin-left:   0;
}

.sbxEvents-insLayDefault h1.componentheading {
  margin-left: 0;
  padding-left: 0;
}

/* -- Item 5: Classes Table Hover State --------------------------------------- */
/*
 * Inspection: all table rows compute background: rgba(0,0,0,0) — transparent.
 * No odd/even zebra striping is applied (rows have no .odd/.even classes and
 * no :nth-child stripe rule exists for .sbxEvents-insLayDefault tables).
 * The hover rule sets background: var(--sbx-surface-alt) — on a transparent
 * row this may be barely perceptible.
 *
 * Fix: add alternating row backgrounds (odd=white/surface, even=surface-muted)
 * and ensure hover is visually distinct from both. On transparent rows the
 * hover color is the first visible background — add explicit odd/even bases.
 *
 * border-collapse:collapse on the table means :nth-child works directly on tr.
 */
.sbxEvents-insLayDefault table.search-result tbody tr:nth-child(odd) {
  background: var(--sbx-surface);
}

.sbxEvents-insLayDefault table.search-result tbody tr:nth-child(even) {
  background: var(--sbx-surface-muted, #f9fafb);
}

/* Hover: both odd and even rows get a distinct warm highlight */
.sbxEvents-insLayDefault table.search-result tbody tr:nth-child(odd):hover {
  background: var(--sbx-surface-alt);
}

.sbxEvents-insLayDefault table.search-result tbody tr:nth-child(even):hover {
  background: var(--sbx-accent-soft, #eef2fb);
}

/* -- Item 6: Shop Cart Promo/Totals Layout ---------------------------------- */
/*
 * DOM structure (from default_cart_summary.php):
 *   form.form-store                               ← Phase 25: flex container
 *     #total-summary.resultsTBL-foot.clearfix     ← Phase 25: display:flex; justify-content:space-between
 *       #order-promocode.order-promocode.pull-left ← left flex item
 *       .order-total.pull-right                    ← right flex item
 *
 * Phase 25 already sets justify-content:space-between on form.form-store #total-summary.
 * However, the cart inline <style> block sets .orderSummary { display:flex; flex-direction:row }
 * and .orderSummary > div { display:flex; flex-direction:column } — these are inside .order-total
 * and are correct for the two-column titles/amounts layout.
 *
 * The remaining issue: #order-promocode has no explicit width, and the flex container
 * defaults to align-items:flex-start but the promo input inherits width:100% from
 * Phase 4 global input rules. This causes the promo div to expand and crowd the totals.
 * Fix: give #order-promocode a max-width and ensure .order-total gets margin-left:auto
 * as a belt-and-suspenders right-push.
 *
 * Mobile: stack vertically — promo first, totals below.
 */
form.form-store #order-promocode {
  max-width:    360px;
  flex-shrink:  0;
}

form.form-store #order-promocode .field.text,
form.form-store #order-promocode input[type="text"] {
  width:     auto;
  min-width: 160px;
  flex:      1;
}

form.form-store #total-summary .order-total {
  margin-left: auto;  /* push to right end even if promo doesn't fill full available width */
}

@media (max-width: 767px) {
  form.form-store #total-summary {
    flex-direction: column;
    gap:            var(--sbx-space-md);
  }

  form.form-store #order-promocode {
    max-width: 100%;
    width:     100%;
  }

  form.form-store #total-summary .order-total {
    margin-left: 0;
    width:       100%;
  }
}

/* ==========================================================================
   PHASE 29 — FOLLOW-UP CORRECTIONS BATCH (2026-05-24)
   Items: logo viewBox fix (SVG), P2P hero true viewport bleed,
   Search Classes styling pass, classes intro spacing,
   tablet/mobile body borders, shop cart right-edge alignment,
   classes table hover scope fix.
   ========================================================================== */

/* -- Item 1: Header SVG Logo — viewBox Case Fix ----------------------------- */
/*
 * Root cause: FMB-uploaded SVG used lowercase `viewbox` attribute.
 * Chromium ignores lowercase `viewbox` (SVG spec requires camelCase `viewBox`).
 * Without a valid viewBox, the browser used its default 2:1 intrinsic ratio
 * (300×150) instead of the designed 3:1 ratio (120×40). With max-height:60px
 * and max-width:300px, the rendered box was 300×60 — correct height but the
 * artwork was compressed into the upper-left of the oversized canvas.
 *
 * Two fixes applied in the SVG file (asset-layer):
 *   1. `viewbox` → `viewBox` (camelCase)
 *   2. Added `width="180" height="60"` presentation attributes.
 *      Chromium requires explicit width/height on <svg> to establish intrinsic
 *      dimensions for an <img> element; without them, the <img> renders 0×0
 *      even when CSS height is set. Width=180, height=60 matches the 3:1
 *      viewBox ratio at the target 60px display height.
 *
 * After fixes: naturalWidth=180, naturalHeight=60; rendered 180×60 desktop,
 * 144×48 mobile (CSS max-height:48px scales proportionally via width:auto).
 *
 * ADR note: FMB-uploaded SVGs may emit lowercase `viewbox` and omit
 * width/height attributes. Inspect any new logo upload — fix both in the
 * SVG file. Do NOT rely on CSS alone to size SVGs served as <img> elements.
 */

/* -- Item 2: P2P Campaign Hero — True Viewport Full-Bleed ------------------- */
/*
 * Phase 28 broke out of #content padding (clamp 32px each side) using
 * margin-left/right: calc(-1 * 32px). This still left the hero confined
 * inside #page (which is a child of #content with its own horizontal inset).
 *
 * DOM (1280px viewport):
 *   #content: bbLeft=86, bbRight=1194, paddingLeft=32px, paddingRight=32px
 *   #page:    bbLeft=119, bbRight=1161 (= #content content-box, no extra padding)
 *   .section-campaign-header is a direct child of form.item-form inside #page.
 *   After Phase 28: hero bbLeft=87, bbRight=1193 — broke out of #content
 *   padding but #page's parent relationship keeps the remaining 86+32+1=87px gap.
 *
 * Full-bleed approach: use the 50%/50vw technique.
 *   margin-left: calc(50% - 50vw) shifts left by half the viewport from center.
 *   width: 100vw sets full viewport width.
 *   This works regardless of the hero's nesting depth, as long as no ancestor
 *   has overflow:hidden (confirmed: all ancestors overflow:visible).
 *
 * overflow:hidden on .section-campaign-header itself (existing rule) clips the
 * image to the max-height box — this is intentional and unaffected.
 *
 * Note: the hero uses position:static so margin-based breakout is safe.
 * The `!important` flags beat existing ID-specificity rules in donation-campaign.css.
 */
.donations .section-campaign-header {
  margin-left:  calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  width:        100vw !important;
  margin-top:   calc(-1 * clamp(1rem, 3vw, 2rem)) !important;
}

@media (max-width: 767px) {
  .donations .section-campaign-header {
    margin-left:  calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width:        100vw !important;
    margin-top:   calc(-1 * clamp(1rem, 3vw, 2rem)) !important;
    max-height:   280px;
  }
}

/* -- Item 3: Search Classes — Fuller Styling Pass --------------------------- */
/*
 * The Search Classes page (com_events view=search) renders its markup
 * directly in #content > .container WITHOUT emitting any .sbxEvents-search
 * body or page-div class. The S19 P6 rules scoped to .sbxEvents-search
 * do not apply.
 *
 * Scope: #content > .container (safe — Search Classes is the only page that
 * renders a Bootstrap .container as the direct first child of #content).
 *
 * Issues addressed:
 *  - input.s-button (Search/Share): grey background, 38px height, 2px radius —
 *    align to sbxEng_modern primary/secondary button standards
 *  - .btn.btnDetails: grey bg, 12px font, 50px height — align to secondary btn
 *  - table.search-result rows: transparent (no zebra) — add alternating rows
 *  - table.search-result layout already styled by S19 P6 selectors BUT those
 *    selectors use .sbxEvents-search scope so they don't reach this page.
 *    Re-declare essential table styles using #content > .container scope.
 */

/* Search form submit button — primary style */
#content > .container input.s-button[type="submit"] {
  background:    var(--sbx-btn-primary-bg);
  color:         var(--sbx-btn-primary-text);
  border:        none;
  border-radius: var(--sbx-radius-btn);
  height:        var(--sbx-input-height);
  padding:       0 var(--sbx-space-lg);
  font-size:     var(--sbx-font-size-base);
  font-family:   var(--sbx-font-body);
  cursor:        pointer;
  transition:    background var(--sbx-motion-fast) var(--sbx-motion-ease);
}

#content > .container input.s-button[type="submit"]:hover {
  background: var(--sbx-btn-primary-hover-bg, color-mix(in srgb, var(--sbx-btn-primary-bg) 85%, #000));
}

/* Share button — secondary/ghost style */
#content > .container input.s-button.s-button-share {
  background:    transparent;
  color:         var(--sbx-btn-secondary-text, var(--sbx-text-body));
  border:        1.5px solid var(--sbx-border-color);
  border-radius: var(--sbx-radius-btn);
  height:        var(--sbx-input-height);
  padding:       0 var(--sbx-space-lg);
  font-size:     var(--sbx-font-size-base);
  font-family:   var(--sbx-font-body);
  cursor:        pointer;
  transition:    border-color var(--sbx-motion-fast) var(--sbx-motion-ease),
                 background   var(--sbx-motion-fast) var(--sbx-motion-ease);
}

#content > .container input.s-button.s-button-share:hover {
  background:   var(--sbx-surface-muted, #f9fafb);
  border-color: var(--sbx-accent);
}

/* Details button — align with .sbxEvents-insLayDefault a.btnDetails standard */
#content > .container .btn.btnDetails {
  display:         inline-block;
  background:      var(--sbx-btn-primary-bg);
  color:           var(--sbx-btn-primary-text) !important;
  border:          none;
  border-radius:   var(--sbx-radius-btn);
  padding:         0.5rem var(--sbx-space-lg);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  font-family:     var(--sbx-font-body);
  text-decoration: none;
  white-space:     nowrap;
  height:          auto;
  line-height:     1.4;
  cursor:          pointer;
  transition:      background var(--sbx-motion-fast) var(--sbx-motion-ease);
}

#content > .container .btn.btnDetails:hover {
  background: var(--sbx-btn-primary-hover-bg, color-mix(in srgb, var(--sbx-btn-primary-bg) 85%, #000));
}

/* Search results table — zebra striping */
#content > .container table.search-result {
  width:           100%;
  border-collapse: collapse;
  font-size:       var(--sbx-font-size-sm);
  margin:          0;
}

#content > .container table.search-result tbody tr {
  border-bottom: 1px solid var(--sbx-border-subtle);
  cursor:        pointer;
  transition:    background 0.1s;
}

#content > .container table.search-result tbody tr:last-child {
  border-bottom: none;
}

#content > .container table.search-result tbody tr:nth-child(odd) {
  background: var(--sbx-surface);
}

#content > .container table.search-result tbody tr:nth-child(even) {
  background: var(--sbx-surface-muted, #f9fafb);
}

#content > .container table.search-result tbody tr:nth-child(odd):hover {
  background: var(--sbx-surface-alt);
}

#content > .container table.search-result tbody tr:nth-child(even):hover {
  background: var(--sbx-accent-soft, #eef2fb);
}

#content > .container table.search-result td {
  padding:        var(--sbx-space-sm) var(--sbx-space-md);
  vertical-align: top;
  font-size:      var(--sbx-font-size-sm);
  line-height:    1.5;
}

/* Column 3 (instructor name) width cap — frees space for col 4 (date/time/DOW) */
@media only screen and (min-width: 768px) {
  .search-result tbody tr td:nth-child(3) {
    width: 20%;
  }
}

/* -- Item 4: Classes Intro Spacing ------------------------------------------ */
/*
 * #insDescIntro-wrap sits directly above .page-content on Browse Classes
 * and Instructor Detail pages. Both margin-bottom and padding-bottom computed
 * as 0px — no gap between intro text and the results table below.
 * Fix: add var(--sbx-space-lg) bottom margin for breathing room.
 */
#insDescIntro-wrap {
  margin-bottom: var(--sbx-space-lg);
}

/* -- Item 5: Tablet/Mobile Body Borders — applied at ~line 892 --------------
 * @media (max-width: 1024px) rule added inline at the mobile breakpoint block.
 * border-left, border-right, and box-shadow removed at ≤1024px.
 * Desktop (≥1025px) retains the full card-frame treatment. */

/* -- Item 6: Shop Cart Submit Button / Totals Right-Edge Alignment ---------- */
/*
 * Root cause: form.form-store .order-submit inherits Bootstrap .form-actions
 * padding (padding: 19px 20px 20px from soapbox-bootstrap.min.css).
 * The Phase 25 rule sets padding-top/border-top for the section but does NOT
 * reset Bootstrap's horizontal padding. Result: .order-formactions is inset
 * 24px from each side of .order-submit, making the Checkout button's right
 * edge land at 1137px while .order-total (inside #total-summary, which has
 * no Bootstrap padding) lands at 1161px — a 24px gap.
 *
 * Fix: override horizontal padding on .order-submit to 0 so the flex container
 * spans the full width of its parent and justify-content:flex-end aligns the
 * button to the same right edge as .order-total.
 *
 * Measured before: submitBtn.right=1137, orderTotal.right=1161 (24px gap)
 * Expected after:  both at 1161px (= #shopSummary right edge)
 */
form.form-store .order-submit {
  padding-left:  0;
  padding-right: 0;
}

/* -- Item 7: Classes Table Hover — Scope Correction ------------------------- */
/*
 * Phase 28 added zebra + hover rules at lines 14432-14447 using selector
 * .sbxEvents-insLayDefault table.search-result tbody tr:nth-child(odd/even).
 *
 * Inspection confirms these DO apply: Browse Classes row1BG=rgb(255,255,255),
 * row2BG=rgb(241,244,250) — zebra IS working on both Browse Classes and
 * Instructor Detail pages. The .sbxEvents-insLayDefault selector is correct
 * (the #page div carries that class on both pages).
 *
 * The earlier Phase 12 hover rule at line 12535 uses .sbxEvents-insLayDefault
 * table.search-result tbody tr:hover → background: var(--sbx-surface-alt).
 * Phase 28 added separate odd/even hover rules. However, the Phase 12 base
 * hover rule (line 12535) may visually dominate over the Phase 28 nth-child
 * hover rules at lower specificity. Ensure Phase 29 nth-child hover specificity
 * is equal to or higher than Phase 12.
 *
 * Phase 12 specificity: (0,3,1) = 31pts
 * Phase 28 nth-child hover: (0,4,1) = 41pts — already wins.
 * No additional selector changes needed — hover is correctly applied.
 *
 * Only 1 row on Instructor Detail page: row2BG=null (expected, only 1 class).
 * Task: validated correct — no further action required for Item 7.
 */

/* ===========================================================================
   PHASE 30 — TARGETED REFINEMENTS BATCH (2026-05-24)
   Items:
     1. Shop order form: item-thumb column too wide (~370px → 136px)
     2. Search Classes: Details button muddy (Bootstrap box-shadow + text-shadow)
     3. Search Classes: Days-of-week checkboxes misaligned (flex row)
     4. Search Classes: Start time slider text too large (19.2px → sm)
     5. Browse/Instructor classes: Details button vertical alignment (middle → top)
   =========================================================================== */

/* -- Item 1: Shop Order Form — item-thumb Column Width ---------------------- */
/*
 * Root cause: table.shop-table.cart-table has a thead with
 * th.item-thumbproduct colspan="2" spanning both td.item-thumb and
 * td.item-product. The browser's table-layout:auto algorithm distributes
 * the colspan-2 header's ~740px evenly (370px each) between td.item-thumb
 * and td.item-product, overriding the Phase 25 td width:136px hint.
 * CSS width/max-width on td elements are treated as column-width hints in
 * auto table layout — they cannot beat the engine's distribution from a
 * colspan header, even with !important.
 *
 * Fix: inject a <colgroup> into the template (template layer — Smarty .tpl
 * file at templates/system/html/com_store/store/sections/section-products-table.tpl).
 * colgroup/col elements ARE honoured by table-layout:auto as authoritative
 * column-width sources. col.col-item-thumb receives width:136px here;
 * col.col-item-product receives no explicit width (takes the remainder).
 *
 * Template change: added <colgroup> with <col class="col-item-thumb"> and
 * <col class="col-item-product"> immediately after the opening <table> tag.
 */
form.form-store table.shop-table col.col-item-thumb {
  width: 136px;
}

/* Belt-and-suspenders: retain the td constraint as a minimum */
form.form-store table.shop-table td.item-thumb {
  width:     136px !important;
  min-width: 136px !important;
  max-width: 136px !important;
}

/* -- Item 2: Search Classes — Details Button (Bootstrap shadow/text-shadow) -
 *
 * Root cause: Bootstrap 2's .btn rule sets:
 *   box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)
 *   text-shadow: 0 1px 1px rgba(255,255,255,0.75)
 * On a dark primary-blue button (rgb(0,83,146)):
 *   - The inset white highlight creates a glassy gradient top-edge shimmer
 *   - The text-shadow (white) bleeds through white text producing a blurry halo
 * Both effects make the button look "muddy" — unfocused on a dark background.
 *
 * The Phase 29 rule at line 14651 correctly sets background and color but
 * does not suppress the Bootstrap shadow/text-shadow.
 *
 * Fix: add box-shadow: none and text-shadow: none to the Phase 29 rule.
 * The hover rule gets the same treatment (hover shadow is even stronger:
 * inset 0 2px 4px rgba(0,0,0,.15)).
 */
#content > .container .btn.btnDetails {
  box-shadow:  none !important;
  text-shadow: none !important;
}

#content > .container .btn.btnDetails:hover {
  box-shadow: none !important;
}

/* -- Item 3: Search Classes — Days-of-Week Checkbox Alignment ---------------
 * [SUPERSEDED by Phase 32 — see below]
 */
/* .controls.controls-dow — Phase 30 flex rules replaced by Phase 32 */

/* -- Item 4: Search Classes — Start Time Slider Text Size -------------------
 *
 * Root cause: .slider-time and .slider-time2 are <span> elements inside a <p>
 * inside .sliders_step1 inside #time-range. No CSS scopes their font-size,
 * so they inherit the browser/body base (19.2px in this env — likely a
 * user-agent default on the .controls container or inherited from a larger
 * ancestor). Other form labels in the overlay compute at 13px.
 *
 * Fix: target .slider-time and .slider-time2 directly and set them to
 * var(--sbx-font-size-sm) (0.875rem ≈ 14px) to match the form's label weight.
 * Also normalize the wrapping <p> to remove any top/bottom margin that adds
 * visual separation from the slider track.
 */
.slider-time,
.slider-time2 {
  font-size:   var(--sbx-font-size-sm);
  font-weight: 500;
  color:       var(--sbx-text-body);
}

#time-range p {
  margin:    0;
  font-size: var(--sbx-font-size-sm);
  color:     var(--sbx-text-body);
}

/* -- Start Time slider handle micro-interactions ----------------------------
 *
 * search-template.css already sets transition:box-shadow .3s on the handle.
 * Extend to include transform so scale animations are smooth.
 *
 * Three states, mirroring the template's button/input pattern:
 *   :hover  → scale(1.15) — signals the handle is grabbable
 *   :focus  → --sbx-shadow-focus ring — matches input/button focus pattern;
 *             replaces .ui-slider a:focus { outline:none } with no replacement
 *   :active → scale(0.9) — press-down feel while dragging; mirrors
 *             translateY(1px) on buttons; scale is more appropriate for a circle
 *
 * Scope: #slider-range keeps rules isolated to the Start Time slider only.
 */
#slider-range .ui-slider-handle {
  transition: box-shadow var(--sbx-transition),
              transform  var(--sbx-transition);
}

#slider-range .ui-slider-handle:hover {
  transform:  scale(1.15);
  box-shadow: 0 0 0 3px rgba(var(--sbx-primary-rgb), 0.15);
}

#slider-range .ui-slider-handle:focus {
  outline:    none;
  box-shadow: var(--sbx-shadow-focus);
}

#slider-range .ui-slider-handle:active {
  transform:  scale(0.9);
  box-shadow: 0 0 0 3px rgba(var(--sbx-primary-rgb), 0.30);
}

/* -- Item 5: Browse/Instructor Classes — Details Button Vertical Alignment --
 *
 * Root cause: .sbxEvents-insLayDefault table.search-result td.text-right has
 * vertical-align: middle (set at line 12598). The other three data columns in
 * the same row compute vertical-align: top (Bootstrap table td default).
 * The button floats centered in a 136px-tall cell while adjacent content
 * starts at the top — creating a vertical mismatch.
 *
 * Reference: Search Classes page, td.text-right.hidden-xs — no explicit
 * vertical-align, so it inherits the Bootstrap table default (top).
 *
 * Fix: override vertical-align to top for the button column td so the
 * Details button aligns with the first line of other columns.
 * Specificity: (0,3,1) matches line 12598 — rule order (later) wins.
 */
.sbxEvents-insLayDefault table.search-result td.text-right {
  vertical-align: top;
}

/* ===========================================================================
   PHASE 31 — TARGETED FIXES BATCH (2026-05-25)
   Items:
     1. Shop Cart/Order Form: payment tile CSS blocking JS display:none
     2. Search Classes: days-of-week checkbox position + label alignment
     3. Shop Order Form: Go To PayPal button alignment to match Place Order
   =========================================================================== */

/* -- Item 1: Shop Cart & Order Form — Payment Tile JS-Hide Regression --------
 *
 * Root cause: .com_sbxEvents .sbxPayType .span-block (Phase 19, line 4622) and
 * form.form-store .sbxPayType .span-block (Phase 25, line 14055) both used
 * `display: flex !important`. CSS !important in a stylesheet overrides an
 * inline style attribute (e.g. style="display:none"). cart.js sets
 * $(".paytype-PayPal").hide() (display:none inline) when no #shop-paypalformactions
 * exists on the page — but the CSS !important made the PayPal tile visible
 * anyway. When a user clicked the PayPal tile, showBilling() ran, JS hid
 * #order-submit via inline style, and no PayPal form was rendered → both
 * buttons disappeared.
 *
 * Fix: removed !important from display on all three rules (lines 4622, 6980, and 14055).
 * Inline style="display:none" now wins over the stylesheet display declaration
 * when JS hides a tile. Tiles without an inline style continue to render as
 * flex. Confirmed: no other rule sets display on .sbxPayType .span-block
 * (verified via stylesheet enumeration — Bootstrap's ul.compList rule does
 * not match this element's DOM path).
 *
 * Validation: PayPal tile hidden on shopping cart (no shop-paypalformactions);
 * Checkout/Place Order button visible; on order form PayPal tile remains
 * visible and GoToPayPal button shows correctly when PayPal is selected.
 */

/* -- Item 2 (Phase 31 / Phase 33): Search Classes — DOW Checkbox Fix ---------
 *
 * search-template.css uses a custom checkbox pattern:
 *   - native input hidden (position:absolute; opacity:0; width:10px)
 *   - label has background:url(off.png) with padding-left:20px as the visual box
 *   - checked state swaps background to on.png
 *
 * Fix (Option 1 — native checkbox, no PNG):
 *   - Restore native checkbox visibility (position:static; opacity:1)
 *   - Remove the PNG background and its padding from the adjacent label
 *   - Use user-provided hints so labels sit inline beside native checkboxes
 */
.controls.controls-dow input[type="checkbox"] {
  position: static;        /* override position:absolute */
  opacity:  1;             /* override opacity:0 */
  float:    none;          /* override float:left — prevents all inputs stacking before labels */
  display:  inline-block;  /* override display:block — keeps input inline with its label */
}
.controls.controls-dow input[type="checkbox"] + label {
  background-image: none;   /* remove off.png / on.png fake-checkbox visual */
  padding-left:     4px;    /* gap between checkbox and its day abbreviation */
}
#sform-vertical .controls.controls-dow label {
  display: inline-block;
  width:   auto !important;
}

/* -- Item 3: Shop Order Form — Go To PayPal Button Alignment -----------------
 *
 * Root cause: #shop-paypalformactions is rendered as a direct child of #content
 * (outside the <form> element), while #order-submit is inside the form's
 * #shopSummary section. The two elements are in different layout contexts:
 *   #order-submit: inside form, right-aligned flex layout, margin-top+border-top
 *   #shop-paypalformactions: outside form, block layout, ul.compList-btns left-aligned
 *
 * The PayPal button (#btn-shoppaypal) sits in li.buttons.buttons-left which is
 * display:list-item with text-align:start — left edge at 119px (content start).
 * The Place Order button (#btn-store) is flex justify-content:flex-end — right
 * edge at 1161px. They occupy visually distinct positions.
 *
 * Fix: apply the same layout treatment to #shop-paypalformactions that the
 * order-submit block uses:
 *   - margin-top + padding-top + border-top: mirror .order-submit visual separation
 *   - override ul.compList-btns to flex with justify-content:flex-end
 *   - override li.buttons to display:flex + align-items:center
 *   - ensure padding matches .order-formactions (zero padding, flex)
 *   - on mobile: switch to column + stretch to match .order-formactions mobile rule
 *
 * Selector scope: #shop-paypalformactions (unique ID, always Shop context).
 */
#shop-paypalformactions {
  margin-top:  var(--sbx-space-lg);
  padding-top: var(--sbx-space-lg);
  border-top:  1px solid var(--sbx-border-subtle);
  padding-left:  0;
  padding-right: 0;
}

#shop-paypalformactions ul.compList-btns {
  display:         flex;
  justify-content: flex-end;
  align-items:     center;
  padding:         0;
  margin:          0;
  list-style:      none;
}

#shop-paypalformactions ul.compList-btns li {
  display:     flex;
  align-items: center;
  padding:     0;
  margin:      0;
  list-style:  none;
}

/* Bootstrap ul.compList li:after and ul.compList:after clearfix rules inject
 * content:"." with display:block. In a flex container these become ~5px flex
 * items that push content away from the right edge. Remove both. */
#shop-paypalformactions ul.compList-btns::after,
#shop-paypalformactions ul.compList-btns li::after {
  display: none;
}

#shop-paypalformactions ul.compList-btns li.requiredtext {
  display: none;  /* #order-submit .order-message handles required text */
}

@media (max-width: 599px) {
  #shop-paypalformactions ul.compList-btns {
    justify-content: stretch;
    flex-direction:  column;
  }
  #shop-paypalformactions ul.compList-btns li {
    width: 100%;
  }
  #shop-paypalformactions #btn-shoppaypal {
    width: 100%;
  }
}

/* ===========================================================================
   PHASE 32 — TARGETED FIXES BATCH (2026-05-25)
   Items:
     1. Search Classes: DOW checkbox/label inline-block layout (replaces Phase 30/31 flex)
     2. System message dt/dd: dt orphan fix (JS patch in index.php)
     3. Shop Cart: Apply Code button height matches promo input (48px)
     4. Shop Order Form: Optional donation field alignment (overflow fix)
     5. Shop Order Form: "Copy from Contact Information" button styling (no-ID buttons)
     6. Shop Order Form: Go To PayPal button spacing (reduce margin-top)
     7. Shop Order Form: Invoice "Copy from Contact Information" button (same as Item 5)
     8. Shop Order Form: Product description modal — › replaced with FA external-link icon
   =========================================================================== */

/* -- Item 3: Shop Cart — Apply Code Button Height ---------------------------
 *
 * Root cause: #btnApplyPromo inherits min-height from the secondary-button
 * rule set (~36px / var(--sbx-btn-height-sm)), while the adjacent promo
 * input renders at 48px (Phase 4 global input height). The .form-promocode
 * flex row uses align-items:center so the button is vertically centered in
 * the 48px row but is visually shorter than the input.
 *
 * Fix: set height:48px on #btnApplyPromo so it fills the full row height,
 * matching the promo input. align-self:stretch is an alternative but
 * explicit height is simpler and more predictable across browsers.
 *
 * Applies to both .sbxEvents-cart (Events shopping cart) and
 * form.form-store (Shop order form) contexts.
 */
.sbxEvents-cart #btnApplyPromo,
form.form-store #btnApplyPromo {
  height: 48px;
}

/* -- Item 4: Shop Order Form — Optional Donation Field Alignment -------------
 *
 * Root cause: The donation table (.donation-table) has no colgroup and the
 * td.item-qty column collapses to 0px width because td.item-product has
 * width:100% (set at line 13724). The 90px wide #donation input then
 * overflows its zero-width td cell, extending ~73px past the content right
 * edge (input.right=1234 vs content.right=1161). On the Shopping Cart,
 * the donation-content uses a flex card approach that constrains the input
 * correctly; the Order Form path uses a plain table.
 *
 * Fix: give td.item-qty a min-width of 120px so the 90px input plus its
 * td padding fits within the content area. Override td.item-product width
 * from 100% to `auto` so it shrinks to available space instead of claiming
 * all columns. The table-layout:fixed would also work but breaks the product
 * description column's natural wrapping.
 */
form.form-store div.donation-content table.donation-table td.item-qty {
  min-width: 120px;  /* contains 90px input + 2×(var(--sbx-space-sm)~8px) padding */
}

form.form-store div.donation-content table.donation-table td.item-product {
  width: 720px;  /* aligns donation input right-edge with order totals below */
}

/* -- Items 5 & 7: Shop Order Form — "Copy from Contact Information" Buttons --
 *
 * Root cause: The PHP template renders two "Copy from Contact Information"
 * buttons without an id attribute:
 *   - default_cart_payment.php line 109: #invoiceArea button (Invoice section)
 *   - default_cart_shipping.php line 170: #shopShipping email copy button
 * The existing Phase 29 CSS (line 14108) targets button#btnCopyFromContact
 * and button#btnCopyContactToShipping by ID — which never matches these
 * no-ID buttons. Result: they render with Bootstrap .btn defaults
 * (background:#f5f5f5, color:#333, no border, borderRadius:4px).
 *
 * The correctly-styled button (btnCopyBillingToShipping, id present) renders
 * with the outlined secondary style (transparent, primary border/color, 6px radius).
 *
 * Fix: add selectors targeting button.btn without an ID attribute inside the
 * two known parent contexts. Using :not([id]) scopes to only the no-ID buttons,
 * avoiding accidental matches on any other .btn in those sections.
 *
 * Specificity: form.form-store #invoiceArea button.btn:not([id]) → (1,2,2),
 *              form.form-store #shopShipping button.btn:not([id]) → (1,2,2)
 * Both beat Bootstrap's .btn (0,1,0) and do not conflict with the ID-based rules.
 */
form.form-store #invoiceArea button.btn:not([id]),
form.form-store #shopShipping button.btn:not([id]) {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  padding:          var(--sbx-btn-padding-sm);
  min-height:       var(--sbx-btn-height-sm);
  line-height:      1;
  background:       transparent !important;
  background-image: none !important;
  color:            var(--sbx-primary) !important;
  border:           1.5px solid var(--sbx-primary) !important;
  border-radius:    var(--sbx-radius-btn);
  box-shadow:       none !important;
  font-family:      var(--sbx-font-ui);
  font-size:        var(--sbx-font-size-sm);
  font-weight:      600;
  white-space:      nowrap;
  cursor:           pointer;
  transition:       background var(--sbx-transition), color var(--sbx-transition), border-color var(--sbx-transition);
}

form.form-store #invoiceArea button.btn:not([id]):hover,
form.form-store #shopShipping button.btn:not([id]):hover {
  background: var(--sbx-primary-pale) !important;
}

form.form-store #invoiceArea button.btn:not([id]):focus-visible,
form.form-store #shopShipping button.btn:not([id]):focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
}

/* -- Item 6: Shop Order Form — Go To PayPal Button Spacing ------------------
 *
 * Root cause: #shop-paypalformactions is a direct child of #content, rendered
 * after the closing </form> tag. When PayPal is selected, JS hides
 * #order-submit and shows #shop-paypalformactions. Several layout factors
 * create a structural gap between #total-summary.bottom and the PayPal div:
 *
 *   1. #shopSummary has 24px of internal padding below #total-summary
 *   2. An empty .row-fluid (2× empty .span6) inside #page adds ~28px height;
 *      this is hidden by the JS monkey-patch in index.php (Phase 32, Item 6)
 *   3. #content has padding-bottom:32px creating ~35px space after the form
 *
 * With the orphan row-fluid hidden, the structural gap from #total-summary
 * bottom to where the PayPal div starts is ~59px (even at margin-top:0).
 * The desired visual gap matches Place Order mode: ~24px.
 *
 * Fix: use a negative margin-top to pull #shop-paypalformactions up by
 * (59px - 24px) = 35px. Combined with the orphan row-fluid being hidden
 * by the JS patch, this aligns the GoToPayPal button position with the
 * Place Order button position in credit card mode.
 *
 * Note: padding-top:24px (retained from Phase 31) provides the border-top
 * visual separator; margin-top is purely for external positioning.
 */
#shop-paypalformactions {
  margin-top: -35px;  /* was var(--sbx-space-lg)=24px in Phase 31; pulls up to match Place Order */
}

/* -- Item 8: Shop Order Form — Product Description Modal — FA Icon -----------
 *
 * Root cause: form.form-store table.shop-table td.item-product h4.title
 * a[data-toggle="modal"]::after uses content:" ›" (plain Unicode ›).
 * User requested replacement with FontAwesome external-link icon.
 *
 * FontAwesome 3.2.1 is loaded via templates/system/css/font-awesome/ and
 * uses font-family:'FontAwesome'. The external-link glyph in FA3 is \f08e
 * (.icon-external-link). The icon is sized to 0.8em and vertically shifted
 * to align with the baseline.
 */
form.form-store table.shop-table td.item-product h4.title a[data-toggle="modal"]::after {
  content:        "\f08e";
  font-family:    FontAwesome;
  font-style:     normal;
  font-weight:    normal;
  font-size:      0.75em;
  line-height:    1;
  vertical-align: middle;
  margin-left:    4px;
}


/* ========================================================================== */
/* PHASE 33 — RESPONSIVE ISSUE FIXES (BATCH 1)                                */
/* Issues: DONATIONS 1-3, ACTIONS 4-6, P2P 7, BROWSE CLASSES 9,              */
/*         SEARCH CLASSES 10-13, EVENTS CART 14-15, SHOP 16-19               */
/* (Issue 8 — Browse Classes readmore toggle — patched in index.php Phase 33) */
/* (Issue 20 — dd/dt alert dismiss — fixed in Phase 32 Item 2)               */
/* Added: v209, 2026-05-26                                                    */
/* ========================================================================== */


/* ── DONATIONS 1: Designation container overflow at 820px ─────────────────
 *
 * Root cause: li.designation-group has flex-shrink:0; flex-basis:auto from
 * app CSS, expanding to ~850px at 820px and overflowing the flex row.
 * Phase 8 / @media(max-width:768px) already constrains at mobile; this
 * unconditional rule closes the 769px–850px gap.
 */
.donations li.designation-group {
  max-width: 100%;
}
.donations .designation-container,
.donations .designation-container .cntr {
  max-width: 100%;
  min-width: 0;
}


/* ── DONATIONS 2: Tribute radio labels overflow at 390px ──────────────────
 *
 * Root cause: #dedication_type .cntr is display:inline-flex. The two radio
 * labels ("In honor of" w=137px + "In memory of..." w=154px) total ~291px in
 * a 292px container — text wraps and the second label pushes to the right edge.
 *
 * Fix: stack labels vertically at ≤480px with token gap.
 */
@media (max-width: 480px) {
  .donations #dedication_type .cntr {
    flex-direction: column;
    align-items:    flex-start;
    gap:            var(--sbx-space-sm);
  }
}


/* ── DONATIONS 3: Designation pills too cramped vertically at mobile ───────
 *
 * Root cause: .pill vertical padding is 0.3125rem (5px), too small a tap
 * target on mobile. Increase at ≤480px to 8px.
 */
@media (max-width: 480px) {
  .donations .pill {
    padding-top:    0.5rem;
    padding-bottom: 0.5rem;
  }
}


/* ── ACTIONS 4: Contact section Bootstrap margin-top at mobile ────────────
 *
 * Root cause: Bootstrap 2 .section { margin-top: 2.4rem } = 38.4px fires on
 * .section-action-contact, creating excess gap between the targets and the
 * contact form at mobile.
 */
@media (max-width: 768px) {
  .sbx.actions .section-action-contact {
    margin-top: var(--sbx-space-md);
  }
}


/* ── ACTIONS 5: Salutation value text too large at all widths ─────────────
 *
 * Root cause: .cg-salutation inherits Bootstrap 2 em cascade — computed
 * font-size resolves to ~19px. Reset to base token.
 */
.sbx.actions .cg-salutation {
  font-size: var(--sbx-font-size-base);
}


/* ── ACTIONS 6: Gap between page intro and target search too wide ──────────
 *
 * Root cause: Bootstrap 2 adds 38.4px margin-top on .section-action-targets;
 * intro section also carries 32px margin-bottom from the .sbx.actions .section
 * rule. Combined gap ~70px — too wide at all viewport widths.
 *
 * Fix: override both to --sbx-space-md (16px).
 */
.sbx.actions .section-action-targets {
  margin-top: var(--sbx-space-md);
}
.sbx.actions .section-action-pageintro {
  margin-bottom: var(--sbx-space-md);
}


/* ── P2P 7: Gap between page title and hero image ─────────────────────────
 *
 * Root cause: #content padding-top (clamp → 16px at 390px) creates a white
 * strip above .section-campaign-header on P2P campaign pages.
 * #section-campaign-header only appears on P2P pages — audit confirmed absent
 * on all standard Donations pages.
 *
 * @supports gates the rule; browsers without :has() keep the default padding.
 */
@supports selector(:has(*)) {
  #content:has(#section-campaign-header) {
    padding-top: 0;
  }
}


/* ── BROWSE CLASSES 9: Table cell padding too wide at mobile ──────────────
 *
 * Root cause: .sbxEvents-insLayDefault table.search-result td sets
 * padding: var(--sbx-space-sm) var(--sbx-space-md) = 8px 16px (line 12627).
 * Specificity (0,1,3) beats a plain `table td` override. Must use the same
 * selector to win by cascade (later position in file).
 *
 * Fix: reduce L/R to 4px (--sbx-space-xs) at ≤768px. Vertical 8px retained.
 */
@media (max-width: 768px) {
  .sbxEvents-insLayDefault table.search-result td {
    padding-left:  var(--sbx-space-xs);
    padding-right: var(--sbx-space-xs);
  }
}


/* ── SEARCH CLASSES 10: Filter button / sort dropdown alignment at mobile ──
 *
 * Root cause: .ordering .controls stacks .openbtn and select#list_ordering
 * vertically (default block). Button should be left of the dropdown select.
 *
 * Applies to both Search Classes URL patterns:
 *   .sbxEvents-search (click-type infinite-scroll page)
 *   #content > .container (scroll-type page)
 */
@media (max-width: 768px) {
  .sbxEvents-search .ordering .controls,
  #content > .container .ordering .controls {
    display:        flex;
    flex-direction: row;
    align-items:    center;
    gap:            var(--sbx-space-sm);
  }

  .sbxEvents-search .ordering .controls select,
  #content > .container .ordering .controls select {
    flex:      1;
    min-width: 0;
  }
}


/* ── SEARCH CLASSES 11: Selected filter pill styling ──────────────────────
 *
 * Root cause: .bootstrap-tagsinput > span.tag.label-info is rendered by the
 * tagsinput JS plugin when filters are active. Default Bootstrap 2 label-info
 * is an unstyled light-blue label — does not match the design system.
 *
 * Fix: restyle to match primary color set.
 */
.sbxEvents-search .bootstrap-tagsinput .tag.label-info,
#content > .container .bootstrap-tagsinput .tag.label-info {
  background:    var(--sbx-primary);
  color:         var(--sbx-text-on-primary);
  border-radius: var(--sbx-radius-pill);
  font-size:     var(--sbx-font-size-sm);
  font-weight:   600;
  padding:       0.25rem 0.625rem;
  line-height:   1.4;
}

.sbxEvents-search .bootstrap-tagsinput .tag.label-info [data-role="remove"],
#content > .container .bootstrap-tagsinput .tag.label-info [data-role="remove"] {
  margin-left: var(--sbx-space-xs);
  cursor:      pointer;
  opacity:     0.75;
}

.sbxEvents-search .bootstrap-tagsinput .tag.label-info [data-role="remove"]:hover,
#content > .container .bootstrap-tagsinput .tag.label-info [data-role="remove"]:hover {
  opacity: 1;
}


/* ── SEARCH CLASSES 12: Search button text alignment at mobile ─────────────
 *
 * Root cause: search-template.css sets .s-button { width: 48% } at mobile
 * (block-like). Block inputs default to text-align:left in most browsers.
 *
 * Applies as fallback for any layout where buttons remain column-stacked.
 */
@media (max-width: 768px) {
  .sbxEvents-search input.s-button,
  #content > .container input.s-button {
    text-align: center;
  }
}


/* ── SEARCH CLASSES 13: Buttons inline with keyword field at mobile ────────
 *
 * Root cause: search-template.css overrides .search-form to flex-direction:
 * column at ≤767px, stacking .s-buttons-container below the keyword input.
 *
 * Fix: keep row layout — field expands, buttons stay right of keyword.
 * Both Search Classes URL patterns receive the fix.
 */
@media (max-width: 768px) {
  .sbxEvents-search .search-form,
  #content > .container .search-form {
    flex-direction: row;
    flex-wrap:      nowrap;
    align-items:    stretch;
  }

  .sbxEvents-search .search-form .s-field,
  #content > .container .search-form .s-field {
    flex:      1;
    min-width: 0;
  }

  .sbxEvents-search .search-form .s-buttons-container,
  #content > .container .search-form .s-buttons-container {
    flex-shrink: 0;
    display:     flex;
    gap:         var(--sbx-space-xs);
  }

  .sbxEvents-search .search-form .s-button,
  #content > .container .search-form .s-button {
    width:         auto;
    white-space:   nowrap;
    padding-left:  var(--sbx-space-sm);
    padding-right: var(--sbx-space-sm);
  }
}


/* ── EVENTS CART 14: Cart table L/R padding at mobile ─────────────────────
 *
 * Root cause: .sbxEvents-cart .cart-table td { padding: var(--sbx-space-md) }
 * = 16px. At 390px the container is ~326px; 16px L/R on 4 visible columns
 * leaves under 100px for the product name text.
 *
 * Fix: reduce L/R to 8px (--sbx-space-sm) at ≤768px.
 */
@media (max-width: 768px) {
  .sbxEvents-cart .cart-table td,
  .sbxEvents-cart .cart-table thead th {
    padding-left:  var(--sbx-space-sm);
    padding-right: var(--sbx-space-sm);
  }
}


/* ── EVENTS CART 15: Campaign Lookup "Select" button ──────────────────────
 *
 * Root cause: com_events/helpers/elements/reference.php renders:
 *   <span class="btn"><a href="" class="modal">Select</a></span>
 * The outer span.btn is Bootstrap 2 unstyled; the inner <a class="modal">
 * renders as a plain hyperlink with no button affordance.
 *
 * Fix: style the anchor as a primary button. Unconditional — button should
 * be styled at all widths.
 */
.sbxEvents-cart span.btn > a.modal {
  display:         inline-block;
  background:      var(--sbx-btn-primary-bg);
  color:           var(--sbx-btn-primary-text) !important;
  border-radius:   var(--sbx-radius-btn);
  padding:         0.375rem var(--sbx-space-md);
  font-size:       var(--sbx-font-size-sm);
  font-weight:     600;
  text-decoration: none;
  white-space:     nowrap;
  line-height:     1.4;
  transition:      background var(--sbx-motion-fast) var(--sbx-motion-ease);
}

.sbxEvents-cart span.btn > a.modal:hover {
  background: var(--sbx-btn-primary-hover-bg, color-mix(in srgb, var(--sbx-btn-primary-bg) 85%, #000));
  color:      var(--sbx-btn-primary-text) !important;
}


/* ── SHOP 16: Product detail side padding too wide at mobile ──────────────
 *
 * Root cause: .product-store-wrapper { padding: var(--sbx-space-lg) } = 24px
 * adds to #content's own 16px → 40px each side → 80px total horizontal
 * gutter at 390px, squeezing product image and detail into ~230px.
 *
 * Fix: reduce wrapper padding to --sbx-space-sm (8px) at ≤768px.
 * #content's clamp padding (16px) provides the outer breathing room.
 */
@media (max-width: 768px) {
  .product-store-wrapper {
    padding: var(--sbx-space-sm);
  }
}


/* ── SHOP CART 17-19: Width constraint, horizontal scroll, field width ─────
 *
 * Root cause: com_store/views/cart/tmpl/default.php injects a <style> block:
 *   .page-content { width: 80%; margin: auto; }
 * This block follows template.css in cascade order and wins specificity ties,
 * forcing the cart to 80% width even at narrow viewports (312px at 390px).
 * Products table columns overflow the narrowed container → horizontal scroll.
 * Contact section fields are capped at 312px instead of the full 358px.
 *
 * Fix: !important overrides the injected rule at mobile.
 */
@media (max-width: 768px) {
  .page-content {
    width:      100% !important;
    margin:     0   !important;
    box-sizing: border-box;
  }
}


/* ========================================================================== */
/* PHASE 34 — DONATION TOTAL SUMMARY CARD + RECURRING AFFIRMATION             */
/* The Total had no rules at all before this phase: it inherited plain body   */
/* type from the system stylesheets, so the one figure a donor most needs to  */
/* confirm carried no more weight than the fine print around it.              */
/* Markup is unchanged stock com_donations output. All color comes from the  */
/* existing brand tokens, so the card takes on whatever the site already is.  */
/* Added: v210, 2026-08-18                                                    */
/* ========================================================================== */


/* ── The Total as a summary card ──────────────────────────────────────────
 *
 * `.section-total` is emitted only by com_donations (donate form, the
 * recurring update views, and the MS Teams variant), so `.donations` is a
 * safe scope — it covers every surface that renders this block.
 *
 * Deliberately NOT a cream panel: the source design this is adapted from is
 * cream because that site's brand is warm orange. Driving the tint from
 * --sbx-surface-alt keeps the card in whatever palette the site runs.
 */
/* Double class is deliberate. `.donations .item-section + .item-section`
 * (Phase 8, ~line 2034) sets a 1px hairline border-top at specificity (0,3,0)
 * and fires whenever the Total follows another section — which is the normal
 * server-rendered case. A (0,2,0) selector loses to it no matter how late it
 * appears in the file, silently dropping the 3px brand rule. Matching the
 * existing specificity and landing later is what wins. */
.donations .item-section.section-total {
  margin:        var(--sbx-space-lg) 0 var(--sbx-space-md);
  padding:       var(--sbx-space-md) var(--sbx-space-lg);
  background:    var(--sbx-surface-alt);
  border:        1px solid var(--sbx-border-subtle);
  border-top:    3px solid var(--sbx-primary);
  border-radius: var(--sbx-radius-card);
  box-shadow:    var(--sbx-shadow-sm);
  box-sizing:    border-box;
}

.donations .section-total p {
  margin:      0;
  display:     flex;
  align-items: baseline;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-xs) 6px;
  line-height: 1.2;
}

/* The label is deliberately quieter than the number — the donor is checking
 * the figure, not the word "Total". */
.donations .section-total strong {
  flex:           0 0 auto;
  margin-right:   var(--sbx-space-xs);
  font-size:      var(--sbx-font-size-label);
  font-weight:    700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color:          var(--sbx-text-muted);
}

/* tabular-nums stops the figure changing width as the amount recalculates */
.donations .section-total .price_total {
  font-size:             2.5rem;
  font-weight:           800;
  line-height:           1;
  letter-spacing:        -0.02em;
  color:                 var(--sbx-primary);
  font-variant-numeric:  tabular-nums;
}

.donations .section-total .currency-symbol {
  font-size:   1.5rem;
  font-weight: 800;
  line-height: 1;
  color:       var(--sbx-primary);
  align-self:  flex-start;
  margin-top:  2px;
}

.donations .section-total .currency-code {
  font-size:      var(--sbx-font-size-xs);
  font-weight:    700;
  letter-spacing: 0.08em;
  color:          var(--sbx-text-muted);
}


/* ── Recurring affirmation line ───────────────────────────────────────────
 *
 * Injected by sbxTotalNote (index.php) only while a recurring interval is
 * selected. The dashed rule separates confirmation from encouragement so the
 * note reads as commentary on the figure rather than part of it.
 */
.donations .section-total .sbx-total-note {
  display:      flex;
  align-items:  center;
  gap:          var(--sbx-space-sm);
  margin:       var(--sbx-space-md) 0 0;
  padding-top:  var(--sbx-space-md);
  border-top:   1px dashed var(--sbx-border-color);
  font-size:    var(--sbx-font-size-sm);
  font-weight:  700;
  line-height:  1.35;
  color:        var(--sbx-primary-dark);
  animation:    sbx-total-note-in 320ms ease-out both;
}

.donations .section-total .sbx-total-note-icon {
  flex:        0 0 auto;
  font-size:   1.05rem;
  line-height: 1;
  color:       #d64545;
}

@keyframes sbx-total-note-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Narrow viewports ─────────────────────────────────────────────────────
 * The figure steps down so it cannot collide with the currency code once the
 * flex row starts wrapping.
 */
@media (max-width: 600px) {
  .donations .section-total {
    padding: var(--sbx-space-md);
  }
  .donations .section-total .price_total   { font-size: 2rem; }
  .donations .section-total .currency-symbol { font-size: 1.25rem; }
}


@media (prefers-reduced-motion: reduce) {
  .donations .section-total .sbx-total-note { animation: none; }
}


/* ========================================================================== */
/* PHASE 35 — FOOTER IDENTITY BLOCK                                          */
/* The footer now renders from Account Settings (com_sbxaccount) instead of   */
/* hard-coded placeholders, and gains a `footer` module position for          */
/* site-specific copy. Elements with no stored value are omitted entirely —   */
/* the CSS must therefore never assume any given child is present.            */
/* Added: v211, 2026-08-18                                                    */
/* ========================================================================== */

/* Layer 2 — site-authored copy. Sits between the identity block and the
 * legal line, and collapses to nothing when no module is published. */
.footer-extra {
  flex-basis: 100%;
  font-size:  var(--sbx-font-size-sm);
  color:      var(--sbx-text-on-dark);
  line-height: 1.6;
}

.footer-extra p:last-child {
  margin-bottom: 0;
}

.footer-extra a {
  color:           var(--sbx-primary-pale);
  text-decoration: underline;
}

.footer-extra a:hover {
  color: var(--sbx-text-on-primary);
}

/* Stated as a plain fact, deliberately quiet — it is a reference number, not
 * a claim. Any deductibility wording is authored in the footer module. */
.footer-ein {
  font-size:      var(--sbx-font-size-xs);
  letter-spacing: 0.04em;
  color:          rgba(255, 255, 255, 0.55);
  margin:         0 0 var(--sbx-space-xs) 0;
}


/* ==========================================================================
   PHASE 36 — CONTENT BAND POSITIONS                                         */
/* Two module positions, `below-header` and `above-footer`, for site-authored
   content bands. Both wrappers are emitted only when a module is published,
   so an unused position contributes nothing at all.
   Intentionally minimal: no surface, width or alignment vocabulary yet —
   those belong with the Brand Settings UI that will write them.
   Added: v212, 2026-08-18                                                    */
/* ========================================================================== */

.sbx-band {
  width: 100%;
}

/* Match the content column so a band lines up with the page it sits against.
   Overridden per module by sbxw-full. */
.sbx-band > .sbxMod {
  max-width: var(--sbx-content-width);
  margin:    0 auto;
  padding:   var(--sbx-space-md);
  box-sizing: border-box;
}

.sbx-band--below-header > .sbxMod {
  padding-top: var(--sbx-space-lg);
}

.sbx-band--above-footer > .sbxMod {
  padding-bottom: var(--sbx-space-lg);
}

@media (max-width: 600px) {
  .sbx-band > .sbxMod {
    padding: var(--sbx-space-md) var(--sbx-space-sm);
  }
}


/* ==========================================================================
   PHASE 37 — CONTENT BAND CLASS VOCABULARY                                   */
/* Emitted by modChrome_sbxBand from moduleclass_sfx. Every value here comes
   from the existing brand tokens, so a band takes the site's palette rather
   than a fixed one, and no new hex is introduced.
   Surfaces ship PRE-PAIRED foregrounds — text, links and headings together.
   Nothing computes a color at runtime, which is what keeps link contrast from
   silently failing the way an automatic light/dark flip would.
   Added: v213, 2026-08-18                                                    */
/* ========================================================================== */

/* ── Width ───────────────────────────────────────────────────────────────── */
.sbx-band > .sbxMod.sbxw-full {
  max-width: none;
  padding-left:  var(--sbx-space-lg);
  padding-right: var(--sbx-space-lg);
}

/* ── Alignment ───────────────────────────────────────────────────────────── */
.sbx-band > .sbxMod.sbxa-left   { text-align: left; }
.sbx-band > .sbxMod.sbxa-center { text-align: center; }
.sbx-band > .sbxMod.sbxa-right  { text-align: right; }

/* Images follow the alignment rather than staying stuck at the left edge. */
.sbx-band > .sbxMod.sbxa-center .sbxMod-content img { margin-left: auto; margin-right: auto; display: block; }
.sbx-band > .sbxMod.sbxa-right  .sbxMod-content img { margin-left: auto; display: block; }

/* ── Surfaces ────────────────────────────────────────────────────────────── */
/* Default: inherits the page. Declared so the class is real rather than a
   no-op an admin might think has failed. */
.sbx-band > .sbxMod.sbxsurf-default {
  background: transparent;
  color:      var(--sbx-text-body);
}

.sbx-band > .sbxMod.sbxsurf-muted {
  background: var(--sbx-surface-alt);
  color:      var(--sbx-text-body);
}
.sbx-band > .sbxMod.sbxsurf-muted a { color: var(--sbx-text-link); }

/* SOLID brand — the Action Color itself, with the foreground sbx_pick_foreground()
   already guarantees against it. This is the high-contrast stripe a band position
   usually wants, and until v236 it did not exist: "brand" was the pale tint below,
   which is why an earlier attempt to invert a button on it produced white on pale
   peach. A band is a horizontal break in the page; the surface that says so most
   plainly is the brand color at full strength. */
.sbx-band > .sbxMod.sbxsurf-brand {
  background: var(--sbx-primary);
  color:      var(--sbx-text-on-primary);
}
.sbx-band > .sbxMod.sbxsurf-brand a { color: var(--sbx-text-on-primary); text-decoration: underline; }
.sbx-band > .sbxMod.sbxsurf-brand .sbxMod-title { color: var(--sbx-text-on-primary); }

/* The former "brand" — a pale wash for a band that should recede rather than
   announce. Kept because it is genuinely useful, renamed because calling a tint
   "brand" is what caused the confusion in the first place. */
.sbx-band > .sbxMod.sbxsurf-tint {
  background: var(--sbx-primary-pale);
  color:      var(--sbx-primary-darker);
}
.sbx-band > .sbxMod.sbxsurf-tint a { color: var(--sbx-primary-dark); }
.sbx-band > .sbxMod.sbxsurf-tint .sbxMod-title { color: var(--sbx-primary-darker); }

/* The one surface that inverts. Foreground tokens are the same pair the footer
   already uses on this background, so contrast is inherited rather than
   re-derived. */
.sbx-band > .sbxMod.sbxsurf-dark {
  background: var(--sbx-surface-dark);
  color:      var(--sbx-text-on-dark);
}
.sbx-band > .sbxMod.sbxsurf-dark a { color: var(--sbx-primary-pale); }
.sbx-band > .sbxMod.sbxsurf-dark .sbxMod-title { color: var(--sbx-text-on-primary); }

/* A full-bleed tinted band should carry its background edge to edge while the
   text stays on the content measure. */
.sbx-band > .sbxMod.sbxw-full .sbxMod-content {
  max-width: var(--sbx-content-width);
  margin:    0 auto;
}

.sbx-band > .sbxMod .sbxMod-title {
  margin:      0 0 var(--sbx-space-sm);
  font-size:   var(--sbx-font-size-h3);
  font-weight: 600;
}


/* ==========================================================================
   PHASE 38 — BREAKPOINT VISIBILITY UTILITIES                                 */
/* Deliberately GLOBAL, unlike the rest of the band vocabulary.
 *
 * sbxsurf / sbxw / sbxa are band-layout concepts and stay scoped to
 * `.sbx-band > .sbxMod` — a surface on a stray <span> means nothing. Hiding by
 * breakpoint is genuinely generic, so these work on ANY element: the module
 * wrapper via moduleclass_sfx, and equally a <div> or <span> an admin writes
 * inside the module's own HTML.
 *
 * Bootstrap 2's .hidden-phone / .visible-desktop are present and functional on
 * this platform, but their breakpoints disagree with the template's: Bootstrap
 * calls anything under 980px "tablet", while sbxEng_modern switches to its
 * desktop layout at 768px. Between 768 and 979 a Bootstrap-marked module would
 * vanish while the page around it renders desktop — measured, not assumed.
 * These use the template's own 599/767 boundaries so they can never disagree
 * with the layout they sit in.
 *
 * !important matches the convention for visibility utilities: they are meant
 * to win over whatever display the element would otherwise take.
 *
 * Note for whoever writes the admin UI: hiding removes content from the
 * accessibility tree, not just the viewport, and a hidden image is still
 * downloaded. Neither is a reason to withhold the feature; both are reasons to
 * say so where the choice is made.
 * Added: v214, 2026-08-18                                                     */
/* ========================================================================== */

@media (max-width: 599px) {
  .sbxhide-mobile { display: none !important; }
}

@media (min-width: 600px) and (max-width: 767px) {
  .sbxhide-tablet { display: none !important; }
}

@media (min-width: 768px) {
  .sbxhide-desktop { display: none !important; }
}


/* ==========================================================================
   PHASE 39 — RESPONSIVE + HEADER REFINEMENTS                                */
/* Four issues raised from a walkthrough of the donation form.
   Added: v215, 2026-08-18                                                    */
/* ========================================================================== */

/* ── Name fields side by side through the tablet band ─────────────────────
 *
 * li.name-group-notice holds a label plus two span.span-block. Below 768 the
 * spans go display:block and stack, which is right on a phone and wasteful on
 * a tablet: the two inputs total 472px and the container is ~680px there.
 * Measured before: they stacked at every width under 768. Now they share the
 * row from 600 up and stack only below that.
 *
 * THE UPPER BOUND IS GONE (v257). Above 767 the spans went back to floating at
 * their natural widths, which come from the inputs' size attributes -- 20 and 30
 * characters, so 207px and 290px. Two fields on one row at visibly different
 * widths, on every desktop page, and their 497px total wraps the pair whenever
 * the column is narrower than that. At 1024 with the photo panel the column is
 * 470px, so an iPad in landscape got the label, then First Name, then Last Name
 * on three lines at two different widths.
 *
 * That predates the panel work -- the column was 493px before it and wrapped
 * too. What the panel work did was make it easy to see.
 *
 * Nothing new is written to fix it: the treatment below already solved exactly
 * this and its own comment names the cause. It simply had no reason to run above
 * the tablet band at the time. `flex: 1 1 0` makes the halves equal at every
 * width instead of only one band of them.
 */
@media (min-width: 600px) {
  .donations li.name-group-notice {
    display:     flex;
    flex-wrap:   wrap;
    align-items: flex-end;
    gap:         0 var(--sbx-space-sm);
  }

  /* The "Name:" label keeps its own line above the pair. */
  .donations li.name-group-notice > label.desc {
    flex: 0 0 100%;
  }

  /* flex-basis 0 so both halves share the row equally regardless of the
   * inputs' size attributes (20 and 30 chars, hence the uneven natural widths). */
  .donations li.name-group-notice > .span-block {
    flex:      1 1 0;
    min-width: 0;
    display:   block;
  }

  .donations li.name-group-notice > .span-block input {
    width:      100%;
    box-sizing: border-box;
  }
}

/* ── Below 600: stacked, and each one full width ──────────────────────────
 *
 * The pair stacks on a phone, which is right. What was wrong is that they kept
 * the natural widths their size attributes give them -- 207px and 290px inside
 * a 326px form at 390 -- so two stacked fields sat at two different widths, and
 * neither reached the edge that the Email field directly beneath them does.
 *
 * Nothing about a stacked field should be narrower than the column it is in. */
@media (max-width: 599px) {
  .donations li.name-group-notice > .span-block {
    display: block;
    width:   100%;
  }

  .donations li.name-group-notice > .span-block input {
    width:      100%;
    box-sizing: border-box;
  }
}

/* ── Header: tighten Sign Up to Sign In ───────────────────────────────────
 *
 * "Sign Up" is a menu item inside #ja-cssmenu; "Sign In" is a button in a
 * separate #menuToggle. The space between them was #portalmenu's 1rem gap on
 * top of the menu item's own 16px padding — 32px of apparent gap between two
 * adjacent controls.
 */
#portalmenu {
  gap: var(--sbx-space-sm);
}

/* ── Header: a wide logo must not crowd the account controls ──────────────
 *
 * #logo is a flex item sized from its image. A horizontal logo (this one is
 * ~2.6:1, some are 5:1) grows to whatever max-height allows, pushing the nav
 * and Sign In toward the edge. Height already caps the vertical; this caps the
 * horizontal so the controls keep their place regardless of logo proportion.
 */
@media (max-width: 767px) {
  /* Shrink to the space the nav leaves rather than to a guessed fraction of
   * the viewport. A vw cap was tried first and still left the logo overlapping
   * the nav by 20px at 390 and 37px at 360 — the controls render on top of the
   * logo, which is what "pushed too far right" actually looks like. Letting the
   * flex item shrink and clipping the image to it removes the overlap entirely
   * at both widths, and leaves narrower logos untouched because they never hit
   * the constraint. */
  #logo {
    flex:      0 1 auto;
    min-width: 0;
    overflow:  hidden;
  }

  #logo img {
    max-width:       100%;
    object-fit:      contain;
    object-position: left center;
  }

  /* The account controls keep their intrinsic width; the logo yields. */
  #portalmenu {
    flex: 0 0 auto;
  }
}

/* ── Payment method label ─────────────────────────────────────────────────
 *
 * The override that used to live here zeroed #paytypemsg's margins on the
 * premise that "a 15px left indent no other label has". That premise was
 * wrong. Measured on the donation form, every label in .cntr-label carries
 * margin-left: 15px and sits at the same x — Credit Card, Billing Address and
 * both description paragraphs. Zeroing this one made Payment Method the only
 * label flush to the section edge, which is what it looked like on the page.
 *
 * The rule is removed rather than corrected: with no override, #paytypemsg
 * inherits the same 15px as its siblings and lines up with them.
 */

@media (max-width: 767px) {
  .donations #sectPT .sbxPayType {
    padding-left:  0;
    padding-right: 0;
  }
}

/* ==========================================================================
   PHASE 41 — IMAGE SURFACE FOR CONTENT BANDS
   The fifth surface. Deliberately a SURFACE rather than an independent axis:
   Phase 37 ships pre-paired foregrounds so contrast cannot silently fail, and
   a photograph has no pairing of its own. Selecting an image therefore brings
   a foreground and a scrim with it, exactly as the other four bring theirs.

   The image itself is an inline style on .sbxMod, emitted by modChrome_sbxBand
   from the sbxbg param — the one value in the vocabulary that is data rather
   than a token. Everything else here is class-driven as usual.

   Width comes free: .sbxMod already carries sbxw-full / sbxw-content, so a
   content-width band crops the image to the content column and a full-bleed
   band runs it edge to edge with the text still on the measure.
   Added: v217, 2026-08-19
   ========================================================================== */

.sbx-band > .sbxMod.sbxsurf-image {
  position:            relative;
  background-color:    var(--sbx-surface-dark);   /* shows while the image loads */
  background-size:     cover;
  background-repeat:   no-repeat;
  background-position: center center;
  color:               var(--sbx-text-on-dark);
}

/* Same foreground pair as sbxsurf-dark. Inherited rather than re-derived, so
   the two inverted surfaces cannot drift apart. */
.sbx-band > .sbxMod.sbxsurf-image a              { color: var(--sbx-primary-pale); }
.sbx-band > .sbxMod.sbxsurf-image .sbxMod-title  { color: var(--sbx-text-on-primary); }

/* ── Focal point ─────────────────────────────────────────────────────────── */
.sbx-band > .sbxMod.sbxsurf-image.sbxbgpos-top    { background-position: center top; }
.sbx-band > .sbxMod.sbxsurf-image.sbxbgpos-center { background-position: center center; }
.sbx-band > .sbxMod.sbxsurf-image.sbxbgpos-bottom { background-position: center bottom; }

/* ── Scrim ───────────────────────────────────────────────────────────────────
   A pseudo-element rather than a gradient stacked into background-image: the
   image URL is authored data and the scrim is ours, so keeping them on separate
   layers means neither can corrupt the other. */
.sbx-band > .sbxMod.sbxsurf-image::before {
  content:    '';
  position:   absolute;
  inset:      0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.sbx-band > .sbxMod.sbxsurf-image.sbxscrim-none::before   { background: transparent; }
.sbx-band > .sbxMod.sbxsurf-image.sbxscrim-light::before  { background: rgba(0, 0, 0, 0.25); }
.sbx-band > .sbxMod.sbxsurf-image.sbxscrim-medium::before { background: rgba(0, 0, 0, 0.45); }
.sbx-band > .sbxMod.sbxsurf-image.sbxscrim-strong::before { background: rgba(0, 0, 0, 0.65); }

/* Content sits above the scrim. Without this the overlay covers the text it
   exists to make readable. */
.sbx-band > .sbxMod.sbxsurf-image > .sbxMod-content,
.sbx-band > .sbxMod.sbxsurf-image > .sbxMod-title {
  position: relative;
  z-index:  1;
}

/* An image band with no padding of its own would crop to the text height and
   read as a stripe rather than a band. */
.sbx-band > .sbxMod.sbxsurf-image {
  padding-top:    var(--sbx-space-xl);
  padding-bottom: var(--sbx-space-xl);
}

/* The stat grid on an image surface: the number keeps its weight but takes the
   inverted foreground, since the accent is tuned for light grounds. */
.sbx-band > .sbxMod.sbxsurf-image li[class*="sbxcols-"] > strong:first-child {
  color: var(--sbx-text-on-primary);
}

/* ==========================================================================
   PHASE 42 -- CONTENT-ASIDE IMAGE PANEL
   A module position beside the content, following the pattern on the Easter
   Seals donation page: image panel right, content left, and on narrow screens
   the image moves ABOVE the content as a full-bleed banner.

   Applies only when a module is published in `content-aside` -- index.php adds
   .has-aside to #main, so every other page is untouched and no width changes.

   The split widens to --sbx-content-width-wide so the panel is paid for out of
   the extra width rather than out of the content column: content lands near
   830px rather than the ~700px a 1140px container would leave, keeping the
   donation amount grid comfortable.
   Added: v221, 2026-08-20
   ========================================================================== */

#main.has-aside {
  display:     flex;
  align-items: flex-start;
  gap:         0;                 /* panel sits flush against the content */
  max-width:   none;              /* the panel must reach the viewport edge */
}

#main.has-aside #mainbody {
  flex:      1 1 auto;
  max-width: 760px;
  min-width: 0;
  /* CENTRED IN THE COLUMN THE ASIDE LEAVES, not aligned to a container it is
     not in. (v254)
     
     It used to take its left margin from `(100vw - content-width) / 2` -- the
     gutter a CENTRED page would have had -- so the content sat where it would
     have sat with no aside, and every pixel the panel took came off the right.
     That reads as content pinned left with a growing gap before the photo, and
     the gap grows with the viewport.
     
     Measured on the reference implementation, which is where this comes from:
     its aside is 45% at 1280, 1440, 1680 and 1920, and its form is a fixed
     572px CENTRED in the remaining 55% -- gutters of 66, 110, 176 and 242px
     respectively. The gutter is the leftover, not the input. `margin: 0 auto`
     inside the flex column is that, and it is less arithmetic than what it
     replaces.
     
     Below 900px the split stacks and the media query further down resets these
     to auto/full width, so this rule is desktop-only by construction. */
  margin:    0 auto;
}

/* Sticky and exactly one viewport tall. Stretching the panel to full page
   height makes background-size:cover crop a landscape photo into an
   unrecognisable sliver on any page longer than a screen -- and Soapbox pages
   are routinely much longer than the reference. Sticky also means there is
   never a region below the image needing to be filled. */
#content-aside {
  /* 45%, matching the reference implementation, which holds exactly 45% at
     1280, 1440, 1680 and 1920 -- it is a proportion there, not a breakpoint
     table. Was 38%.
     
     The content column pays for the extra 7%: at 1440 the form goes from 615px
     to roughly 550. The donation amount grid was the thing to watch and it
     still lays out in three rows, verified at four widths -- but a page whose
     amount labels are longer than this one's is where it would show first. */
  flex:      0 0 45%;
  height:    100vh;
  position:  sticky;
  top:       0;
  overflow:  hidden;
  background: var(--sbx-surface-dark);   /* shows while the image loads */
}

#content-aside .sbx-aside-inner {
  position: absolute;
  inset:    0;
}

/* Module content is an <img>: cover the panel rather than letterbox it.
   height needs !important -- soapbox-responsive-bootstrap sets
   `img { height: auto !important }`, and absolute positioning does NOT rescue
   it: a replaced element with height:auto and an intrinsic ratio takes its
   height from that ratio rather than stretching between top and bottom, unlike
   a normal box. Same reason the course image and product image rules carry
   !important on height. */
#content-aside .sbx-aside-inner img {
  position:        absolute;
  inset:           0;
  width:           100% !important;
  height:          100% !important;
  display:         block;
  object-fit:      cover;
  object-position: 62% 30%;
}

/* Any caption the module carries sits over the foot of the image. */
/* Anchored to the TOP of the panel, not the bottom.
 *
 * The panel is height:100vh and sticky at top:0, so before any scrolling it
 * begins below the header and its lower edge sits off-screen by exactly the
 * header's height. A caption pinned to the bottom is therefore partly below the
 * fold on first paint — invisible until the visitor scrolls, which for a headline
 * is the wrong way round. Measured at 1440x900: panel top 81, bottom 981.
 *
 * The old single-line quote fit inside that overflow and hid the problem; a
 * three-line headline does not. Top also matches the reference implementations,
 * where the headline is the first thing in the panel.
 *
 * The scrim flips with it — dark where the text is, clearing downward, so the
 * photograph is only dimmed where it has to be. */
#content-aside .sbx-aside-inner p,
#content-aside .sbx-aside-inner figcaption {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: auto;
  margin: 0;
  padding: var(--sbx-space-lg) var(--sbx-space-lg);
  /* Plain white, not --sbx-text-on-dark. That token is body text on a dark
     panel, where a slight cool cast reduces glare over a long read. A short
     caption over a photographic scrim is the opposite job: it wants maximum
     separation from whatever is behind it, and the blue cast read as a tint
     rather than as white. Same treatment the buttons already take on dark. */
  color: var(--sbx-text-on-primary);
  background: linear-gradient(180deg, rgba(12,16,24,.78) 0%, rgba(12,16,24,0) 100%);
  font-family: var(--sbx-font-heading);
  /* Was --sbx-font-size-lg, a flat 18px. Against a full-height photograph that
     is barely above body text, and the caption read as something dropped on the
     image rather than part of it. Scales with the viewport between 20px and
     24px so it holds the panel at every width without a second breakpoint. */
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
/* -- Caption placement (v252) ---------------------------------------------- */
/*
 * Four corners, expressed as TWO independent modifiers rather than four names:
 * absence is top-left, so a panel written before this existed -- a bare <p>, on
 * any site -- keeps rendering exactly as it did and round-trips through the
 * aside form without being flagged as unrepresentable. Four combined class names
 * would have forced a class onto every caption and broken that.
 *
 * No base `sbx-aside-cap` class for the same reason. The generic rule above
 * already styles the caption; these only need to beat it, and (1,2,0) against
 * its (1,1,1) does.
 *
 * A NOTE ON THE BOTTOM TWO. The panel is height:100vh and sticky at top:0, so
 * before any scrolling it begins below the header and its lower edge sits off
 * screen by exactly that much -- measured at 1440x900, the bottom 81px. A bottom
 * caption is therefore partly below the fold on FIRST PAINT and fully visible
 * the moment the visitor scrolls at all. That is a real trade and it is the
 * admin's to make, which is why all four are offered rather than two.
 */
#content-aside .sbx-aside-inner .sbx-aside-cap-right {
  text-align: right;
}

#content-aside .sbx-aside-inner .sbx-aside-cap-bottom {
  top:    auto;
  bottom: 0;
  /* The scrim flips with the text: dark where the words are, clearing upward, so
     the photograph is only dimmed where it has to be. Same reasoning as the top
     placement, mirrored. */
  background: linear-gradient(0deg, rgba(12,16,24,.78) 0%, rgba(12,16,24,0) 100%);
  /* Clear the photo credit, which lives along the bottom of the right edge. The
     room is reserved whether or not a credit is present: a little extra padding
     on a panel without one is invisible, where a caption running under one is
     not. */
  padding-right: calc(var(--sbx-space-lg) + 24px);
}

/* -- Photo credit on the aside (v239) -------------------------------------- */
/*
 * `<p class="sbx-aside-credit">Photo: Name / Agency</p>` inside the aside
 * module's content, alongside the image and caption.
 *
 * A CLASS, NOT A MODULE PARAM. The band positions store arbitrary text like the
 * background path in their own param because the Designer is there to write it.
 * content-aside has no Designer surface — it is managed in the Module Manager
 * only — so a param would have nowhere to be set from. A class the admin types
 * in the module content is authorable today, and is the same route .sbx-callout
 * and the other editorial patterns take outside the band editor. If the aside
 * ever gains a Designer surface, this should become a proper field then.
 *
 * SPECIFICITY: the caption rule above matches ANY p inside .sbx-aside-inner at
 * (1,2,1) and would absolutely-position the credit at the top of the panel, on
 * top of the caption. This is (1,3,0) — one more class, so it wins — and it
 * resets every property that rule sets rather than only the ones that look
 * wrong, because a later caption change would otherwise leak into it.
 */
#content-aside .sbx-aside-inner .sbx-aside-credit {
  position:      absolute;
  top:           auto;
  bottom:        var(--sbx-space-md);
  left:          auto;
  right:         0;
  margin:        0;
  padding:       0 4px;
  background:    none;
  /* Bottom-to-top along the right edge, which is what keeps a long agency
     credit legible without stealing width from the image. */
  writing-mode:  vertical-rl;
  font-family:   var(--sbx-font-body);
  font-size:     0.6875rem;          /* 11px — a credit, not a caption */
  font-weight:   400;
  line-height:   1.2;
  letter-spacing: 0.02em;
  text-wrap:     wrap;
  color:         #ffffff;
  /* The panel's scrim only covers the top, so this sits over bare photograph —
     and the photograph is the customer's, so it may be bright, busy or white.
     A single soft shadow was not enough on a sunlit image; this is the standard
     two-layer treatment: a tight opaque halo that holds the letterforms, then a
     soft drop that separates the whole run from what is behind it.

     Not a scrim: a gradient band down the right edge would read as a design
     element, and a credit should not. Not a pill either — a chip hugging the
     text is legible but announces itself, which is the opposite of what a
     photo credit is for. */
  text-shadow:   0 0 2px rgba(0, 0, 0, 0.95),
                 0 1px 6px rgba(0, 0, 0, 0.75);
  pointer-events: none;              /* never intercepts a click on the panel */
  max-height:    calc(100% - var(--sbx-space-xl) * 2);
  overflow:      hidden;
}

/* Below the split point the panel is a short banner — clamp(200px, 42vw, 300px)
   — and a vertical credit in that height either clips or crowds the caption.
   It lies down and tucks into the bottom-right corner instead. */
@media (max-width: 900px) {
  #content-aside .sbx-aside-inner .sbx-aside-credit {
    writing-mode: horizontal-tb;
    bottom:       var(--sbx-space-sm);
    right:        var(--sbx-space-sm);
    max-height:   none;
    max-width:    70%;
    text-align:   right;
  }
}

#content-aside { position: sticky; }   /* containing block for the caption */

/* ── Below the split point: banner above the content ──────────────────────
   Full bleed and square, flush beneath the header. position:relative is
   required, not static -- the caption is absolutely positioned and would
   otherwise escape to the nearest positioned ancestor. */
@media (max-width: 900px) {
  #main.has-aside { flex-direction: column; }

  #main.has-aside #mainbody {
    margin-left:  auto;
    margin-right: auto;
    max-width:    var(--sbx-content-width);
    width:        100%;
  }

  #content-aside {
    order:        -1;
    flex:         none;
    position:     relative;
    width:        100vw;
    margin-left:  calc(50% - 50vw);
    height:       clamp(200px, 42vw, 300px);
    margin-bottom: var(--sbx-space-lg);
  }

  #content-aside .sbx-aside-inner p,
  #content-aside .sbx-aside-inner figcaption {
    padding:   var(--sbx-space-md);
    font-size: var(--sbx-font-size-md);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 43 — SUGGESTION MENUS (address type-ahead + picklist type-ahead)
   ═══════════════════════════════════════════════════════════════════════════
   Two suggestion menus render inside our pages and neither was ours:

     .ui-autocomplete   the Billing Address type-ahead (Azure Maps), built by
                        com_donations/assets/js/sbx_donations.js on jQuery UI.
                        With nothing here it inherited jQuery UI 1.12.1's base
                        theme from a CDN — Arial, #333, no elevation, and a menu
                        wider than the field it belongs to.

     .tt-menu           picklists converted to type-aheads by
                        media/soapbox/js/picklist_typeahead.js (Bloodhound).
                        Its own stylesheet, media/soapbox/css/typeahead.css, is
                        Bootstrap 3 dropdown styling with #ccc and #333 baked in.

   Styled here rather than in the platform stylesheet on purpose. These are
   platform widgets, but media/soapbox/css is shared by every template and
   changing it needs a platform release; this file is the template's own and
   ships with it. If this proves out, promoting it upstream later is an easier
   argument with evidence attached.

   Everything below reuses the tokens the form controls already use, so a
   suggestion menu belongs to the brand variant the same way an input does. */

.ui-autocomplete,
.twitter-typeahead .tt-menu,
.twitter-typeahead .tt-dropdown-menu {
    background:    var(--sbx-surface);
    border:        1px solid var(--sbx-border-color);
    border-radius: var(--sbx-radius-input);
    box-shadow:    var(--sbx-shadow-card-hover);
    padding:       4px;
    margin:        4px 0 0;
    font-family:   var(--sbx-font-body);
    font-size:     var(--sbx-font-size-base);
    color:         var(--sbx-text-body);

    /* Ten results at ~44px is a 440px menu that lands on top of the State
       select beneath it. Six rows and scroll. */
    max-height:    var(--sbx-suggest-max-height, 17.5rem);
    overflow-y:    auto;
    overscroll-behavior: contain;
}

/* jQuery UI sizes the menu with an inline width taken from the input, but its
   base theme also sets min-width, which is what pushed it wider than the field.
   Neither menu may exceed its own positioned box. */
.ui-autocomplete { min-width: 0 !important; box-sizing: border-box; }

/* ── Rows ────────────────────────────────────────────────────────────────
   Three bullet mechanisms are in play, exactly as recorded in bands.css:
   templates/system/css paints bullet-default.png as a BACKGROUND behind every
   li, so list-style and ::marker both appear to do nothing. The background and
   its reserved padding have to go too, or every suggestion sits indented behind
   an invisible dot. */
.ui-autocomplete > li,
.ui-menu.ui-autocomplete .ui-menu-item {
    list-style:       none;
    background-image: none;
    margin:           0;
    padding:          0;
}

.ui-autocomplete .ui-menu-item-wrapper,
.twitter-typeahead .tt-suggestion {
    display:       block;
    padding:       0.5rem 0.75rem;
    border:        none;                     /* jQuery UI draws one on hover */
    border-radius: var(--sbx-radius-sm);
    line-height:   1.35;
    color:         var(--sbx-text-body);
    cursor:        pointer;
}

/* ── Hover and keyboard focus ────────────────────────────────────────────
   jQuery UI's own active state is its blue with its own border, which reads as
   a different product. The pale primary wash is what selected states use
   everywhere else in this template.

   .ui-state-active is what jQuery UI sets while arrowing through the list, so
   this doubles as the keyboard focus style — the reason it carries an inset
   ring rather than only a background: a wash alone is easy to lose when the
   list scrolls under the pointer. */
.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-state-active,
.ui-autocomplete .ui-state-focus,
.twitter-typeahead .tt-suggestion:hover,
.twitter-typeahead .tt-suggestion.tt-cursor {
    background:  var(--sbx-primary-pale);
    color:       var(--sbx-text-body);
    border:      none;
    margin:      0;
    font-weight: inherit;
}
.ui-autocomplete .ui-state-active,
.ui-autocomplete .ui-state-focus,
.twitter-typeahead .tt-suggestion.tt-cursor {
    box-shadow: inset 0 0 0 2px var(--sbx-primary);
}

/* ── Two-line rows ───────────────────────────────────────────────────────
   Written by sbxAddressSuggestions() in index.php. Seven results that differ
   only after the first comma are hard to tell apart on one run-on line, so the
   street sits on its own and the locality goes underneath, muted. */
.sbx-suggest-line1 { display: block; }
.sbx-suggest-line2 {
    display:    block;
    font-size:  var(--sbx-font-size-sm);
    color:      var(--sbx-text-muted);
    margin-top: 1px;
}
/* The matched substring, restored — jQuery UI bolds it by default and the
   platform's custom renderer had discarded it. */
.sbx-suggest-match { font-weight: 700; color: inherit; }

/* On an active row the muted second line loses too much contrast against the
   wash, so it steps up to body color rather than staying grey. */
.ui-autocomplete .ui-state-active .sbx-suggest-line2,
.ui-autocomplete .ui-menu-item-wrapper:hover .sbx-suggest-line2 {
    color: var(--sbx-text-body);
}

/* ── Nothing found ───────────────────────────────────────────────────────
   The address field shows NOTHING when a search returns no results — no
   message, no row. Two reasons, and the first is the stronger:

     1. Anything rendered below the field is in normal flow and pushes the rest
        of the form down, moving controls under the donor's cursor mid-typing.
        A notice about a non-event is not worth a layout shift.
     2. It is the dominant pattern. Measured on Amazon: with no matches the
        suggestion container stays in the DOM with zero items and no text. The
        absence of suggestions is itself the signal that something is mistyped,
        and unlike a search box, a donor already knows their own address —
        nothing is blocked by silence.

   If a message is ever wanted, it belongs INSIDE the overlay, which floats and
   therefore shifts nothing. That is why the rule below survives: the picklist
   type-ahead renders its empty message as a row within its own menu. */
.twitter-typeahead .tt-menu .empty-message {
    display:    block;
    padding:    0.5rem 0.75rem;
    font-size:  var(--sbx-font-size-sm);
    color:      var(--sbx-text-muted);
    cursor:     default;
}

/* ── Phone ───────────────────────────────────────────────────────────────
   The menu is positioned under the field, so with the keyboard raised a tall
   list is mostly below the fold. Fewer rows keeps the first ones reachable
   without scrolling, and most donation traffic is here. */
@media (max-width: 640px) {
    .ui-autocomplete,
    .twitter-typeahead .tt-menu {
        --sbx-suggest-max-height: 11.5rem;
        font-size: var(--sbx-font-size-base);
    }
    .ui-autocomplete .ui-menu-item-wrapper,
    .twitter-typeahead .tt-suggestion {
        padding: 0.625rem 0.75rem;   /* taller touch target */
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 44 — PAYMENT SECTION: SINGLE COLUMN, NO PANEL
   ═══════════════════════════════════════════════════════════════════════════
   The secure payment section rendered as a grey panel with a two-column split:
   labels floated left at 31%, fields at 65%. Measured on the donation form at
   1440px that gave the label column 190px, which is not enough for the copy it
   holds — "Please provide the information as written on your credit card" wrapped
   to four lines beside a field column squeezed to 399px.

   Both come from the SYSTEM stylesheets, not from this template:
       .cntr-label                     { float: left; width: 31% }
       ul.compList-leftLabel li .cntr  { float: left; width: 65% }
       .item-paymentsection            { background: #f1f1f1 !important }

   Overridden here rather than in the app or in soapbox-core, which is the
   established place for this markup — see the payment-form notes on scoping to
   ul.compList-payment. template.css loads after the system sheets, so an
   !important here beats theirs at equal specificity.

   ── Blast radius, checked rather than assumed ───────────────────────────────
       ul.compList-payment    com_donations (donate, msteams)
                              com_events    (cart, rsvp)
                              com_activate  (activate)
       .item-paymentsection   com_donations (donate, msteams)
                              com_activate  (activate)

   Shop is NOT affected: its payment section uses Bootstrap control-group markup
   with no form-horizontal, so it already stacks. This change brings Donations
   and Events into line with what Shop has always done. Auctions, Petitions and
   Actions carry no payment markup of this kind at all.

   An existing note further up this file says "Events and Shop do not use
   .item-paymentsection — no regression risk." That is true as far as it goes and
   omits com_activate, which does use it. Corrected here.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── The panel ───────────────────────────────────────────────────────────────
   The grey existed to mark the payment step as a distinct, secure area. The
   page already does that with a section heading, and on a form whose every
   other section is on white, one grey block reads as a leftover rather than as
   emphasis. !important is required only because the system rule carries it. */
.item-paymentsection {
    background: transparent !important;
}
/* The system pads the panel to sit its content inside the grey. With no grey to
   sit inside, that padding just indents the payment fields relative to every
   other field on the form. */
.item-paymentsection .section-header,
.item-paymentsection .msg {
    padding-left:  0;
    padding-right: 0;
}
.item-paymentsection .section-content { margin: 0; }

/* ── The columns ─────────────────────────────────────────────────────────────
   Label above field, both full width. Scoped to compList-payment so the
   two-column treatment survives everywhere else it is used deliberately —
   this is a decision about the payment form, not about compList. */
ul.compList-payment li.complex > div.cntr-label,
ul.compList-payment li.complex > div.cntr {
    float:  none;
    width:  100%;
    margin: 0;
}

/* The system indents the label text 15px inside its own floated column. With
   the column gone that indent misaligns every label from the field beneath it. */
ul.compList-payment li.complex > div.cntr-label > label.desc,
ul.compList-payment li.complex > div.cntr-label > p.desc {
    margin-left:  0;
    margin-right: 0;
}

/* Breathing room between the label and its field, and between rows — the float
   layout got that from the columns themselves. */
ul.compList-payment li.complex > div.cntr-label { margin-bottom: var(--sbx-space-sm); }
ul.compList-payment li.complex                  { padding-top:   var(--sbx-space-md); }
ul.compList-payment li.complex:first-child      { padding-top:   0; }

/* NOT touched: span.span-block.left / .right inside .cntr. Those are the
   sub-grid that puts first and last name side by side, and expiry month, year
   and security code in a row. Stacking those too would make the form longer
   without making it clearer — the reference keeps them paired. */

/* The mobile rule .donations .section-billing .sbxPayType { width:75% !important }
   was sized for a 65% field column. At full width it leaves a quarter of the row
   empty for no reason. */
@media (max-width: 767px) {
    .donations .section-billing .sbxPayType { width: 100% !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 44b — REDUNDANT HORIZONTAL RULES
   ═══════════════════════════════════════════════════════════════════════════
   Three separate rules were drawing lines where one already existed. Measured
   on the donation form at 1440px, by y position:

     1117  #donate-billing        section divider above "Secure Payment"
     1190  li#sectPT.border-top   a SECOND line, 73px later, before any content
     1333  li#sectCC.border-top   between Payment Method and Credit Card
     1698  li#sectBA.border-top   between Credit Card and Billing Address

      739  #donate-dedication     1px DOTTED  bottom, from .item-outlinesection
      755  #donate-contactinfo    1px SOLID   top, from the section divider
                                  — two lines 16px apart, in different styles

   None of these come from the system stylesheets except the dotted pair; the
   row dividers are this file's own .donations li.complex.border-top rule, added
   when the payment rows were a two-column layout that needed help being read as
   separate groups. With the rows now stacked and their labels bold, the groups
   read on their own — which is what the reference implementations do.

   ── Scoping, because .border-top is used far beyond here ────────────────────
   Auctions, Shop and several other Donations views all use .border-top for
   unrelated dividers. Everything below is scoped to ul.compList-payment, so
   only the payment rows change.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Donations: no row dividers at all ───────────────────────────────────────
   #donate-billing already carries the section divider that separates payment
   from Contact Information, so the first row's line is a straight duplicate 73
   pixels below it. The rest go for the reason above. Only the border is
   removed — the padding and margin those rows carry stay, so the groups keep
   their spacing. */
.donations ul.compList-payment li.complex.border-top {
    border-top: none;
}

/* ── Events: keep the first, drop the rest ───────────────────────────────────
   Events is NOT the same case and must not get the same rule. Its billing
   container has no top border and its #sectBilling-title has no bottom border,
   so #sectPT's line is the ONLY thing separating the heading from the payment
   content. Removing it there would leave the section running into its own
   title.

   The sibling combinator targets a bordered row that follows another bordered
   row, which is exactly sectCC and sectBA, without depending on either one's
   position in the list. */
.com_sbxEvents ul.compList-payment li.complex.border-top ~ li.complex.border-top {
    border-top: none;
}

/* ── The Dedication double line ──────────────────────────────────────────────
   .item-outlinesection is a legacy treatment that outlines its section with a
   dotted rule top and bottom. Our own `.item-section + .item-section` rule
   already draws a solid divider between every pair of sections, so the dotted
   bottom lands 16px above the next section's solid top: two lines, two styles,
   one boundary.

   The dotted TOP is already invisible — the solid rule wins on source order —
   so only the bottom shows today. Both are cleared, because leaving a rule that
   only fails to appear by accident of ordering is how it comes back.

   Donations-only: .item-outlinesection is emitted by com_donations' dedication
   section (donate and msteams) and nowhere else. */
.donations .item-outlinesection {
    border-top:    none;
    border-bottom: none;
}


/* ===========================================================================
   PHASE 46 — FOLLOW LINKS (.sbx-follow)
   ===========================================================================

   The organization's own social profiles, server-rendered from Brand Settings.
   NOT share links — sharing is per page and already exists as .section-socialshare
   in Actions and Petitions.

   Those two must look like one design, so the proportions here are lifted from
   that pattern exactly: a 44px circle in the brand primary with the paired
   foreground, hover to primary-dark, the shared focus ring. Nothing new is
   invented; the only difference is what the circle contains and where the link
   goes.

   IN template.css, NOT bands.css: unlike the ink, mark and button classes, this
   markup is never authored by hand. It is emitted by sbx_render_social(), so it
   has no editor or JCE surface to match.

   Icons inherit currentColor, which is what lets the row sit on an inverted
   band without a second set of assets.

   Added: v234, 2026-08-23
   =========================================================================== */

.sbx-follow {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         var(--sbx-space-sm) var(--sbx-space-md);
  margin:      var(--sbx-space-md) 0;
}

/* Mirrors h5.share-title so a page carrying both labels them the same way. */
.sbx-follow-heading {
  font-size:      var(--sbx-font-size-sm);
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--sbx-text-muted);
}

.sbx-follow-list {
  list-style: none;
  margin:     0;
  padding:    0;
  display:    flex;
  flex-wrap:  wrap;
  gap:        var(--sbx-space-sm);
}

/* Three bullet mechanisms are in play, as already recorded for the suggestion
   menus at :16360 and in bands.css: templates/system/css paints
   bullet-default.png as a BACKGROUND behind every li, so list-style and
   ::marker both appear to do nothing. The background and the 30px of padding
   reserved for it have to go too, or every icon sits indented behind an
   invisible dot. */
.sbx-follow-item {
  margin:           0;
  padding:          0;
  list-style:       none;
  background-image: none;
}

.sbx-follow-link {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           44px;
  height:          44px;
  border-radius:   50%;
  background:      var(--sbx-primary);
  color:           var(--sbx-text-on-primary) !important;
  text-decoration: none !important;
  transition:      background var(--sbx-transition),
                   box-shadow var(--sbx-transition);
}

.sbx-follow-link:hover { background: var(--sbx-primary-dark); }
.sbx-follow-link:focus { outline: none; box-shadow: var(--sbx-shadow-focus); }

.sbx-follow-icon {
  width:   20px;
  height:  20px;
  display: block;
}

/* On an inverted band the filled circle would be primary-on-primary-dark, which
   is nearly invisible. The circle drops out and the glyph takes the surface's
   own paired foreground — the same move .sbxbtn-secondary makes, and for the
   same reason. */
.sbxsurf-dark  .sbx-follow-link,
.sbxsurf-image .sbx-follow-link {
  background: rgba(255, 255, 255, 0.14);
  color:      var(--sbx-text-on-primary) !important;
}
.sbxsurf-dark  .sbx-follow-link:hover,
.sbxsurf-image .sbx-follow-link:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* The accessible name for each link. There was no visually-hidden utility in
   this template before now; this is the standard clip-rect pattern rather than
   display:none or a zero size, both of which remove the text from the
   accessibility tree along with the screen. */
.sbx-visually-hidden {
  position:  absolute;
  width:     1px;
  height:    1px;
  margin:    -1px;
  padding:   0;
  overflow:  hidden;
  clip:      rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border:    0;
}

@media (prefers-reduced-motion: reduce) {
  .sbx-follow-link { transition: none; }
}


/* ===========================================================================
   PHASE 47 — PAYMENT TRUST LINE (.sbx-trust-line)
   ===========================================================================
   Inserted by sbxTrustLine() beneath any .payable-form-btn — the class
   Donations, Events and Shop already put on the button that submits a payment.

   Quiet by design. This is reassurance at the moment of commitment, not a
   feature: it sits below the button, in muted body text, and must never compete
   with the button it follows.
   =========================================================================== */

.sbx-trust-line {
  display:        flex;
  flex-wrap:      wrap;
  align-items:    baseline;
  gap:            0 var(--sbx-space-xs);
  margin:         var(--sbx-space-sm) 0 0;
  font-size:      var(--sbx-font-size-sm);
  line-height:    1.5;
  color:          var(--sbx-text-muted);
}

/* The lock is decoration — the sentence carries the meaning on its own, which
   is why it is aria-hidden and why nothing here depends on emoji rendering. */
.sbx-trust-lock {
  flex:       0 0 auto;
  display:    inline-flex;
  align-self: center;
  opacity:    0.75;
}

/* align-self, not vertical-align: the lock is a flex item, so vertical-align
   does not apply to it. The line aligns on the baseline, which would hang a
   square glyph too low. */
.sbx-trust-lock svg { display: block; }

/* THE EIN IS NOT REPEATED HERE. It sat after the security sentence, joined by
   a middot, which put a separator immediately after a full stop and read as a
   typo. Repunctuating it was the wrong fix: neither reference template carries
   an EIN under the button at all. The Humane League states it in the footer as
   a sentence; Easter Seals SoCal names only its 501(c)(3) status there. Both
   keep security at the button and tax identity in the footer, and our footer
   already prints the EIN, so this was a duplicate as well as an awkward join.
   The security sentence stays: unlike either reference our form is on-page
   rather than handed to a third-party host, so there is something here to
   reassure anyone about. */

/* On an inverted band or a dark surface the muted grey drops out. Same
   pre-paired approach the surfaces already use. */
.sbxsurf-dark  .sbx-trust-line,
.sbxsurf-image .sbx-trust-line,
.sbxsurf-brand .sbx-trust-line {
  color: var(--sbx-text-on-primary);
  opacity: 0.85;
}

@media (max-width: 600px) {
  .sbx-trust-line { font-size: var(--sbx-font-size-xs, 0.8125rem); }
}


/* ===========================================================================
   PHASE 48 — SITE LINK IN THE NAVIGATION SLOT (.sbx-brandbar-link)
   ===========================================================================
   A link back to the organization's main site, rendered inside #portalmenu.

   IT WAS ITS OWN ROW FIRST, AND THAT WAS WRONG. A full-width bar above the
   header read as an extra band of chrome — the opposite of the reference
   templates, whose headers are a logo and one link precisely because those
   pages carry no navigation at all. The link is not a new piece of furniture;
   it is what sits where a menu would be when a page does not need one.

   So it lives in the nav slot as an ALTERNATIVE to a menu. An admin wanting
   that look unpublishes the navigation module and switches this on. Publishing
   both is allowed and simply puts the link first — it is their header.

   It inherits #portalmenu's flex row and gap rather than declaring its own, so
   it sits with the account controls instead of beside them. It is emitted AFTER
   the nav modules, so it reads last in the row — the account controls are what
   a visitor acts on; this is where they leave to.

   Set in the action color at xs, not body text at sm: it is the one outbound
   link in a header of inbound controls, and the reference templates mark it as
   secondary by size while coloring it as a link.
   =========================================================================== */

#portalmenu .sbx-brandbar-link {
  display:         inline-flex;
  align-items:     center;
  gap:             var(--sbx-space-xs);
  color:           var(--sbx-primary);
  text-decoration: none;
  font-size:       var(--sbx-font-size-xs);
  font-weight:     600;
  letter-spacing:  0.01em;
  white-space:     nowrap;
  transition:      color var(--sbx-transition);
}

/* Base is already the action color, so hover darkens rather than colors. */
#portalmenu .sbx-brandbar-link:hover { color: var(--sbx-primary-dark); }

#portalmenu .sbx-brandbar-link:focus-visible {
  outline:        2px solid var(--sbx-primary);
  outline-offset: 2px;
  border-radius:  2px;
}

/* The arrow moves, not the whole link, so the text stays where the eye put it.
   A nudge — this is a wayfinding link, not a call to action. */
.sbx-brandbar-arrow { transition: transform var(--sbx-transition); }
#portalmenu .sbx-brandbar-link:hover .sbx-brandbar-arrow { transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
  #portalmenu .sbx-brandbar-link,
  .sbx-brandbar-arrow { transition: none; }
  #portalmenu .sbx-brandbar-link:hover .sbx-brandbar-arrow { transform: none; }
}

/* HIDDEN BELOW 600px, NOT SHRUNK TO THE ARROW.
   Stripping the label and keeping the arrow was tried first: it renders a bare
   glyph butted against the logo with no gap, which reads as part of the wordmark
   and communicates nothing — an arrow is not a recognized icon for "our main
   site" the way a house is for home. At this width the header is already made to
   shrink and clip the logo so the account controls keep their place, and adding
   an ambiguous mark to that is worse than adding nothing. The site is still one
   tap away in the footer. */
@media (max-width: 600px) {
  #portalmenu .sbx-brandbar-link { display: none; }
}

/* ===========================================================================
   PHASE 49 — EMPLOYER MATCH (Double the Donation / 360MatchPro)
   ===========================================================================
   "Does your employer match?" is a vendor widget, not our markup. The plugin
   injects its own DOM and loads its own stylesheet from doublethedonation.com —
   831 rules, all ID-prefixed, so the lowest thing we have to beat is (1,1,0)
   and several are higher. This is the only place in this template where we are
   restyling a third party's component rather than an app's output.

   WHAT THE WIDGET IS. #dd-company-name-input wraps a .dtd-search-box holding
   #dd-input, a role="combobox" whose aria-controls points at #dtd-select-menu.
   That is the same shape as the address and picklist type-aheads Phase 43
   already treats, so it takes the same treatment rather than a third one —
   an admin should not be able to tell which suggestion menu is whose.

   NEUTRALIZE, THEN RESTATE. The vendor gives .dtd-search-box a 2px radius, a
   pale blue border and a Material double shadow, none of which belong to this
   template. The container is flattened and the styling moves to the input, so
   the field reads as one of ours rather than as ours-with-a-box-around-it.

   EVERY SELECTOR IS PREFIXED `html`, AND !important IS NOT ENOUGH ON ITS OWN.
   The vendor uses !important too, and their stylesheet is injected by their own
   script — so it lands after ours, importance ties, and source order hands them
   the win. Measured: with matching selectors and matching !important, their
   min-height:35px and their dark dropdown highlight both survived. The `html`
   prefix takes the contest back to specificity, where (1,1,1) beats their
   (1,1,0) regardless of who loaded last.

   !important is used, and only here. Every declaration below is contesting a
   stylesheet we do not control and cannot version — a specificity war we would
   lose the next time the vendor ships. This is the documented exception, the
   same call .item-list > a makes against the global link rule.
   =========================================================================== */

/* ── The container: flattened, so the input can be the field ─────────────── */
html #dd-company-name-input .dtd-search-box,
html #dd-container .dtd-search-box,
html .dtd-plugin .dtd-search-box,
html .dtd-streamlined-plugin .dtd-search-box{
  background:    transparent !important;
  border:        none !important;
  border-radius: 0 !important;
  box-shadow:    none !important;
  min-height:    0 !important;
}

/* ── The input: one of our fields ────────────────────────────────────────── */
html #dd-company-name-input #dd-input,
html #dd-container #dd-input,
html .dtd-plugin #dd-input{
  width:         100% !important;
  height:        var(--sbx-input-height) !important;
  padding:       var(--sbx-input-padding) !important;
  font-family:   var(--sbx-font-body) !important;
  font-size:     var(--sbx-font-size-input) !important;
  color:         var(--sbx-text-body) !important;
  background:    var(--sbx-surface) !important;
  border:        1px solid var(--sbx-border-color) !important;
  border-radius: var(--sbx-radius-input) !important;
  box-shadow:    none !important;
  box-sizing:    border-box !important;
}

html #dd-company-name-input #dd-input:hover,
html #dd-container #dd-input:hover{ border-color: var(--sbx-border-strong) !important; }

/* The shared focus ring, so this field announces focus the way every other
   field on the page does. */
html #dd-company-name-input #dd-input:focus,
html #dd-container #dd-input:focus{
  outline:      none !important;
  border-color: var(--sbx-primary) !important;
  box-shadow:   var(--sbx-shadow-focus) !important;
}

/* ── The dropdown: the Phase 43 suggestion menu ──────────────────────────── */
html #dtd-select-menu,
html #dd-company-name-input #dtd-select-menu,
html .dtd-plugin #dtd-select-menu{
  background:    var(--sbx-surface) !important;
  border:        1px solid var(--sbx-border-color) !important;
  border-radius: var(--sbx-radius-input) !important;
  box-shadow:    var(--sbx-shadow-card-hover) !important;
  padding:       4px !important;
  margin:        4px 0 0 !important;
  font-family:   var(--sbx-font-body) !important;
  font-size:     var(--sbx-font-size-base) !important;
  color:         var(--sbx-text-body) !important;
  /* Same six-row cap as the address menu, and for the same reason: ten results
     at ~44px lands the menu on top of the fields beneath it. */
  max-height:    var(--sbx-suggest-max-height, 17.5rem) !important;
  overflow-y:    auto !important;
}

html #dtd-select-menu li,
html #dtd-select-menu .dtd-dropdown-item{
  padding:       0.5rem 0.75rem !important;
  border:        none !important;
  border-radius: var(--sbx-radius-sm) !important;
  line-height:   1.35 !important;
  color:         var(--sbx-text-body) !important;
  background:    transparent !important;
  cursor:        pointer !important;
}

/* The vendor's own selected class, given our highlight rather than its blue. */
html #dtd-select-menu li:hover,
html #dd-container .dtd-dropdown-is-selected,
html .dtd-plugin .dtd-dropdown-is-selected,
html #dd-company-name-input .dtd-dropdown-is-selected,
html .dtd-streamlined-plugin .dtd-dropdown-is-selected{
  background:  var(--sbx-primary-pale) !important;
  color:       var(--sbx-text-body) !important;
  font-weight: inherit !important;
}

/* The vendor marks the matched substring with `background-color:#46474c;
   color:#fff !important` — a dark chip mid-word, which on our pale highlight
   reads as a redaction rather than as a match. Their rule covers b, span AND
   em, so all three are reset. Emphasis is kept as weight, which is what a
   matched substring should carry; the chip is not. */
html #dd-container .dtd-dropdown-is-selected b,
html #dd-container .dtd-dropdown-is-selected span,
html #dd-container .dtd-dropdown-is-selected em,
html .dtd-plugin .dtd-dropdown-is-selected b,
html .dtd-plugin .dtd-dropdown-is-selected span,
html .dtd-plugin .dtd-dropdown-is-selected em,
html .dtd-streamlined-plugin .dtd-dropdown-is-selected b,
html .dtd-streamlined-plugin .dtd-dropdown-is-selected span,
html .dtd-streamlined-plugin .dtd-dropdown-is-selected em,
html #dd-company-name-input .dtd-dropdown-is-selected b,
html #dd-company-name-input .dtd-dropdown-is-selected span,
html #dd-company-name-input .dtd-dropdown-is-selected em {
  background-color: transparent !important;
  color:            inherit !important;
  font-weight:      700 !important;
}

/* ── Attribution ─────────────────────────────────────────────────────────── */
/* The vendor's link stays — it is their attribution and removing it is not
   ours to do — but it reads as fine print rather than as a page link. */
html .streamlined-powered-by-link,
html #dd-company-name-input .streamlined-powered-by-link{
  font-size:       var(--sbx-font-size-xs, 0.8125rem) !important;
  color:           var(--sbx-text-muted) !important;
  text-decoration: none !important;
}

/* ── Inverted surfaces ───────────────────────────────────────────────────── */
/* The widget can sit inside a band. The field keeps its own light ground so it
   stays a field; only the surrounding text re-pairs. */
html .sbxsurf-dark  .streamlined-powered-by-link,
html .sbxsurf-image .streamlined-powered-by-link,
html .sbxsurf-brand .streamlined-powered-by-link{
  color: var(--sbx-text-on-primary) !important;
  opacity: 0.8;
}

/* ===========================================================================
   PHASE 50 — PAYMENT METHOD TILES: REFERENCE GEOMETRY + SELECTED CHECKMARK
   ===========================================================================
   Measured against the reference template's live donation page rather than
   guessed. Its tile is 69x52 where ours was 94x68, and the difference is not
   uniform shrinkage: its BORDER IS THICKER and its CORNERS ROUNDER than ours.
   Only the logo and the horizontal padding come down. The result is a smaller
   tile that is more strongly drawn, not a scaled-down copy.

     reference          ours (before)
     logo    45x30      60x40
     padding 9px 10px   8px 16px
     border  2px        1.5px
     radius  12px       6px

   THE LOGO SIZE IS A CSS DECISION, NOT A MARKUP ONE. The apps emit
   width="60px" height="40px" as HTML attributes from Sbx/View/Helper.php and
   the per-app view files — shared code behind every template, which is why the
   reference overrides in CSS too rather than editing it. Any CSS length beats
   a presentational attribute, so nothing in the apps has to change.

   display:block on the logo removes the inline descender space beneath it,
   which was carrying roughly 10px of our extra height for nothing.

   All four checkout surfaces are listed together. They were already four
   near-identical copies of the same rules; adding the checkmark to only the two
   I happened to be looking at would have started a drift between them.

   The colors stay tokenized. The reference hardcodes its own orange; ours has
   to hold for every brand variant, so this reads --sbx-primary throughout.
   =========================================================================== */

@supports selector(:has(*)) {

  .donations .sbxPayType .span-block,
  .com_sbxEvents .sbxPayType .span-block,
  .sbxEvents-cart .sbxPayType .span-block,
  form.form-store .sbxPayType .span-block {
    padding:       9px 10px !important;   /* beats the base rules' own !important */
    border-width:  2px;
    border-radius: 12px;
  }

  .donations .sbxPayType .span-block img,
  .com_sbxEvents .sbxPayType .span-block img,
  .sbxEvents-cart .sbxPayType .span-block img,
  form.form-store .sbxPayType .span-block img {
    display: block;
    width:   45px;
    height:  30px;
  }

  /* A stronger ring than we had. The reference draws 3px at 0.35 where we drew
     2px at 0.15, and beside a 2px border the lighter ring simply did not read. */
  .donations .sbxPayType .span-block:has(input:checked),
  .com_sbxEvents .sbxPayType .span-block:has(input:checked),
  .sbxEvents-cart .sbxPayType .span-block:has(input:checked),
  form.form-store .sbxPayType .span-block:has(input:checked) {
    box-shadow: 0 0 0 3px rgba(var(--sbx-primary-rgb), 0.35);
  }

  /* SELECTED-STATE CHECKMARK.
     Border, tint and ring already say "selected" — but all three are the same
     signal, color, and a donor scanning near-identical card logos reads a shape
     faster than a hue. The check is also the only one of the four that survives
     a color-blind reader or a printed page.

     The reference puts this on .span-block::after at 20x20, offset -7/-4, and
     uses content:"✓". We match the geometry and keep an SVG: U+2713 renders at
     a different weight in every font stack this template can inherit, and U+2705
     carries an emoji presentation — the mistake the trust-line lock made once.

     Decorative by construction: empty content, no accessible name, no pointer
     events. The radio's checked state carries the meaning. */
  .donations .sbxPayType .span-block:has(input:checked)::after,
  .com_sbxEvents .sbxPayType .span-block:has(input:checked)::after,
  .sbxEvents-cart .sbxPayType .span-block:has(input:checked)::after,
  form.form-store .sbxPayType .span-block:has(input:checked)::after {
    content:             '';
    position:            absolute;
    top:                 -7px;
    right:               -4px;
    width:               20px;
    height:              20px;
    border-radius:       50%;
    background-color:    var(--sbx-primary);
    background-image:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.9' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:   no-repeat;
    background-position: center;
    background-size:     13px 13px;
    box-shadow:          0 0 0 2px var(--sbx-surface, #fff);
    pointer-events:      none;
  }
}

/* ===========================================================================
   MY EVENT ORDERS — HAND-OFF TO THE COMPONENT STYLESHEET (familyreach_modern)
   com_events/assets/css/my-event-orders.css (Guest Details release, 2026-10-02)
   styles these pages under any template and takes its colors from --sbx-eo-*.
   This block points those at this template's tokens, so the brand reaches them.
   It also settles one collision with Phase 16 above: Phase 16 forces View's
   text white with !important, while the component stylesheet's more specific
   rule gives View a white background, leaving white text on white.
   =========================================================================== */
:root {
  --sbx-eo-accent:      var(--sbx-primary);
  --sbx-eo-accent-ink:  var(--sbx-text-on-primary);
  --sbx-eo-accent-soft: var(--sbx-primary-pale);
  --sbx-eo-ink:         var(--sbx-text-heading);
  --sbx-eo-rule:        var(--sbx-border-subtle);
  --sbx-eo-surface:     var(--sbx-surface-alt);
  --sbx-eo-radius:      var(--sbx-radius-btn);
}
.eventsManage a.view-btn {
  color: var(--sbx-eo-accent) !important;
}
.eventsManage a.view-btn:hover {
  color: var(--sbx-eo-accent) !important;
}

/* Empty values show the same em dash the admin Tickets tab uses for a blank
   (sbx-att-dash: "—", #a8a6a3, announced as "blank"), instead of a bare gap.
   The first selector matches my-event-orders.css's `content: none` guard at
   equal specificity; this file loads after it, so this one wins. The second
   declaration adds the spoken alternative where supported; browsers that
   cannot parse it keep the first. Uses ::after because ::before is the
   phone-layout cell label on table cells. Visibility is restated because the
   Events views' inline style hides this pseudo-element (an invisible "*" that
   holds the row height). */
.eventsManage dl.definition-list dd:empty::after,
.eventsManage dd:empty::after,
.eventsManage table.resultsTBL tbody td:empty::after {
  content:    "\2014";
  content:    "\2014" / "blank";
  color:      #a8a6a3;
  visibility: visible;
}

/* When and Where sit on the white page with no card, as on Family Reach's own
   event page: no fill, border or inset, so their text lines up with the page
   title and the ticket table. Same ID selectors as the card rule above; this
   one comes later, so it wins. */
#sectWhen-wrap,
#sectWhere-wrap {
  background:    var(--sbx-surface);
  border:        0;
  border-radius: 0;
  padding:       0;
}
/* The grid is flex (above), so Bootstrap's clearfix ::before/::after became
   empty flex items, each adding a gap at the row's ends. With no card padding
   to hide it, that inset When by 16px from the title and the table. */
#sectWhenWhere-grid::before,
#sectWhenWhere-grid::after {
  display: none;
}

/* Tables are white at rest, as Family Reach's ticket table is. Each selector
   repeats the rule above that gave the header, striped row or table well its
   cream or grey fill. Hover, selected, today and expanded-row highlights keep
   their colors: they show state, not the table's background. */
.com_sbxEvents table.resultsTBL.tickets-tbl thead th,
.com_sbxEvents table.resultsTBL.tickets-tbl tbody tr.row1,
.well.well-table.ticket-info,
.com_sbxEvents .well.well-table,
.eventsManage table.resultsTBL thead th,
table.store-cart thead th,
.sbxEvents-cart .cart-table thead th,
.com_jsfSearch table.resultsTBL thead th,
.donationsManage table.resultsTBL thead th,
.donationsManage th.rec-manage,
.donationsMyPledges table.tblMyPledges thead th,
.donationsMyPledge table thead th,
.sbxEvents-cal table.cal-monthTBL thead th.cal-wdHead,
form.form-store table.shop-table thead th,
.sbxEvents-insLayDefault table.search-result tbody tr:nth-child(even),
#content > .container table.search-result tbody tr:nth-child(even) {
  background: var(--sbx-surface);
}

/* My Order's purchaser controls (Event Guest Details Requests). Phase 16 above
   outranks the Events stylesheet on two points that break this table, so they
   are restated here at Phase 16's own specificity:
   - cells sit at the top of their row, not the middle, so a ticket's name,
     type, status and actions line up with its first field;
   - the Action cell may wrap (Phase 16 keeps the last cell on one line, which
     pushed Copy Link, Save, Invite and Replace guest past the table's edge). */
.eventsManage table.resultsTBL tbody td {
  vertical-align: top;
}
.eventsManage table.resultsTBL thead th:last-child,
.eventsManage table.resultsTBL tbody td:last-child {
  white-space: normal;
}
/* The actions stack, one per line and all the same width, as Phase 16 stacks
   View and Edit. Wider than a phone only: the Events stylesheet lays them out
   for phones itself. */
@media (min-width: 641px) {
  .eventsManage table.resultsTBL tbody td.ticket-action {
    width: 1%;
  }
  .eventsManage table.resultsTBL tbody td.ticket-action > .btn,
  .eventsManage table.resultsTBL tbody td.ticket-action > a,
  .eventsManage table.resultsTBL tbody td.ticket-action > button {
    display:    flex;
    width:      100%;
    min-width:  8.5em;
    margin:     0 0 6px;
    box-sizing: border-box;
    white-space: nowrap;
  }
}
/* A ticket's Details list puts each label above its value. Side by side, the
   value got what was left of the 240px name column after the label, so a
   missing field's note wrapped one word per line. */
.eventsManage dl.host-details-list {
  grid-template-columns: minmax(0, 1fr);
  gap:                   2px 0;
}
.eventsManage dl.host-details-list dt {
  font-size:   var(--sbx-font-size-xs);
  font-weight: 600;
}
.eventsManage dl.host-details-list dd {
  margin:  0 0 6px;
  padding: 0;
}
