/* view_cart fallback (s98): River button chrome made Checkout dark-on-dark (Gotchas #146, #220) */
body.civicrm-event-view_cart #crm-container#crm-container a.button.crm-check-out-button {
    display: inline-flex; align-items: center; gap: 8px; height: auto; padding: 14px 32px;
    border: 0; border-radius: 0; box-shadow: none; opacity: 1;
    background: #1A1A1A; color: #F5F0E6; text-decoration: none;
    font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase;
}
body.civicrm-event-view_cart #crm-container#crm-container a.button.crm-check-out-button i { color: inherit; }
body.civicrm-event-view_cart #crm-container#crm-container a.button.crm-check-out-button:hover,
body.civicrm-event-view_cart #crm-container#crm-container a.button.crm-check-out-button:focus-visible { background: #C9952A; color: #1A1A1A; }
/* Event Info v6 (s99): mobile spec-sheet rows for When / Where / Contact */
@media (max-width: 767px) {
  body.civicrm-event-info #crm-container .tbw-ev-register dl.tbw-ev-details { grid-template-columns: 1fr; gap: 0; }
  body.civicrm-event-info #crm-container .tbw-ev-register .tbw-ev-detail { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid rgba(245, 240, 230, 0.14); }
  body.civicrm-event-info #crm-container .tbw-ev-register .tbw-ev-detail:first-child { padding-top: 0; border-top: 0; }
  body.civicrm-event-info #crm-container .tbw-ev-register .tbw-ev-detail:last-child { padding-bottom: 0; }
  body.civicrm-event-info #crm-container .tbw-ev-register dt.tbw-ev-detail-k { margin: 0; font-size: 0.75rem; }
  body.civicrm-event-info #crm-container .tbw-ev-register dd.tbw-ev-detail-v { gap: 2px; font-size: 1rem; line-height: 1.4em; min-width: 0; overflow-wrap: anywhere; }
  body.civicrm-event-info #crm-container .tbw-ev-register a.tbw-ev-detail-mail,
  body.civicrm-event-info #crm-container .tbw-ev-register a.tbw-ev-detail-link { text-decoration-thickness: 1px; text-underline-offset: 3px; }
  body.civicrm-event-info #crm-container .tbw-ev-register a.tbw-ev-detail-link { margin-top: 4px; font-size: 0.875rem; }
}
@media (max-width: 380px) {
  body.civicrm-event-info #crm-container .tbw-ev-register .tbw-ev-detail { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
}
/* Event Info v6.1 (s99): Home + See more events buttons (snippet 10633) */
body.civicrm-event #crm-container .tbw-crm-home { display: flex; flex-wrap: wrap; gap: 12px; }
body.civicrm-event #crm-container .tbw-crm-home a.tbw-crm-events { background: #1A1A1A; color: #F5F0E6; }
body.civicrm-event #crm-container .tbw-crm-home a.tbw-crm-events:hover,
body.civicrm-event #crm-container .tbw-crm-home a.tbw-crm-events:focus-visible { background: #C9952A; border-color: #C9952A; color: #1A1A1A; }

/* Payment toggle: selected state + hover (s102, Connor note). Ring-and-dot marks the selected option; only unselected options react to hover. */
body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair label { display: inline-flex; align-items: center; }
body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair label::before { content: ""; flex: none; width: 16px; height: 16px; margin-right: 12px; box-sizing: border-box; border: 2px solid currentColor; border-radius: 50%; background: transparent; }
body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair label img.emoji { margin: 0 8px 0 0 !important; }
body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair:not(:has(input:checked)) label:hover { box-shadow: inset 0 -4px 0 rgba(201,149,42,0.55); }
body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair:has(input:checked) label { box-shadow: inset 0 -4px 0 #C9952A; cursor: default; }
body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair:has(input:checked) label::before { border-color: #C9952A; background: radial-gradient(circle, #C9952A 0 3px, transparent 3.5px); }
@media (prefers-reduced-motion: no-preference) {
  body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair label { transition: background-color 0.15s, color 0.15s, box-shadow 0.15s; }
}
@media (prefers-reduced-motion: reduce) {
  body.civicrm-contribute #crm-container .payment_processor-section .crm-option-label-pair label { transition: none; }
}
/* Page 4 storage rows v3.2 (s103): pitch (help_pre) first, then box + name + price, post-help below on narrow and in a right column on wide. Label is display:contents so its spans join the row grid; no DOM moves (#137). */
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; grid-template-areas: "pre pre pre" "box name price" "post post post";
  column-gap: 16px; row-gap: 8px; align-items: baseline;
}
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > input { grid-area: box; align-self: center; margin: 0; }
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > label { display: contents; }
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > label > .crm-price-amount-help-pre { grid-area: pre; margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.35; color: #1A1A1A; }
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > label > .crm-price-amount-label { grid-area: name; font-size: 1rem; color: #6E655B; }
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > label > .crm-price-amount-amount { grid-area: price; color: #6E655B; }
body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > label > .crm-price-amount-help-post { grid-area: post; margin: 0; line-height: 1.45; }
@container tbwcrm (min-width: 56rem) {
  body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content {
    grid-template-columns: 18px minmax(0, 1fr) auto minmax(14rem, 0.8fr); grid-template-areas: "pre pre pre post" "box name price post"; column-gap: 16px;
  }
  body.civicrm-contribute #crm-container#crm-container :is(.reserved_space-content, .personal_storage-content) .price-set-row > .price-set-option-content > label > .crm-price-amount-help-post { align-self: start; padding-left: 24px; border-left: 1px solid rgba(110, 101, 91, 0.35); }
}

/* Page 4 "Welcome / Not you?" message (s103): step 1 only. Two-ID specificity beats River's !important display (#146, #143). */
#crm-container#crm-container .tbw-steps[data-tbw-cur="1"] > .crm-not-you-message { display: block !important; }
#crm-container#crm-container .tbw-steps:not([data-tbw-cur="1"]) > .crm-not-you-message { display: none !important; }

/* ---- Role variables: primary ---- */
:is(
  body.civicrm-event #crm-container a.button.crm-register-button:not(.is-in-cart),
  :is(body.civicrm-event-register,body.civicrm-contribute,body.civicrm-event-cart_checkout,body.civicrm-mailing-unsubscribe,body.civicrm-mailing-optout,body.civicrm-mailing-resubscribe) #crm-container#crm-container .crm-submit-buttons .crm-button:not(.crm-button-type-back,.crm-button-type-cancel),
  body.civicrm-contribute #crm-container .tbw-steps-nav .tbw-step-btn.tbw-next,
  body.civicrm-contribute #crm-container .tbw-premiums .premium-full-disabled button,
  #crm-container .crm-fatal .crm-return-to-home a.btn
) { --tbw-btn-fg:#1A1A1A; --tbw-btn-bg:#C9952A; --tbw-btn-border:#C9952A; --tbw-btn-hover-fg:#1A1A1A; --tbw-btn-hover-bg:#B8861F; --tbw-btn-active-bg:#A87A1F; }

/* Primary buttons that never had a border keep none (Next and Contribute $100 Instead keep their 2px so their box does not change). */
:is(
  body.civicrm-event #crm-container a.button.crm-register-button:not(.is-in-cart),
  :is(body.civicrm-event-register,body.civicrm-contribute,body.civicrm-event-cart_checkout,body.civicrm-mailing-unsubscribe,body.civicrm-mailing-optout,body.civicrm-mailing-resubscribe) #crm-container#crm-container .crm-submit-buttons .crm-button:not(.crm-button-type-back,.crm-button-type-cancel),
  #crm-container .crm-fatal .crm-return-to-home a.btn
) { border-width:0 !important; }

/* ---- Role variables: outline on light ---- */
:is(
  :is(body.civicrm-event-register,body.civicrm-contribute,body.civicrm-event-cart_checkout,body.civicrm-mailing-unsubscribe,body.civicrm-mailing-optout,body.civicrm-mailing-resubscribe) #crm-container#crm-container .crm-submit-buttons .crm-button:is(.crm-button-type-back,.crm-button-type-cancel),
  body.civicrm-contribute #crm-container .tbw-step-btn.tbw-back,
  body.civicrm-event-info #crm-container .crm-actionlinks-bottom a.button.crm-register-button.is-in-cart,
  body.civicrm-event #crm-container a.button.crm-shoppingcart-button,
  :is(body.civicrm-event,body.civicrm-contribute) #crm-container .crm-socialnetwork button.btn.btn-default.crm-button
) { --tbw-btn-fg:#1A1A1A; --tbw-btn-bg:transparent; --tbw-btn-border:#6E655B; --tbw-btn-hover-fg:#F5F0E6; --tbw-btn-hover-bg:#1A1A1A; --tbw-btn-active-bg:#302922; border-width:2px !important; border-style:solid !important; }

/* ---- Role variables: filled on dark (in-cart button inside the dark register card) ---- */
body.civicrm-event-info #crm-container#crm-container .tbw-ev-register .crm-actionlinks-bottom a.button.crm-register-button.is-in-cart { --tbw-btn-fg:#1A1A1A; --tbw-btn-bg:#F5F0E6; --tbw-btn-border:#F5F0E6; --tbw-btn-hover-fg:#1A1A1A; --tbw-btn-hover-bg:#BDB6A7; --tbw-btn-active-bg:#BDB6A7; }

/* ---- Return home: unstyled default on CiviCRM error pages, so it gets the full contract geometry ---- */
#crm-container .crm-fatal .crm-return-to-home a.btn { display:inline-block; padding:8px 32px !important; border-radius:0 !important; font-family:"Barlow Condensed",sans-serif !important; font-size:clamp(1rem,0.875rem + 0.5vw,1.125rem) !important; font-weight:700 !important; line-height:1.5em !important; letter-spacing:normal !important; text-transform:uppercase; text-decoration:none !important; }

/* ---- Shared states for every mapped button ---- */
:is(
  body.civicrm-event #crm-container a.button.crm-register-button:not(.is-in-cart),
  :is(body.civicrm-event-register,body.civicrm-contribute,body.civicrm-event-cart_checkout,body.civicrm-mailing-unsubscribe,body.civicrm-mailing-optout,body.civicrm-mailing-resubscribe) #crm-container#crm-container .crm-submit-buttons .crm-button:not(.crm-button-type-back,.crm-button-type-cancel),
  body.civicrm-contribute #crm-container .tbw-steps-nav .tbw-step-btn.tbw-next,
  body.civicrm-contribute #crm-container .tbw-premiums .premium-full-disabled button,
  #crm-container .crm-fatal .crm-return-to-home a.btn,
  :is(body.civicrm-event-register,body.civicrm-contribute,body.civicrm-event-cart_checkout,body.civicrm-mailing-unsubscribe,body.civicrm-mailing-optout,body.civicrm-mailing-resubscribe) #crm-container#crm-container .crm-submit-buttons .crm-button:is(.crm-button-type-back,.crm-button-type-cancel),
  body.civicrm-contribute #crm-container .tbw-step-btn.tbw-back,
  body.civicrm-event-info #crm-container .crm-actionlinks-bottom a.button.crm-register-button.is-in-cart,
  body.civicrm-event #crm-container a.button.crm-shoppingcart-button,
  :is(body.civicrm-event,body.civicrm-contribute) #crm-container .crm-socialnetwork button.btn.btn-default.crm-button
) {
  text-shadow:none !important; background-image:none !important; transform:none !important;
  transition:background-color 150ms ease,color 150ms ease,border-color 150ms ease !important;
  color:var(--tbw-btn-fg) !important; background-color:var(--tbw-btn-bg) !important; border-color:var(--tbw-btn-border) !important;
  &:not(:focus-visible) { box-shadow:none !important; }
  &:focus-visible { box-shadow:0 0 0 4px #fff !important; outline:2px solid #000 !important; outline-offset:2px !important; }
  @media (hover:hover) { &:hover { color:var(--tbw-btn-hover-fg) !important; background-color:var(--tbw-btn-hover-bg) !important; border-color:var(--tbw-btn-hover-bg) !important; } }
  &:active { color:var(--tbw-btn-hover-fg) !important; background-color:var(--tbw-btn-active-bg) !important; border-color:var(--tbw-btn-active-bg) !important; }
  &[aria-busy="true"] { color:var(--tbw-btn-fg) !important; background-color:var(--tbw-btn-bg) !important; border-color:var(--tbw-btn-border) !important; cursor:progress; }
  &:is(:disabled,[aria-disabled="true"]):not([aria-busy="true"]) { color:#6E655B !important; background-color:#D1D1D1 !important; border-color:#D1D1D1 !important; opacity:1 !important; cursor:not-allowed; }
  @media (prefers-reduced-motion:reduce) { transition-duration:0s !important; }
  @media (forced-colors:active) { &:focus-visible { outline:2px solid Highlight !important; box-shadow:none !important; } }
}

/* Desktop populated event cart: align action baselines and use available width. */
@media (min-width:768px) {
body.civicrm-event-info #crm-container .tbw-ev-register .crm-actionlinks-bottom:has(.tbw-ev-cartbar.is-active) { align-items:flex-end; }
body.civicrm-event-info #crm-container .tbw-ev-register .crm-actionlinks-bottom:has(.tbw-ev-cartbar.is-active) .register_link-bottom { padding-block:0; flex:none; }
body.civicrm-event-info #crm-container .tbw-ev-register .tbw-ev-cartbar.is-active { flex:1; min-width:0; }
}

/* Desktop populated event card: price/actions | cart | calendar links. */
@media (min-width:1024px) {
 body.civicrm-event-info #crm-container .tbw-ev-register-body:has(.tbw-ev-cartbar.is-active) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1.15fr); grid-template-rows:auto auto; column-gap:32px; row-gap:24px; align-items:stretch; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body:has(.tbw-ev-cartbar.is-active) .tbw-ev-register-main,
 body.civicrm-event-info #crm-container .tbw-ev-register-body:has(.tbw-ev-cartbar.is-active) .crm-actionlinks-bottom { display:contents; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body:has(.tbw-ev-cartbar.is-active) .tbw-ev-price { grid-column:1; grid-row:1; margin:0; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body:has(.tbw-ev-cartbar.is-active) .register_link-bottom { grid-column:1; grid-row:2; padding:0; align-self:end; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body .tbw-ev-cartbar.is-active { grid-column:2; grid-row:1 / 3; border-left:1px solid #6E655B; padding-left:32px; min-width:0; width:auto; margin:0; gap:24px; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body .tbw-ev-cartbar.is-active .tbw-ev-cartbar-items { width:100%; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body .tbw-ev-cartbar.is-active .tbw-ev-cartbar-link { align-self:flex-end; margin-top:auto; }
 body.civicrm-event-info #crm-container .tbw-ev-register-body:has(.tbw-ev-cartbar.is-active) .tbw-ev-register-side { grid-column:3; grid-row:1 / 3; border-left:1px solid #6E655B; padding-left:32px; min-width:0; }
}


/* ═══ Event registration: Confirm step order (s107) ═══
   what (event) → who (participant) → how much (fees) → verify + Register.
   Scoped to the Confirm form block only; classic page, no #bootstrap-theme (#79). */
body.civicrm-event-register #crm-container .crm-event-confirm-form-block {
    display: flex;
    flex-direction: column;
}
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > * { order: 50; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_info-group { order: 10; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .participant_info-group { order: 20; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_fees-group { order: 30; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .continue_message-section { order: 40; margin: 8px 0 0; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .crm-submit-buttons:has(#_qf_Confirm_next-top) { display: none; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .crm-submit-buttons { margin: 16px 0 0; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .spacer { display: none; }

/* Event title leads the Event Information group */
body.civicrm-event-register #crm-container .event_info-group .display-block table tr:first-child td strong {
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Fees: line item, then a clear Total row */
body.civicrm-event-register #crm-container .event_fees-group .amount-item-section { margin-bottom: 16px; }
body.civicrm-event-register #crm-container .event_fees-group .total-amount-section {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 2px solid #1A1A1A;
}
body.civicrm-event-register #crm-container .event_fees-group .total-amount-section .content {
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ═══ Event registration: Confirm step, wide layout (s108) ═══
   Supersedes the flex column from s107. Classic page, no #bootstrap-theme (#79).
   12-col grid on .crm-event-confirm-form-block: notice, event strip, participant cards (3-up),
   then fees (7 cols) beside Go Back / Register (5 cols). Every child keeps an explicit order (#80);
   reorder is CSS only, no DOM moves (#137). Width change is scoped to the Confirm step via :has. */
body.civicrm-event-register:has(.crm-event-confirm-form-block) #crm-main-content-wrapper {
    grid-template-columns: 1fr min(72rem, 100%) 1fr;
}
body.civicrm-event-register #crm-container .crm-event-confirm-form-block {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 24px;
    align-items: start;
}
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > * { grid-column: 1 / -1; margin: 0; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .continue_message-section { order: 5; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_confirm_text-section { order: 6; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_confirm_footer-section { order: 60; }
/* Payment details group (only when a processor collects payment on Confirm): after the fees. Same class as Event Information, so told apart by .display-block. */
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_info-group:not(:has(.display-block)) { order: 35; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block:has(> .event_info-group:not(:has(.display-block))) > .crm-submit-buttons { grid-column: 1 / -1; }

/* Event strip */
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_info-group:has(.display-block) {
    box-sizing: border-box;
    padding: 32px;
    background-color: #302922; /* Shop Dark */
    background-image: repeating-linear-gradient(45deg, rgba(245, 240, 230, 0.08) 0, rgba(245, 240, 230, 0.08) 1px, transparent 1px, transparent 8px); /* diagonal-hatch-dark */
    color: #F5F0E6;
}
body.civicrm-event-register #crm-container .event_info-group:has(.display-block) > .header-dark { display: none; }
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout tbody {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 16px;
}
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout tr { display: block; }
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout tr:first-child {
    grid-column: 1 / -1;
    padding-bottom: 16px;
    border-bottom: 2px solid #C9952A;
}
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout td { display: block; width: auto; padding: 0; color: #F5F0E6; }
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout td:first-child:not([colspan]) { width: auto; padding: 0 0 6px; white-space: normal; color: #BDB6A7; }
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout td a { color: #F5F0E6; text-decoration-color: #C9952A; }
body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout tr:first-child td strong {
    font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
    line-height: 1;
    color: #F5F0E6;
}

/* Participant cards */
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .participant_info-group {
    grid-column: span 4;
    box-sizing: border-box;
    height: 100%;
    padding: 20px 24px 24px;
    border: 2px solid #1A1A1A;
    background-color: #F5F0E6;
}
body.civicrm-event-register #crm-container .participant_info-group > .header-dark {
    margin: 0 0 16px;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.15);
    font-family: "JetBrains Mono", monospace;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
    color: #1A1A1A;
}
body.civicrm-event-register #crm-container .participant_info-group .crm-profile-view-title,
body.civicrm-event-register #crm-container .participant_info-group .crm-additional-profile-view-title { display: none; }
body.civicrm-event-register #crm-container .participant_info-group fieldset.label-left .crm-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin: 0 0 14px;
}
body.civicrm-event-register #crm-container .participant_info-group .crm-section .content { overflow-wrap: break-word; }

/* Fees (left) and Go Back / Register (right, aligned to the total band) */
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_fees-group { grid-column: 1 / span 7; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .crm-submit-buttons {
    grid-column: 8 / span 5;
    align-self: end;
    justify-content: flex-end;
}
body.civicrm-event-register #crm-container .event_fees-group .amount-item-section .content {
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.15);
}
body.civicrm-event-register #crm-container .event_fees-group .amount-item-section .clear { display: none; }
body.civicrm-event-register #crm-container .event_fees-group .total-amount-section {
    box-sizing: border-box;
    margin: 16px 0 0;
    padding: 16px 24px;
    border: 0;
    background-color: #302922; /* Shop Dark */
    background-image: repeating-linear-gradient(45deg, rgba(245, 240, 230, 0.08) 0, rgba(245, 240, 230, 0.08) 1px, transparent 1px, transparent 8px);
}
body.civicrm-event-register #crm-container .event_fees-group .total-amount-section .content {
    color: #C9952A;
    font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2rem);
    line-height: 1;
}

@media (max-width: 899px) {
    body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .participant_info-group,
    body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .event_fees-group,
    body.civicrm-event-register #crm-container .crm-event-confirm-form-block > .crm-submit-buttons { grid-column: 1 / -1; }
    body.civicrm-event-register #crm-container .event_info-group .display-block table.form-layout tbody { grid-template-columns: minmax(0, 1fr); }
}

/* s108 follow-up: participant card width by count (1-2 and exactly 4 span 6; 3 and 5+ span 4).
   Sibling combinator counts participant groups regardless of the .spacer divs between them. */
body.civicrm-event-register #crm-container .crm-event-confirm-form-block:not(:has(.participant_info-group ~ .participant_info-group ~ .participant_info-group)) > .participant_info-group { grid-column: span 6; }
body.civicrm-event-register #crm-container .crm-event-confirm-form-block:has(.participant_info-group ~ .participant_info-group ~ .participant_info-group ~ .participant_info-group):not(:has(.participant_info-group ~ .participant_info-group ~ .participant_info-group ~ .participant_info-group ~ .participant_info-group)) > .participant_info-group { grid-column: span 6; }
@media (max-width: 899px) {
    body.civicrm-event-register #crm-container .crm-event-confirm-form-block:not(:has(.x)) > .participant_info-group { grid-column: 1 / -1; }
}

/* fix: the count-based span rules above out-rank the earlier mobile reset, so repeat them in the media query (equal specificity, later wins) */
@media (max-width: 899px) {
    body.civicrm-event-register #crm-container .crm-event-confirm-form-block:not(:has(.participant_info-group ~ .participant_info-group ~ .participant_info-group)) > .participant_info-group,
    body.civicrm-event-register #crm-container .crm-event-confirm-form-block:has(.participant_info-group ~ .participant_info-group ~ .participant_info-group ~ .participant_info-group):not(:has(.participant_info-group ~ .participant_info-group ~ .participant_info-group ~ .participant_info-group ~ .participant_info-group)) > .participant_info-group { grid-column: 1 / -1; }
}