/* Windford layer for the shared one-page checkout. Keep Prostore chrome and stock checkout assets independent. */
.sc-checkout, .sc-dialog, .suntc-one-click-row {
  --ink: #1c1b1a;
  --ink-2: #5f574c;
  --line: #e4dbcc;
  --control: #b6a995;
  --surface: #f7f3eb;
  --surface-2: #ede5d7;
  --gold: #1c1b1a;
  --gold-hover: #3b342b;
  --on-gold: #fff;
  --selected-bg: #f7f0e2;
  --focus: #785825;
  --focus-halo: #bd9a5f44;
  --attention: #f8edda;
  --disabled-bg: #ebe6de;
  --disabled-text: #665c50;
  --r-ctl: 8px;
  --r-card: 12px;
  --h-ctl: 48px;
  --h-btn: 54px;
  --windford-brass: #bd9a5f;
  --windford-brass-dark: #785825;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

/* Match the native page title and align the cart with the Windford header on wide screens. */
#sc-checkout {
  width: 100%;
  max-width: 1440px;
  padding-inline: clamp(24px, 5.55vw, 80px);
}
#sc-checkout > #content { margin-bottom: 0; padding-inline: 0; }
body.is-page-header-fixed.is-header-v5 #sc-checkout { margin-top: 120px; }
body.is-page-header-fixed.is-header-v5 #sc-checkout.sc-empty { margin-top: 136px; }
#sc-checkout h1 {
  font-family: "Prosto One", "Open Sans", Arial, sans-serif;
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 400;
  letter-spacing: -.025em;
}
#sc-checkout .sc-name, #sc-checkout .sc-total, #sc-checkout .sc-overview-amount {
  font-variant-numeric: tabular-nums;
}
#sc-checkout ::selection, .sc-dialog ::selection { background: #e8d5b6; color: var(--ink); }
.sc-checkout .sc-panel::before, .sc-checkout .sc-empty-content::before { background: var(--windford-brass); }
.sc-checkout .sc-check a, #suntc-quick-form .suntc-order-check a { text-decoration-color: var(--windford-brass-dark); }

/* The confirmation stays darkest. Brass is reserved for selection, focus and the order summary. */
:is(.sc-checkout, .sc-dialog) .sc-button {
  border-color: var(--control);
  background: #fff;
}
@media (hover: hover) {
  :is(.sc-checkout, .sc-dialog) .sc-button:hover:enabled, :is(.sc-checkout, .sc-dialog) a.sc-button:hover {
    background: var(--surface-2);
    border-color: var(--windford-brass-dark);
    color: var(--ink);
  }
}
:is(.sc-checkout, .sc-dialog) input::placeholder, :is(.sc-checkout, .sc-dialog) textarea::placeholder { color: #6a6153; }
:is(.sc-checkout, .sc-dialog) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { caret-color: var(--windford-brass-dark); }
#sc-checkout :is(.sc-choice, .sc-tabs, .sc-card) input:checked + span,
#sc-checkout #sc-pay-options input:checked + span {
  border-color: var(--windford-brass-dark);
  box-shadow: inset 0 0 0 1px var(--windford-brass-dark);
}
#sc-checkout #sc-pay-options input:checked + span { background: var(--selected-bg); }
/* Windford's legacy checkout makes every radio an in-flow 40px circle with !important.
   These controls use the whole label as a card and provide their own focus/selection. */
#sc-checkout :is(.sc-choice, .sc-tabs, .sc-card, #sc-pay-options) input[type=radio] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
:is(#sc-checkout, .sc-dialog) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea) {
  margin-bottom: 0;
}
#sc-checkout .sc-stepper button:disabled { color: #81786a; }
#sc-checkout .sc-line-price s { color: var(--ink-2); text-decoration-color: var(--windford-brass-dark); }
#sc-checkout .sc-line-price s:not([hidden]) + strong { color: #8f2a1a; }

/* Delivery cards retain their full labels as three choices wrap on medium widths. */
.sc-checkout .sc-card-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; }
.sc-checkout .sc-card b { overflow-wrap: anywhere; }
.sc-checkout .sc-card em { font-size: 15px; }
.sc-checkout .sc-card small { display: block; margin-top: 4px; }
.sc-checkout :is(#sc-manual-city, #sc-address) { max-width: 560px; margin-block: 0 12px; }

/* Prostore gives checkbox inputs fixed positioning/padding and product images a narrow max-width. */
:is(.sc-checkout, .sc-dialog, .suntc-register-consents) input[type=checkbox]:not([role=switch]) {
  position: static; flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; opacity: 1;
}
.sc-checkout input[type=checkbox][role=switch] { position: static; padding: 0; min-height: 0; opacity: 1; }
.suntc-register-consents label { gap: 10px; align-items: flex-start; }
.suntc-register-consents input[type=checkbox] { margin: 1px 0 0; accent-color: #785825; }
.sc-dialog .suntc-quick-product img { width: 64px; height: 64px; max-width: none; object-fit: contain; }
.sc-dialog img[src*="captcha"] { width: auto; max-width: none; height: auto; }

@media (max-width: 840px) {
  #sc-checkout { padding-inline: 16px; }
  #sc-checkout #sc-buyer > .sc-choice label > span { height: 100%; }
  body.is-page-header-fixed.is-header-v5 #sc-checkout { margin-top: 104px; }
  body.is-page-header-fixed.is-header-v5 #sc-checkout.sc-empty { margin-top: 112px; }
  /* Do not place the cookie notice over the checkout action bar. */
  body:has(.sc-checkout) .cookieagry { position: relative; bottom: auto; z-index: auto; padding: 0 16px 16px; }
  /* Windford keeps its native navigation dock. The order bar sits directly above it. */
  body.is-page-sticky #sc-checkout .sc-mobile { bottom: 89px; }
  body:has(.sc-checkout) .scroll-to-top { display: none; }
}
@media (max-width: 567px) {
  body.is-page-sticky #sc-checkout .sc-mobile { bottom: 65px; }
  body.is-page-header-fixed.is-header-v5 #sc-checkout { margin-top: 74px; }
  body.is-page-header-fixed.is-header-v5 #sc-checkout.sc-empty { margin-top: 82px; }
}

.sc-checkout .sc-policy-link, .sc-dialog .sc-policy-link, .suntc-register-consents .sc-policy-link {
  color: #5f574c;
  margin-block: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.sc-checkout .sc-policy-link a, .sc-dialog .sc-policy-link a, .suntc-register-consents .sc-policy-link a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #785825;
  text-underline-offset: 3px;
}
