/* /checkout and /checkout/return: layout only. Colours, type, buttons, fields and alerts come from base.css. */
.co-page { display: grid; gap: var(--sp-5); padding-block: var(--sp-6) var(--sp-8); align-content: start; }
.co-head { display: grid; gap: var(--sp-2); }
.co-title { font-size: var(--fs-h2); line-height: 1.2; }
.progress-text { font-weight: 600; letter-spacing: .01em; }

/* progress: three dots joined by lines, aria-hidden (the text above carries the step) */
.progress-bar { display: flex; align-items: center; list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
.progress-bar li { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-border-strong); box-sizing: border-box; }
.progress-bar li + li { margin-left: 48px; }
.progress-bar li + li::before { content: ""; position: absolute; right: 100%; top: 50%; width: 48px; height: 2px; margin-top: -1px; background: var(--c-border-strong); }
.progress-bar[data-step="1"] li:nth-child(1),
.progress-bar[data-step="2"] li:nth-child(-n+2),
.progress-bar[data-step="3"] li { background: var(--c-primary); border-color: var(--c-primary); }
.progress-bar[data-step="2"] li:nth-child(2)::before,
.progress-bar[data-step="3"] li + li::before { background: var(--c-primary); }

.co-grid { display: grid; gap: var(--sp-5); align-items: start; }
.co-summary, .co-main { min-width: 0; }
.site-header-inner > .site-actions { margin-left: auto; }
#pay-card > h2 + form { margin-top: var(--sp-4); }
.co-product { line-height: 1.4; }
.co-summary hr { margin: var(--sp-4) 0; }
.price-line { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.price-label { font-weight: 600; }
.price-amounts { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); }
.price-amounts del { color: var(--c-muted); font-size: var(--fs-lead); text-decoration-thickness: 2px; }
.price-old-label { color: var(--c-muted); font-size: var(--fs-small); }
.price-now-amt { font-size: var(--fs-h2); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.co-indep { margin-top: var(--sp-2); }

.co-main hr { margin: var(--sp-5) 0; }
.discount-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); align-items: start; }
.discount-row .btn { min-height: 48px; }
.status:empty { display: none; }
#discount-status, #pay-status { margin-top: var(--sp-3); }
.co-main .check { padding-block: 8px; }
.co-main .field-error { padding-left: 36px; }   /* 24 px box + 12 px gap: the message lines up with the label text */
.co-main #pay-form > .stack-1 > * + * { margin-top: 0; }
#discount-next { margin-top: var(--sp-4); }

.co-return { max-width: 640px; }
#return-status { font-size: var(--fs-lead); font-weight: 600; }

.footer-compact { gap: var(--sp-3); }
.footer-compact .footer-note { max-width: 62ch; margin-top: 0; }
.footer-compact .footer-links { display: flex; flex-wrap: wrap; column-gap: var(--sp-5); }
@media (min-width: 720px) { .footer-compact { grid-template-columns: 1fr; } }

@media (min-width: 720px) {
  .co-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-6); }
  .co-main { grid-column: 1; grid-row: 2; }
  .co-summary { grid-column: 2; grid-row: 2; position: sticky; top: var(--sp-5); }
  .pkg-grid { grid-template-columns: 1fr 1fr; }
  .co-return { margin-inline: 0; }
}
@media (max-width: 479.98px) {
  .co-page { padding-block: var(--sp-5) var(--sp-7); }
  .discount-row { grid-template-columns: 1fr; }
  .co-indep { display: none; }   /* the footer carries the same independence line on phones */
  .discount-row .btn { width: 100%; }
}

.btn-lg.btn-block { height: auto; padding-block: 12px; line-height: 1.3; }
.co-return .alert { margin-top: var(--sp-3); }

/* R3UI-02: the btw line and seller box arrive after /api/checkout/price-info; reserve their space so the summary does not jump */
#vat-line[hidden] { display: block !important; visibility: hidden; min-height: 1.5em; }
#seller-box[hidden] { display: block !important; visibility: hidden; min-height: 7em; }

/* package choice: two radio cards in a fieldset; the whole card is the label, the selected one gets a thick primary border */
.co-packages { grid-column: 1 / -1; grid-row: 1; margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--sp-3); }
.co-packages > legend { padding: 0; margin-bottom: var(--sp-2); font-weight: 700; }
.pkg-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.pkg-card { position: relative; display: block; min-width: 0; padding: var(--sp-4) var(--sp-4) var(--sp-4) calc(var(--sp-4) + 36px); background: var(--c-surface); border: 2px solid var(--c-line); border-radius: 12px; cursor: pointer; }
.pkg-card:hover { border-color: var(--c-border-strong); }
.pkg-card:has(.pkg-radio:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.pkg-card:has(.pkg-radio:focus-visible) { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.pkg-card:has(.pkg-radio:disabled) { cursor: default; opacity: .75; }
.pkg-radio { position: absolute; left: var(--sp-4); top: var(--sp-4); width: 24px; height: 24px; margin: 0; accent-color: var(--c-primary); }
.pkg-body { display: grid; gap: var(--sp-1); min-width: 0; }
.pkg-name { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
.pkg-aud { color: var(--c-muted); font-size: var(--fs-small); }
.pkg-prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.pkg-list { color: var(--c-muted); font-size: var(--fs-lead); text-decoration-thickness: 2px; }
.pkg-list[hidden] { display: none; }
.pkg-now { font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.pkg-intro { font-weight: 600; font-size: var(--fs-small); }
.pkg-intro[hidden] { display: none; }
.pkg-fine { color: var(--c-muted); font-size: var(--fs-small); }
@media (forced-colors: active) { .pkg-card:has(.pkg-radio:checked) { border-color: Highlight; } }
