/* ============================================================
   STS Bulk Order Form — Front-End Styles v3
   Design: Light / white — matches safetytrainingseminars.com
   All selectors scoped to .sts-wrap  (zero theme bleed)
   ============================================================ */

/* ── Variables ───────────────────────────────────────────────── */
.sts-wrap {
  /* Brand palette */
  --sts-red:       #c0392b;
  --sts-red-dark:  #a93226;
  --sts-red-soft:  rgba(192,57,43,0.07);
  --sts-red-ring:  rgba(192,57,43,0.18);

  /* Surfaces */
  --bg:       transparent;            /* inherits page background */
  --surface:  #ffffff;
  --surface2: #f8f9fb;
  --surface3: #f1f3f6;

  /* Borders */
  --border:       #e2e8ed;
  --border-focus: #c0392b;

  /* Typography */
  --text:       #1a1f2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  /* State colours */
  --green:      #059669;
  --green-soft: rgba(5,150,105,0.08);
  --green-ring: rgba(5,150,105,0.2);
  --err:        #dc2626;
  --err-soft:   rgba(220,38,38,0.07);
  --err-ring:   rgba(220,38,38,0.2);

  /* Geometry */
  --radius:    12px;
  --radius-sm:  8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-red:0 0 0 3px var(--sts-red-ring);

  /* Fonts */
  --font:      'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Scoped reset ─────────────────────────────────────────────── */
.sts-wrap *, .sts-wrap *::before, .sts-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sts-wrap {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  max-width: 1060px;
  margin: 0 auto;
  /* NOTE: NO overflow:hidden here — it would break position:sticky on sidebar */
}

.sts-wrap input,
.sts-wrap button,
.sts-wrap select,
.sts-wrap textarea {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

.sts-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sts-hidden { display: none !important; }

/* ── Two-column layout ────────────────────────────────────────── */
/* Gap between Order Card (left) and Order Summary Card (right) ← REQ #1 */
.sts-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;          /* ← spacing between the two cards */
  align-items: start;
}

@media (max-width: 820px) {
  .sts-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── Order Card (left) ────────────────────────────────────────── */
.sts-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 36px;
  box-shadow: var(--shadow-sm);
}

/* ── Form header ──────────────────────────────────────────────── */
.sts-form-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.sts-form-header-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--sts-red-soft);
  border: 1px solid rgba(192,57,43,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--sts-red);
}

.sts-form-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sts-form-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 400;
}

.sts-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

/* ── Step labels ──────────────────────────────────────────────── */
.sts-step-block { margin-bottom: 28px; }
.sts-step-block:last-child { margin-bottom: 0; }

.sts-step-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.sts-step-num  { color: var(--sts-red); font-weight: 800; font-size: 11.5px; }
.sts-step-dash { color: var(--text-light); }
.sts-step-text { color: var(--text); font-weight: 700; font-size: 11.5px; }

/* ── Course Cards ─────────────────────────────────────────────── */
.sts-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.sts-course-card {
  position: relative;
  display: flex;                 /* ← flex column so REG aligns with siblings */
  flex-direction: column;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 15px 13px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, background .2s;
  min-height: 130px;             /* baseline height keeps cards even */
}

.sts-course-card:hover {
  border-color: var(--sts-red);
  box-shadow: var(--shadow-sm);
}

.sts-course-card.sts-selected {
  border-color: var(--sts-red);
  background: var(--sts-red-soft);
  box-shadow: var(--shadow-red), var(--shadow-sm);
}

.sts-course-card.sts-selected::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--sts-red);
}

.sts-course-org {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
  white-space: nowrap;           /* ← keep ORG on one line */
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 22px;           /* ← clear the checkmark zone */
}
.sts-course-card.sts-selected .sts-course-org { color: var(--sts-red); }

.sts-course-name {
  font-size: 13.5px; font-weight: 700;
  line-height: 1.35; color: var(--text);
  margin-bottom: 10px; padding-right: 22px;
  flex-grow: 1;                  /* ← consume free space, push REG row down */
}

.sts-course-reg {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;                /* ← never compress the price row */
  margin-top: auto;              /* ← extra insurance: stick to bottom */
}

.sts-reg-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-light);
}

.sts-reg-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.sts-course-card.sts-selected .sts-reg-price { color: var(--sts-red-dark); opacity: 0.55; }

.sts-course-check {
  position: absolute; top: 11px; right: 11px;
  width: 20px; height: 20px;
  background: var(--sts-red); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.5) rotate(-30deg);
  transition: all 0.25s var(--ease);
}
.sts-course-card.sts-selected .sts-course-check {
  opacity: 1; transform: scale(1) rotate(0deg);
}

/* ── Pricing Tiers ────────────────────────────────────────────── */
.sts-tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

@media (max-width: 600px) {
  .sts-tiers { grid-template-columns: repeat(3, 1fr); }
}

.sts-tier {
  position: relative;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px 10px;
  text-align: center;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.sts-tier-active {
  border-color: var(--sts-red);
  background: var(--sts-red-soft);
  box-shadow: var(--shadow-red);
}

.sts-tier-range {
  font-family: var(--font-mono);
  font-size: 9.5px; color: var(--text-muted);
  margin-bottom: 5px; white-space: nowrap; letter-spacing: 0.04em;
  font-weight: 500;
}
.sts-tier-active .sts-tier-range { color: var(--sts-red); font-weight: 700; }

.sts-tier-price {
  font-size: 19px; font-weight: 700;
  color: var(--text); line-height: 1;
  margin-bottom: 4px;
  transition: color .2s;
}
.sts-tier-active .sts-tier-price { color: var(--sts-red-dark); }

.sts-tier-unit { font-size: 9.5px; color: var(--text-muted); font-weight: 500; }

.sts-tier-badge {
  position: absolute; top: 4px; right: 4px;
  font-size: 7px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 5px; border-radius: 3px; line-height: 1.4;
}
.sts-tier-badge--popular {
  background: #f59e0b;
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(245,158,11,0.35);
  font-size: 7.5px;
}
.sts-tier-badge--best {
  background: var(--sts-red); color: #fff;
}

/* ── Quantity ─────────────────────────────────────────────────── */
.sts-qty-control {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-shadow: var(--shadow-sm);
  /* Prevent any theme rule from adding inner padding */
  padding: 0 !important;
}
.sts-qty-control:focus-within {
  border-color: var(--sts-red);
  box-shadow: var(--shadow-red), var(--shadow-sm);
}

/* ── Minus / Plus buttons ──────────────────────────────────────── */
.sts-qty-btn {
  width: 76px;
  flex-shrink: 0;
  background: var(--surface2) !important;
  border: none !important;
  border-right: 1.5px solid var(--border) !important;
  box-shadow: none !important;
  /* Default state must be clearly visible — earlier versions used
     --text-muted (#6b7280) which had insufficient contrast on the light
     button background, making the +/- symbols hard to see until hover. */
  color: var(--text) !important;     /* near-black, high contrast */
  font-size: 32px !important;
  font-weight: 500 !important;        /* heavier weight = more visible glyph */
  line-height: 1;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  /* Reset any theme padding/margin on buttons */
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  /* Defeat theme button styles that might apply text-shadow / opacity */
  text-shadow: none !important;
  opacity: 1 !important;
}
.sts-qty-btn:last-child {
  border-right: none !important;
  border-left: 1.5px solid var(--border) !important;
}
.sts-qty-btn:hover {
  background: var(--sts-red-soft) !important;
  color: var(--sts-red) !important;
}
.sts-qty-btn:active {
  background: rgba(192,57,43,0.13) !important;
  color: var(--sts-red-dark) !important;
}
.sts-qty-btn:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed;
}

/* ── The number input itself ──────────────────────────────────── */
/* Use !important throughout to neutralise aggressive theme resets */
.sts-qty-control .sts-qty-input,
.sts-qty-control input[type="number"] {
  flex: 1;
  width: 0;
  min-width: 0;
  /* Kill ALL browser / theme borders so the outer container is the only frame */
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  /* Visual */
  background: var(--surface) !important;
  text-align: center;
  font-family: var(--font-mono), 'Courier New', monospace;
  font-size: 44px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  line-height: 1;
  height: 86px;
  padding: 0 12px !important;
  margin: 0 !important;
  /* Suppress native number spinners */
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}
.sts-qty-control .sts-qty-input::-webkit-inner-spin-button,
.sts-qty-control .sts-qty-input::-webkit-outer-spin-button,
.sts-qty-control input[type="number"]::-webkit-inner-spin-button,
.sts-qty-control input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  display: none;
}

/* Max seats error state on the control */
.sts-qty-control.sts-qty--error {
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px var(--err-ring) !important;
}
.sts-qty-control.sts-qty--error .sts-qty-input { color: var(--err) !important; }

.sts-qty-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
  min-height: 20px;
}
.sts-qty-hint strong { color: var(--sts-red); font-weight: 700; }
.sts-qty-hint.sts-qty-hint--error { color: var(--err); font-weight: 600; }
.sts-qty-hint.sts-qty-hint--error strong { color: var(--err); }

/* ── Contact fields ───────────────────────────────────────────── */
.sts-contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 14px;
}
.sts-contact-grid:first-of-type { margin-top: 0; }
@media (max-width: 540px) { .sts-contact-grid { grid-template-columns: 1fr; } }

/* Full-width row inside the contact section (used for Company field) */
.sts-field--full { margin-bottom: 14px; }

.sts-field { display: flex; flex-direction: column; gap: 6px; }

.sts-field-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text);
}
.sts-field-label span { color: var(--sts-red); }

.sts-input {
  height: 46px; padding: 0 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-weight: 400;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.sts-input:focus {
  border-color: var(--sts-red);
  box-shadow: var(--shadow-red);
  outline: none;
  background: var(--surface);
}
.sts-input::placeholder { color: var(--text-light); }

/* ── Inline field error messages  ← REQ #4 ───────────────────── */
.sts-input.sts-input--error {
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px var(--err-ring) !important;
}

.sts-inline-error {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--err);
  margin-top: 4px;
  line-height: 1.4;
}
.sts-inline-error.sts-visible { display: flex; }
.sts-inline-error svg { flex-shrink: 0; }

/* ── Payment options  ─────────────────────────────────────────── */
/* Tab strip only shows when there are ≥ 2 payment methods */
.sts-payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

/* single-method: full width, no visual tab strip needed */
.sts-payment-options.sts-single-method {
  grid-template-columns: 1fr;
}

.sts-pay-option {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
  user-select: none;
}
.sts-pay-option:hover { border-color: var(--sts-red); }
.sts-pay-option--active {
  border-color: var(--sts-red);
  background: var(--sts-red-soft);
  box-shadow: var(--shadow-red);
}

.sts-pay-radio {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.sts-pay-option--active .sts-pay-radio { border-color: var(--sts-red); }

.sts-pay-radio-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sts-red);
  opacity: 0; transform: scale(0);
  transition: all .2s var(--ease);
}
.sts-pay-option--active .sts-pay-radio-dot { opacity: 1; transform: scale(1); }

.sts-pay-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sts-pay-sub  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.sts-paypal-badge {
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 14px; font-weight: 800; line-height: 1.2;
  white-space: nowrap;
}
.sts-pp-pay { color: #003087; }
.sts-pp-pal { color: #009cde; }

/* ── Pay panels ───────────────────────────────────────────────── */
.sts-pay-panel { animation: stsFadeUp .2s var(--ease); }

@keyframes stsFadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sts-cc-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.sts-card-icons { display: flex; gap: 5px; }
.sts-card-chip { font-size: 9px; font-weight: 800; padding: 3px 6px; border-radius: 4px; }
.sts-visa  { background: #1a1f71; color: #fff; }
.sts-mc    { background: #eb001b; color: #fff; }
.sts-amex  { background: #007bc1; color: #fff; }

.sts-stripe-mount {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px; margin-bottom: 14px; min-height: 46px;
  transition: border-color .2s, box-shadow .2s;
}
.sts-stripe-mount.StripeElement--focus {
  border-color: var(--sts-red);
  box-shadow: var(--shadow-red);
}
.sts-stripe-mount.StripeElement--invalid {
  border-color: var(--err);
  box-shadow: 0 0 0 3px var(--err-ring);
}

.sts-field-error {
  font-size: 12px; color: var(--err);
  margin-bottom: 10px; min-height: 16px;
}

/* ── Submit button ────────────────────────────────────────────── */
.sts-submit-btn {
  width: 100%; height: 50px;
  background: linear-gradient(135deg, var(--sts-red) 0%, var(--sts-red-dark) 100%);
  color: #fff; border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px; font-weight: 700; letter-spacing: 0.03em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(192,57,43,0.3);
  margin-bottom: 11px;
}
.sts-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(192,57,43,0.38);
}
.sts-submit-btn:active:not(:disabled) { transform: none; }
.sts-submit-btn:disabled {
  background: var(--surface3); color: var(--text-light);
  cursor: not-allowed; box-shadow: none;
}

.sts-secure-note {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; font-size: 11px; color: var(--text-light); text-align: center;
}

/* ── PayPal panel ─────────────────────────────────────────────── */
.sts-paypal-logo {
  font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 12px;
}
.sts-paypal-note {
  font-size: 13px; color: var(--text-muted);
  text-align: center; margin-bottom: 14px; line-height: 1.6;
}
.sts-paypal-note strong { color: var(--text); }
#sts-paypal-buttons { margin-bottom: 8px; }
.sts-paypal-guest { font-size: 11px; color: var(--text-light); text-align: center; }

/* ── Message area ─────────────────────────────────────────────── */
.sts-message-area { margin-top: 14px; }

.sts-message-area .sts-success {
  background: var(--green-soft);
  border: 1px solid var(--green-ring);
  border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--green);
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.5;
}
.sts-message-area .sts-success svg { flex-shrink: 0; margin-top: 1px; }

.sts-message-area .sts-error {
  background: var(--err-soft);
  border: 1px solid var(--err-ring);
  border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; color: var(--err);
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.5;
}
.sts-message-area .sts-error svg { flex-shrink: 0; margin-top: 1px; }

/* ══════════════════════════════════════════════════════════════ */
/*  SIDEBAR — Order Summary                                       */
/* ══════════════════════════════════════════════════════════════ */

/* REQ #2  — sticky sidebar ─────────────────────────────────────
   The sidebar column is sticky. The inner card scrolls independently
   if the summary is taller than the viewport.

   IMPORTANT — sticky failure modes:
   • position: sticky needs an ancestor that is taller than the sticky element.
     If a theme/page-builder wrapper has overflow:hidden / overflow:auto /
     transform / filter / will-change, that ancestor becomes the containing
     block and sticky stops working.
   • We use !important on position+top to defeat theme stylesheets that
     re-apply position:relative to common selectors.
   • We make BOTH .sts-sidebar AND .sts-summary sticky — Elementor's flex
     containers sometimes interfere with grid-item sticky, but a sticky
     element directly inside a non-flex parent always works. */
.sts-wrap .sts-sidebar {
  position: -webkit-sticky;
  position: sticky !important;
  top: 24px !important;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transform: none;
  z-index: 5;
}

/* Also make the summary card itself sticky as a fallback in case the
   parent .sts-sidebar is constrained by Elementor's flex layout. */
.sts-wrap .sts-summary {
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  align-self: start;
}

/* The grid/flex parent of the sidebar must NOT have overflow set, or the
   sticky child has nothing to stick within. */
.sts-wrap,
.sts-wrap .sts-layout {
  overflow: visible !important;
}

.sts-sidebar::-webkit-scrollbar { width: 4px; }
.sts-sidebar::-webkit-scrollbar-track { background: transparent; }
.sts-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* REQ #2 note: parent .sts-wrap must NOT have overflow:hidden  */

.sts-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 28px;
  box-shadow: var(--shadow-sm);
}

/* Heading */
.sts-summary-heading {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--text-muted);
  margin-bottom: 18px; text-transform: uppercase;
}

.sts-summary-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  animation: stsPulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes stsPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--green-soft); }
  50%       { box-shadow: 0 0 0 6px rgba(5,150,105,0.05); }
}

/* Course pill */
.sts-sum-course-pill {
  background: #f0f4ff;
  border: 1px solid #c7d7f9;
  border-radius: 10px;
  padding: 12px 14px; margin-bottom: 18px;
}
.sts-sum-course-label {
  font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.12em; color: #3b5bdb;
  text-transform: uppercase; margin-bottom: 4px;
}
.sts-sum-course-name {
  font-size: 14px; font-weight: 700;
  color: var(--text); line-height: 1.3;
}

/* Line items */
.sts-sum-rows {
  display: flex; flex-direction: column; gap: 9px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px; margin-bottom: 0;
}
.sts-sum-row {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 13px;
}
.sts-sum-row span:first-child { color: var(--text-muted); }
.sts-sum-row strong { color: var(--text); font-weight: 600; }
.sts-sum-row--strike span:last-child {
  text-decoration: line-through; color: var(--text-light); font-size: 12px;
}
.sts-sum-row--free span:last-child { color: var(--green); font-weight: 700; }

/* Total block */
.sts-sum-total-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  text-align: center; margin: 14px 0 12px;
}
.sts-sum-total-label {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.sts-sum-total-amount {
  font-size: 42px; font-weight: 800;
  color: var(--sts-red); line-height: 1;
  margin-bottom: 4px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.sts-sum-total-break { font-size: 12px; color: var(--text-light); }

/* Savings pill */
.sts-savings-pill {
  display: none;
  align-items: center; justify-content: center; gap: 5px;
  background: var(--green-soft);
  border: 1px solid var(--green-ring);
  border-radius: 999px;
  padding: 7px 14px; font-size: 12px; font-weight: 700;
  color: var(--green); margin-bottom: 16px; text-align: center;
}
.sts-savings-pill.sts-visible {
  display: flex;
  animation: stsBounce .3s var(--ease);
}

@keyframes stsBounce {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* What's included */
.sts-included { margin-top: 2px; }
.sts-included-title {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.sts-included-list {
  list-style: none; display: flex; flex-direction: column; gap: 7px;
}
.sts-included-list li {
  font-size: 12px; color: var(--text-muted);
  padding-left: 20px; position: relative; line-height: 1.4;
}
.sts-included-list li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--green); font-weight: 800; font-size: 11px;
}

/* ── Spinner ─────────────────────────────────────────────────── */
@keyframes sts-spin { to { transform: rotate(360deg); } }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .sts-sidebar { position: static; max-height: none; }
  .sts-payment-options, .sts-pay-panel, .sts-submit-btn { display: none !important; }
}

/* ─────────────────────────────────────────────────────────────────
   Success Modal — full-screen confirmation overlay
   Used after a successful capture so the user can't miss it.
   ───────────────────────────────────────────────────────────────── */
#sts-success-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;            /* above everything, including page builders */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-out;
}
#sts-success-modal.sts-modal-open { opacity: 1; pointer-events: auto; }

#sts-success-modal .sts-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

#sts-success-modal .sts-modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30), 0 4px 12px rgba(0,0,0,0.10);
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  font-family: var(--font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
  color: #1e293b;
  outline: none;
  transform: translateY(20px) scale(0.96);
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#sts-success-modal.sts-modal-open .sts-modal-card { transform: translateY(0) scale(1); }

#sts-success-modal .sts-modal-check {
  display: inline-flex;
  width: 80px; height: 80px;
  margin: 0 auto 8px;
  color: #16a34a;
}
#sts-success-modal .sts-check-circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: sts-circle-draw .55s .15s ease-out forwards;
  transform-origin: center;
  transform: rotate(-90deg);
}
#sts-success-modal .sts-check-path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: sts-check-draw .35s .65s ease-out forwards;
}
@keyframes sts-circle-draw { to { stroke-dashoffset: 0; } }
@keyframes sts-check-draw  { to { stroke-dashoffset: 0; } }

#sts-success-modal .sts-modal-title {
  font-size: 28px;
  font-weight: 800;
  margin: 8px 0 6px;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
#sts-success-modal .sts-modal-subtitle {
  font-size: 15px;
  color: #475569;
  margin: 0 0 22px;
  line-height: 1.5;
}

#sts-success-modal .sts-modal-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 18px;
  text-align: left;
}
#sts-success-modal .sts-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}
#sts-success-modal .sts-modal-row:last-child { border-bottom: none; }
#sts-success-modal .sts-modal-row--total {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid #cbd5e1;
  border-bottom: none;
}
#sts-success-modal .sts-modal-label { color: #64748b; font-weight: 500; }
#sts-success-modal .sts-modal-value { color: #0f172a; font-weight: 600; text-align: right; max-width: 60%; }
#sts-success-modal .sts-modal-value--total {
  font-size: 22px;
  font-weight: 800;
  color: var(--sts-red, #c0392b);
  font-family: var(--font-mono, "SFMono-Regular", Menlo, monospace);
}

#sts-success-modal .sts-modal-receipt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin: 0 0 16px;
  text-align: left;
  line-height: 1.4;
}
#sts-success-modal .sts-modal-receipt svg { flex-shrink: 0; color: #059669; }

#sts-success-modal .sts-modal-next {
  font-size: 14px;
  color: #475569;
  margin: 0 0 18px;
  line-height: 1.5;
}

#sts-success-modal .sts-modal-ref {
  font-size: 11px;
  color: #94a3b8;
  margin: 0 0 22px;
  word-break: break-all;
  line-height: 1.5;
}
#sts-success-modal .sts-modal-ref-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 4px;
}
#sts-success-modal .sts-modal-ref-code {
  font-family: var(--font-mono, "SFMono-Regular", Menlo, monospace);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #475569;
  user-select: all;
}

#sts-success-modal .sts-modal-close-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--sts-red, #c0392b);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.30);
  transition: transform .15s, box-shadow .15s, background .15s;
}
#sts-success-modal .sts-modal-close-btn:hover {
  background: var(--sts-red-dark, #a52f23);
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.40);
  transform: translateY(-1px);
}
#sts-success-modal .sts-modal-close-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(192, 57, 43, 0.30);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  #sts-success-modal .sts-modal-card { padding: 28px 22px 20px; }
  #sts-success-modal .sts-modal-title { font-size: 24px; }
  #sts-success-modal .sts-modal-subtitle { font-size: 14px; }
  #sts-success-modal .sts-modal-check { width: 64px; height: 64px; }
  #sts-success-modal .sts-modal-check svg { width: 64px; height: 64px; }
}

/* Reduced-motion users get simpler treatment */
@media (prefers-reduced-motion: reduce) {
  #sts-success-modal { transition: opacity .15s; }
  #sts-success-modal .sts-modal-card { transition: none; transform: none; }
  #sts-success-modal .sts-check-circle,
  #sts-success-modal .sts-check-path { animation: none; stroke-dashoffset: 0; }
}
