/**
 * RF5 Payment V5 – Checkout page styles
 * Prefixed with .co- (checkout) or scoped to .rf5-payment-page so nothing leaks
 * into other RF5 pages (this file is linked from the shared templateV5 header).
 * Accent colour follows the form theme: --rf5-btn-submit-bg (theme_vars.php).
 * No inline style="" anywhere — CSP.
 */

/* ── Tokens ───────────────────────────────────────────────────────────────── */
.rf5-payment-page {
  --co-accent:      var(--rf5-btn-submit-bg, #4f7df3);
  --co-accent-ink:  var(--rf5-btn-submit-text, #ffffff);
  --co-accent-soft: color-mix(in srgb, var(--co-accent) 8%, #ffffff);
  --co-accent-line: color-mix(in srgb, var(--co-accent) 35%, #ffffff);
  --co-ink:         #0f172a;
  --co-ink-2:       #334155;
  --co-muted:       #64748b;
  --co-line:        #e2e8f0;
  --co-line-2:      #f1f5f9;
  --co-surface:     #ffffff;
  --co-sunken:      #f8fafc;
  --co-ok:          #059669;
  --co-warn-bg:     #fffbeb;
  --co-warn-line:   #fde68a;
  --co-warn-ink:    #92400e;
  --co-radius:      16px;
  --co-radius-sm:   12px;
  --co-shadow:      0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  color: var(--co-ink);
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.co-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}
.co-panel {
  background: var(--co-surface);
  border-radius: var(--co-radius);
  box-shadow: var(--co-shadow);
  border: 1px solid var(--co-line-2);
}
.co-main    { padding: 28px; }
.co-summary { padding: 24px; position: sticky; top: 16px; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.co-head {
  padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 1px solid var(--co-line);
}
.co-head-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px 16px; flex-wrap: wrap; margin-bottom: 4px;
}
.co-eyebrow {
  margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--co-accent);
}
.co-title { margin: 0; font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; color: var(--co-ink); }
.co-ref {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 6px 6px 6px 12px;
  background: var(--co-sunken); border: 1px solid var(--co-line); border-radius: 10px;
}
.co-ref-label { font-size: .76rem; color: var(--co-muted); }
.co-ref-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
                font-size: .95rem; font-weight: 600; letter-spacing: .02em; color: var(--co-ink); }
.co-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--co-warn-bg); border: 1px solid var(--co-warn-line);
  color: var(--co-warn-ink); font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.co-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .5);
  animation: co-pulse 2s infinite;
}
@keyframes co-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.co-section + .co-section { margin-top: 24px; }
.co-section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; font-size: 1rem; font-weight: 700; color: var(--co-ink);
}
.co-step-no {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--co-accent-soft); color: var(--co-accent);
  font-size: .75rem; font-weight: 700;
}

/* ── Payment methods (radio cards) ────────────────────────────────────────── */
.co-methods { display: flex; flex-direction: column; gap: 10px; }
.co-method {
  border: 1.5px solid var(--co-line); border-radius: var(--co-radius-sm);
  background: var(--co-surface);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.co-method:hover:not(.is-selected) { border-color: #cbd5e1; }
.co-method.is-selected {
  border-color: var(--co-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--co-accent) 12%, transparent);
}
.co-method-tab {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px;
  background: transparent; border: 0; border-radius: var(--co-radius-sm);
  text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.co-method-tab:focus-visible { outline: 2px solid var(--co-accent); outline-offset: 2px; }
.co-method-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: var(--co-sunken); color: var(--co-ink-2); font-size: 1.1rem;
  transition: background-color .18s ease, color .18s ease;
}
.co-method.is-selected .co-method-icon { background: var(--co-accent-soft); color: var(--co-accent); }
/* Brand logos beside the method name (Thai QR Payment, Mastercard + Visa). Small white
   badges: the logos are made for a light background, also in dark mode. */
.co-method-brands { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; vertical-align: middle; }
.co-method-brands img {
  height: 22px; width: auto; max-width: 64px; object-fit: contain; display: block;
  background: #fff; border: 1px solid var(--co-line, #e5e7eb); border-radius: 5px; padding: 2px 4px;
}
/* The Thai QR Payment image is a square with a wide logo in the middle: a wide badge with
   object-fit: cover crops the empty space above / below, so the logo fills the badge. */
.co-method-brands--qr img { width: 84px; height: 28px; max-width: none; padding: 0; object-fit: cover; object-position: center; }
.co-method-text  { display: flex; flex-direction: column; min-width: 0; }
.co-method-name  { font-weight: 600; font-size: .95rem; color: var(--co-ink); }
.co-method-blurb { font-size: .78rem; color: var(--co-muted); line-height: 1.35; }
.co-method-fee {
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px;
  background: var(--co-sunken); color: var(--co-ink-2); border: 1px solid var(--co-line);
}
.co-method-fee.is-free { background: #ecfdf5; color: var(--co-ok); border-color: #a7f3d0; }
.co-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #cbd5e1; background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.co-method.is-selected .co-radio {
  border-color: var(--co-accent);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--co-accent);
}

/* Panels open under the selected method */
.co-method-panel        { display: none; padding: 2px 16px 18px 72px; }
.co-method-panel.active { display: block; animation: co-fade .2s ease; }
@keyframes co-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.co-panel-hint { margin: 0 0 10px; font-size: .85rem; color: var(--co-ink-2); line-height: 1.55; }
.co-panel-hint em { color: var(--co-muted); }

.co-howto {
  margin: 0 0 12px; padding: 0; list-style: none; counter-reset: co-howto;
  display: grid; gap: 6px;
}
.co-howto li {
  counter-increment: co-howto; position: relative;
  padding-left: 28px; font-size: .84rem; color: var(--co-ink-2);
}
.co-howto li::before {
  content: counter(co-howto); position: absolute; left: 0; top: 1px;
  width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--co-sunken); border: 1px solid var(--co-line);
  font-size: .68rem; font-weight: 700; color: var(--co-muted);
}

.co-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  background: var(--co-sunken); border: 1px solid var(--co-line);
  font-size: .76rem; color: var(--co-ink-2);
}

/* ── QR ───────────────────────────────────────────────────────────────────── */
.co-qr-wrap { margin-top: 16px; text-align: center; }
/* Block (not inline-block): the expiry pill must sit on its own line under the QR. */
.co-qr-frame {
  display: block; width: 100%; max-width: 300px; margin: 0 auto;
  padding: 10px; border-radius: 16px; background: #fff;
  border: 1px solid var(--co-line); box-shadow: var(--co-shadow);
}
.co-qr-img  { display: block; width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
/* qrcode.min.js draws a <canvas> + <img> inside the holder; it toggles their display itself. */
.co-qr-img canvas, .co-qr-img img { width: 100% !important; height: auto !important; margin: 0 auto; }
.co-qr-caption { margin: 0 0 8px; font-size: .8rem; font-weight: 600; color: var(--co-ink-2); }
.co-qr-status { display: flex; justify-content: center; }
.co-qr-expire {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--co-warn-bg); color: var(--co-warn-ink); border: 1px solid var(--co-warn-line);
  font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.co-qr-expire[hidden] { display: none; }
.co-qr-expire--expired { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.co-qr-wrap.co-qr-expired .co-qr-img { opacity: .25; filter: grayscale(1); }
.co-qr-save { margin: 12px auto 0; display: inline-flex; align-items: center; gap: 6px; }

/* ── Promotion: applied state + free order switch ─────────────────────────── */
.co-promo-applied { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px;
  border-radius: var(--co-radius-sm); background: var(--co-accent-soft); border: 1px solid var(--co-accent-line); }
.co-promo-applied[hidden], #co-promo-entry[hidden], #co-promo-notice[hidden] { display: none; }
.co-promo-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--co-accent); letter-spacing: .04em; }
.co-promo-applied-amt { font-weight: 600; color: #15803d; font-variant-numeric: tabular-nums; }
.co-promo-auto { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--co-ink-2); border: 1px solid var(--co-line); }
.co-btn-link { margin-left: auto; padding: 0; border: 0; background: none; color: #dc2626; font-size: .84rem; font-weight: 600; cursor: pointer; }
.co-btn-link:hover { text-decoration: underline; }
#co-promo-notice { margin-bottom: 10px; }
/* ── Payment hold banner ──────────────────────────────────────────────────── */
.co-hold { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 12px 14px;
  border-radius: var(--co-radius-sm); background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: .86rem; }
.co-hold > i { margin-top: 2px; }
.co-hold .co-hold-left { font-variant-numeric: tabular-nums; }
.co-hold.is-urgent { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.co-hold--ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.co-hold-section .co-pay-btn { margin-top: 12px; }
/* Expired hold: only the expiry message / Reserve again and the order summary remain. */
.co-hold-expired .co-section:not(.co-hold-section), .co-hold-expired .co-cta { display: none !important; }

/* Free order (promotion covers the total): hide the payment step, show "Confirm registration". */
.co-free-only { display: none; }
.co-is-free .co-free-only { display: block; }
.co-is-free .co-hide-when-free { display: none !important; }
.co-qr-wrap.co-qr-expired .co-qr-save { display: none; }
/* Only where the QR is likely on the same device as the banking app. */
.co-qr-mobile-hint { display: none; margin: 10px auto 0; max-width: 320px; font-size: .78rem; color: var(--co-ink-2); }
@media (max-width: 768px), (pointer: coarse) {
  .co-qr-mobile-hint { display: block; }
}

/* ── Bank-transfer slip upload ─────────────────────────────────────────────── */
.co-slip { margin-top: 14px; display: grid; gap: 10px; }
.co-slip [hidden] { display: none !important; }
.co-slip-form, .co-slip-done { display: grid; gap: 10px; }
.co-slip-drop {
  position: relative; display: grid; justify-items: center; gap: 4px;
  padding: 18px 14px; border: 1.5px dashed var(--co-accent-line); border-radius: var(--co-radius-sm);
  background: var(--co-accent-soft); color: var(--co-ink-2); text-align: center; cursor: pointer;
}
.co-slip-drop:hover, .co-slip-drop:focus-within { border-color: var(--co-accent); }
.co-slip-drop > i { font-size: 1.4rem; color: var(--co-accent); }
.co-slip-drop span { font-weight: 600; word-break: break-all; }
.co-slip-drop small { font-size: .75rem; }
.co-slip-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.co-slip-local-preview, .co-slip-preview img {
  display: block; max-width: 220px; max-height: 280px; margin: 0 auto;
  border-radius: 10px; border: 1px solid var(--co-line); object-fit: contain; background: #fff;
}
.co-slip-preview { display: block; text-align: center; }
.co-slip-pdf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--co-accent); }
.co-slip #co-slip-submit:disabled { opacity: .55; cursor: not-allowed; }

/* ── Bank transfer ────────────────────────────────────────────────────────── */
.co-banks { display: grid; gap: 10px; margin-bottom: 12px; }
.co-bank-card {
  padding: 14px 16px; border-radius: var(--co-radius-sm);
  background: var(--co-sunken); border: 1px solid var(--co-line);
}
.co-bank-top  { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.co-bank-logo {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: #fff; border: 1px solid var(--co-line); color: var(--co-ink-2); font-size: .85rem;
}
.co-bank-name { font-weight: 600; font-size: .92rem; }
.co-bank-acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.co-bank-acc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; color: var(--co-ink);
}
.co-bank-meta { margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; }
.co-bank-meta dt { font-size: .7rem; font-weight: 500; color: var(--co-muted); }
.co-bank-meta dd { margin: 0; font-size: .84rem; font-weight: 600; color: var(--co-ink-2); }

/* ── Copy buttons ─────────────────────────────────────────────────────────── */
.co-copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--co-line); background: #fff; color: var(--co-ink-2);
  font-size: .76rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.co-copy-btn:hover { border-color: var(--co-accent); color: var(--co-accent); }
.co-copy-btn--ghost { padding: 4px 8px; background: transparent; border-color: transparent; }

/* ── Counter Service ──────────────────────────────────────────────────────── */
.co-counter-refno {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-bottom: 10px; padding: 16px 20px; border-radius: var(--co-radius-sm);
  background: var(--co-sunken); border: 1.5px dashed #cbd5e1; cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.35rem; font-weight: 700; letter-spacing: .08em; color: var(--co-ink);
}
.co-counter-refno:hover, .co-counter-refno:focus-visible { border-color: var(--co-accent); outline: none; }
.co-counter-copy { font-family: inherit; font-size: .72rem; font-weight: 500; letter-spacing: 0; color: var(--co-muted); }

/* ── Callouts (replace Bootstrap alerts on this page) ─────────────────────── */
.co-callout {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding: 12px 14px; border-radius: var(--co-radius-sm);
  font-size: .82rem; line-height: 1.55; border: 1px solid;
}
.co-callout[hidden] { display: none; }
.co-callout > i { margin-top: 3px; flex: 0 0 auto; }
.co-callout em { opacity: .85; }
.co-callout--info { background: var(--co-accent-soft); border-color: var(--co-accent-line); color: var(--co-ink-2); }
.co-callout--info > i { color: var(--co-accent); }
.co-callout--warn { background: var(--co-warn-bg); border-color: var(--co-warn-line); color: var(--co-warn-ink); }
.co-callout--ok   { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

/* Pending notice — no d-flex (it would beat [hidden]); spinner instead of a static icon */
.co-pending-notice { margin-top: 14px; }
.co-spinner {
  flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%;
  border: 2px solid var(--co-accent-line); border-top-color: var(--co-accent);
  animation: co-spin .8s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ── Extras: promo + tax invoice disclosures ──────────────────────────────── */
.co-extras { padding-top: 20px; border-top: 1px solid var(--co-line); display: grid; gap: 10px; }
.co-section.co-extras { margin-top: 24px; }
.co-disclosure { border: 1px solid var(--co-line); border-radius: var(--co-radius-sm); background: #fff; }
.co-disclosure summary {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; cursor: pointer; list-style: none;
  font-size: .9rem; font-weight: 600; color: var(--co-ink-2);
}
.co-disclosure summary::-webkit-details-marker { display: none; }
.co-disclosure summary > i:first-child { color: var(--co-muted); width: 16px; text-align: center; }
.co-disclosure summary:focus-visible { outline: 2px solid var(--co-accent); outline-offset: -2px; border-radius: var(--co-radius-sm); }
.co-disclosure-caret { margin-left: auto; font-size: .75rem; color: var(--co-muted); transition: transform .2s ease; }
.co-disclosure[open] .co-disclosure-caret { transform: rotate(180deg); }
.co-disclosure-body { padding: 0 16px 16px; }

.co-promo-row { display: flex; gap: 8px; }
.co-promo-row .co-input { flex: 1; min-width: 0; }
.rf5-payment-page .co-input {
  height: 44px; border-radius: 10px; border: 1px solid var(--co-line);
  font-size: .9rem; letter-spacing: .04em;
}
.rf5-payment-page .co-input:focus {
  border-color: var(--co-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--co-accent) 14%, transparent);
}
.co-input-upper { text-transform: uppercase; }
.co-input-upper::placeholder { text-transform: none; letter-spacing: 0; }
.co-btn-secondary {
  flex: 0 0 auto; height: 44px; padding: 0 20px; border-radius: 10px;
  border: 1.5px solid var(--co-accent); background: #fff; color: var(--co-accent);
  font-weight: 600; font-size: .88rem; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.co-btn-secondary:hover:not(:disabled) { background: var(--co-accent); color: var(--co-accent-ink); }
.co-btn-secondary:disabled { opacity: .6; cursor: not-allowed; }
.co-promo-feedback { font-size: .82rem; margin-top: 8px; }
.co-promo-feedback:empty { display: none; }
.co-promo-feedback.ok   { color: var(--co-ok); }
.co-promo-feedback.fail { color: #dc2626; }
.co-promo-label-fw { font-weight: 600; }

/* Plain native checkbox (no Bootstrap .form-check-input: its float/negative margin overlapped the label). */
.co-check { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .88rem; font-weight: 500; cursor: pointer; }
.co-check input[type="checkbox"] {
  position: static; float: none; margin: 0; flex: 0 0 auto;
  width: 18px; height: 18px; accent-color: var(--co-accent); cursor: pointer;
}

/* ── Tax invoice form ─────────────────────────────────────────────────────── */
.co-saved-tag {
  padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 600;
  background: #ecfdf5; color: var(--co-ok); border: 1px solid #a7f3d0;
}
.co-saved-tag[hidden] { display: none; }
.co-invoice-form { display: grid; gap: 14px; margin-top: 16px; }
/* Own hide class: rf5-csp-init.js turns .rf5-init-hidden into a sticky inline display:none. */
.co-invoice-form.is-off { display: none; }

.co-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--co-sunken); border: 1px solid var(--co-line); border-radius: 12px;
}
.co-seg-opt { position: relative; margin: 0; cursor: pointer; }
.co-seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.co-seg-opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 10px; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--co-muted);
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.co-seg-opt input:checked + span { background: #fff; color: var(--co-accent); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.co-seg-opt input:focus-visible + span { outline: 2px solid var(--co-accent); outline-offset: 1px; }

.co-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-field > label { margin: 0; font-size: .8rem; font-weight: 600; color: var(--co-ink-2); }
.co-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.co-req { color: #dc2626; margin-left: 2px; }
.rf5-payment-page .co-textarea { height: auto; min-height: 84px; resize: vertical; letter-spacing: normal; }
.rf5-payment-page .co-input-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.rf5-payment-page .co-invoice-form .co-input { letter-spacing: normal; }
.rf5-payment-page .co-invoice-form .co-input-mono { letter-spacing: .06em; }
.rf5-payment-page .co-input.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }

/* Individual vs company: label text + branch field */
/* stylecustom.css sets every <span> to font-weight 300; the name label's text sits in
   these spans, so take the label's weight like the other field labels. */
.co-field > label .co-when-personal,
.co-field > label .co-when-corporation { font-weight: inherit; }
.co-invoice-form .co-when-corporation { display: none; }
.co-invoice-form.is-corporation .co-when-corporation { display: flex; }
.co-invoice-form.is-corporation label .co-when-corporation { display: inline; }
.co-invoice-form.is-corporation .co-when-personal { display: none; }
.co-invoice-form.is-corporation .co-field-row.co-when-corporation { display: grid; }
/* Establishment = Branch → branch no. field */
.co-invoice-form .co-when-branch { display: none; }
.co-invoice-form.is-branch .co-when-branch { display: flex; }

.co-invoice-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.co-invoice-actions .co-promo-feedback { margin-top: 0; }

.co-fineprint { margin: 10px 0 0; font-size: .76rem; color: var(--co-muted); line-height: 1.5; }
.co-fineprint--left { text-align: left; }

/* ── Order summary ────────────────────────────────────────────────────────── */
.co-items { margin: 0 0 14px; padding: 0 0 14px; list-style: none; border-bottom: 1px dashed var(--co-line); display: grid; gap: 10px; }
.co-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .88rem; }
.co-item-name { color: var(--co-ink-2); font-weight: 500; }
.co-item-name small { display: block; font-size: .74rem; font-weight: 400; color: var(--co-muted); }
.co-item-amt { flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--co-ink); font-weight: 600; }
.co-item--addon .co-item-name::before { content: '+ '; color: var(--co-muted); }

.co-pricing { display: grid; gap: 8px; }
.co-price-row { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; color: var(--co-muted); }
.co-price-row[hidden] { display: none; }
.co-price-row > span:last-child { font-variant-numeric: tabular-nums; color: var(--co-ink-2); white-space: nowrap; }
.co-price-row--discount, .co-price-row--discount > span:last-child { color: var(--co-ok); }

.co-total {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--co-line);
}
.co-total-label { font-size: .86rem; font-weight: 600; color: var(--co-ink-2); padding-bottom: 4px; }
.co-total-amt {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  color: var(--co-ink); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.co-total-amt #co-currency { font-size: .9rem; font-weight: 600; color: var(--co-muted); margin-left: 2px; }
.co-vat-note { margin: 2px 0 0; text-align: right; font-size: .74rem; color: var(--co-muted); }

/* ── Pay button + trust line ──────────────────────────────────────────────── */
.co-cta { margin-top: 18px; }
.co-cta[hidden] { display: none; }
.co-pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; border: 0; border-radius: 12px;
  background: var(--co-accent); color: var(--co-accent-ink);
  font-size: 1rem; font-weight: 700; letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--co-accent) 30%, transparent);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.co-pay-btn:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 10px 22px color-mix(in srgb, var(--co-accent) 36%, transparent); }
.co-pay-btn:active:not(:disabled) { transform: translateY(1px); }
.co-pay-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--co-accent) 45%, transparent); outline-offset: 3px; }
.co-pay-btn:disabled { opacity: .7; cursor: progress; box-shadow: none; }
.co-cta .co-callout { margin-top: 0; }

.co-trust {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 14px 0 0; font-size: .74rem; color: var(--co-muted); text-align: center;
}
.co-trust i { color: var(--co-ok); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .co-layout  { grid-template-columns: minmax(0, 1fr); }
  .co-summary { position: static; }
}
@media (max-width: 575px) {
  .co-main, .co-summary { padding: 20px 16px; }
  .co-title { font-size: 1.3rem; }
  .co-method-tab { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  .co-method-fee { grid-column: 2; grid-row: 2; justify-self: start; }
  .co-radio { grid-column: 3; grid-row: 1; }
  .co-method-panel { padding: 0 12px 16px; }
  .co-total-amt { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .co-status-dot, .co-spinner, .co-method-panel.active { animation: none; }
}
