/*
 * Storange checkout — component stylesheet.
 *
 * Pairs with `tokens.css`, which MUST be loaded first. Every colour here comes from a token
 * defined there; this file adds no colour of its own outside the dark-theme block at the end.
 *
 * SCOPE AND COLLISION
 * -------------------
 * Elementor and the theme both load on this page. Everything is a class, prefixed `sc-`, and
 * every rule is anchored on `.sc-root` so the checkout cannot leak out and the theme cannot
 * leak in. `.sc-root` restates font, line-height, colour and box-sizing explicitly rather than
 * inheriting them, so a theme change cannot silently reshape the checkout.
 *
 * BUDGET
 * ------
 * This replaces a page that makes 176 requests. No @import, no webfonts, no external anything —
 * one self-contained file, system font stacks only.
 *
 * PROVENANCE
 * ----------
 * Spacing, sizing and layout are extracted from the inline styles and the computed style objects
 * in `v13/export-objednavka-standalone.html` (`option()`, `check()`, `seg()`, `themeVars()` and
 * the `render()` return). Where this file departs from the export it says so in a comment —
 * there are four such places, all of them accessibility floors the prototype did not meet.
 *
 * ORDER
 * -----
 *   1. root + resets          5. option cards / chips / checks
 *   2. supplementary tokens   6. forms
 *   3. layout                 7. buttons, badges, links
 *   4. step indicator         8. summary + sticky bar
 *                             9. confirmation
 *                            10. breakpoints
 *                            11. reduced motion
 *                            12. dark theme (PROVISIONAL — tokens only)
 */

/* ==========================================================================
   1. ROOT + RESETS
   ========================================================================== */

/*
 * 🔴 `[hidden]` must beat any class that sets `display`.
 *
 * The HTML `hidden` attribute is only `display:none` at the UA-stylesheet level, so ANY class
 * with its own `display` silently overrides it. `.sc-panel` is `display:flex`, and the app
 * hides panels with `el.hidden = true` — so all four steps would have rendered at once, on
 * top of each other, with nothing in the console.
 *
 * Nine bindings in checkout.js hide something this way. One rule covers all of them.
 */
.sc-root [hidden] {
  display: none !important;
}

.sc-root {
  /* Fonts. The design uses Archivo + IBM Plex Mono; both are webfonts and webfonts are the
   * thing we are removing. System stacks only — the mono stack keeps prices tabular. */
  --sc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sc-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  font-family: var(--sc-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.sc-root,
.sc-root *,
.sc-root *::before,
.sc-root *::after {
  box-sizing: border-box;
}

/* The theme puts margins on headings and paragraphs. Anchoring on .sc-root wins that fight
 * without !important. :is() keeps the specificity at (0,1,1). */
.sc-root :is(h1, h2, h3, h4, p, ul, ol, li, figure, fieldset, legend) {
  margin: 0;
}

.sc-root :is(ul, ol, fieldset) {
  padding: 0;
}

.sc-root fieldset {
  border: 0;
  min-width: 0;
}

/* 🔴 THIS RESET WAS BEATING EVERY COMPONENT IT WAS MEANT TO SUPPORT.
 *
 * `:is()` takes the specificity of its most specific argument, so `.sc-root :is(button, …)` is
 * (0,1,1) — HIGHER than every `.sc-*` component rule, which are all (0,1,0). Specificity beats
 * source order, so `color` and `font-size` were forced to `inherit` on every <button> in the
 * checkout no matter what the component asked for. Measured live 2026-09-04:
 *
 *   .sc-btn--primary   #201C19 on #BC4B00  — DARK INK ON DARK ORANGE, the main CTA
 *   .sc-seg__btn--on   #201C19 on #201C19  — ink on ink, an invisible label
 *   every button       16px instead of the 13/14px the components set
 *
 * ⚠️ `.sc-chip` and `.sc-header__contact` were correct throughout, because they are not
 * <button> elements — which is exactly why this hid: it looked like a component bug, not a
 * reset bug, and only the elements the reset names were affected.
 *
 * Split in two. Font-family and line-height genuinely are not inherited by form controls and
 * must beat the theme, so they keep `:is()`. Colour and size are COMPONENT decisions: at
 * `:where()` (zero specificity, total (0,1,0)) this still overrides a bare UA `button {}` rule
 * while losing to every component, which is the whole point.
 */
.sc-root :is(button, input, select, textarea) {
  font-family: inherit;
  line-height: inherit;
}

.sc-root :where(button, input, select, textarea) {
  font-size: inherit;
  color: inherit;
}

.sc-root img {
  max-width: 100%;
  height: auto;
}

/* Screen-reader-only. Used for the step indicator's "krok N z 4" and for labels the visual
 * design carries by position rather than by text. */
.sc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   2. SUPPLEMENTARY TOKENS
   --------------------------------------------------------------------------
   The design references five roles tokens.css does not define: an input border, a stronger
   input border, an overlay shadow, a hairline divider lighter than --line, and the text colour
   that sits on a filled accent button. Rather than invent five hex values (which would be a
   second, unmarked palette), each is DERIVED from a token that does exist. They therefore
   follow the dark block automatically and need no dark override — except --sc-on-accent, whose
   whole job is to stay white on the orange fill.
   ========================================================================== */

.sc-root {
  /* Fallbacks first, for engines without color-mix (pre-2023 Android WebView). Degraded, not
   * broken: the field border reads faint rather than absent. */
  /* 🔴 Was var(--accentSoft), which broke in LIGHT theme: --accentSoft is not part of
   * Tibor's palette at all — it was a token I invented and later removed once the real
   * themeVars() values were recovered, leaving this defined only inside the dark block.
   * An undefined CSS variable renders as NOTHING, with no error, so every field border
   * would have silently vanished for the default theme. --line2 is the real palette's
   * field border and exists in both themes (#C9C2BA / #2C565D). */
  --sc-field-line: var(--line2);
  --sc-field-line-strong: var(--ink2);
  --sc-divider: var(--surface2);
  --sc-shadow-2: var(--surface2);
  --sc-on-accent: var(--surface); /* white in light; overridden in the dark block */
}

@supports (color: color-mix(in srgb, red, blue)) {
  .sc-root {
    --sc-field-line: color-mix(in srgb, var(--ink) 26%, var(--surface));
    --sc-field-line-strong: color-mix(in srgb, var(--ink) 48%, var(--surface));
    --sc-divider: color-mix(in srgb, var(--ink) 8%, var(--surface));
    --sc-shadow-2: color-mix(in srgb, var(--ink) 14%, transparent);
  }
}

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */

/* Mobile-first: one column. The desktop two-column grid is added at the breakpoint. */
/* The design puts the whole checkout on a warm grey ground (--desk) inside one white card.
 * Without it the page was edge-to-edge white with the content flush left, which reads as an
 * unstyled form rather than a product. */

/*
 * 🔴 THE GROUND MUST FILL THE VIEWPORT, NOT THE CONTENT.
 *
 * Measured live 2026-09-04 at 1024x1200, 1180x1200 and 1440x1200: `html` and `body` both
 * computed `background-color: rgba(0,0,0,0)`, and `.sc-root` painted --desk for its own
 * 962px only. The remaining 238px of viewport was the browser's white — the band the founder
 * photographed on an iPad, and the single most visible defect on the page.
 *
 * The fix paints BODY, not `.sc-root`. When `html` carries no background of its own the
 * body's background is PROPAGATED TO THE CANVAS and paints the whole viewport at any height.
 * No amount of `min-height` on a descendant can do that, because a descendant's paint stops
 * at its own border box. `html` is deliberately left alone: it is the one element on this
 * page we cannot scope to ourselves.
 *
 * SCOPING. `Route::renderShell()` renders the entire document and emits `<body class="sc-body">`,
 * so `.sc-body` is reachable ONLY from the checkout. No bare `body` selector (which would
 * catch every page of the site if this file were ever enqueued more widely) and no `:has()`.
 *
 * The flex column is the standard sticky-footer pattern, and it is here so `.sc-sticky` lands
 * on the bottom edge of the screen when a step is shorter than the viewport rather than
 * floating mid-page. `flex: 1 0 auto` on `.sc-root` rather than `min-height: 100dvh`:
 * `wp_footer()` appends a 1px screen-reader live region and a 1px Stripe iframe AFTER the
 * shell (measured), so a full-height `.sc-root` would push those 2px past the fold and raise
 * a scrollbar on a page that otherwise fits exactly.
 */
.sc-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--desk);
}

.sc-body > .sc-root {
  flex: 1 0 auto;
}

.sc-root {
  display: flex;
  flex-direction: column;
  background: var(--desk);
  padding: 0;
}

/* The checkout is the page itself, not a prototype card on a grey desk. */
.sc-frame {
  flex: 1 0 auto;
  background: var(--frame);
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

/* ── the brand bar ─────────────────────────────────────────────────────────────────────── */
.sc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  /* 🔴 The header's horizontal padding MUST equal `.sc-layout`'s, or the wordmark sits on a
   * different vertical line from the title beneath it. It did: the header was pinned at 16px
   * at every width while `.sc-layout` moved to 32px from 600px up, so on every screen wider
   * than 600px the brand was 16px to the left of everything else on the page. Measured live
   * 2026-09-04 at 600/768/834/1024/1180/1280/1440/1920 — all eight. The prototype uses 16px
   * on its mobile frame and 32px on its desktop frame, which is exactly this pairing. */
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}

.sc-header__left {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.sc-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.sc-brand__n {
  color: var(--accent);
}

.sc-header__back {
  color: var(--accentText);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sc-header__back:hover {
  text-decoration: underline;
}

/* DEPARTS FROM THE EXPORT (a11y floor #6). "Zmeniť sklad alebo lokalitu" measured 18-19.5px
 * tall live — a 19px target on a phone. Padding rather than min-height because
 * `.sc-header__left` aligns on the BASELINE: growing the box symmetrically leaves the text
 * exactly where the design puts it, and only the touch area changes. Scoped to a coarse
 * pointer so the desktop header keeps the design's height. */
@media (pointer: coarse) {
  .sc-header__back {
    padding: 13px 0;
  }
}

.sc-header__help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  /* The header is `space-between` with two children, so this changes nothing while both fit
   * on one line. It matters when they do NOT: a wrapped flex line runs its own
   * justify-content, so without it the help block drops to a second row flush LEFT, under the
   * wordmark, which reads as a broken header rather than a wrap. */
  margin-left: auto;
}

.sc-header__helplabel {
  color: var(--muted3);
  font-size: 13px;
}

.sc-header__contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* DEPARTS FROM THE EXPORT (a11y floor #5): the prototype's contact button is 38px. Measured
   * live at 360-1920, it was the shortest real tap target on the page. 44px is the floor. */
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r1);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sc-header__contact:hover {
  border-color: var(--accent);
  color: var(--accentText);
}

/* "Potrebujete pomoc?" is noise the moment it costs a line break; the two buttons still say
 * what they are. It used to be dropped below 600px only, which was measured against the OLD
 * 16px header padding. At 32px gutters the header wraps at 834 — an iPad — so the label now
 * goes at the same point the two-column layout arrives and the header gets its full width
 * back. Measured live: 730px available at 834, ~630px of content once the label is gone. */
@media (max-width: 899px) {
  .sc-header__helplabel {
    display: none;
  }
}

@media (max-width: 599px) {
  .sc-header__back {
    font-size: 12px;
  }
}

/* ── the step rail ─────────────────────────────────────────────────────────────────────── */
.sc-stepsbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-stepsbar__rail {
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.sc-stepsbar__fill {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .sc-stepsbar__fill {
    transition: none;
  }
}

.sc-layout {
  display: grid;
  /* 🔴 `minmax(0, 1fr)`, never a bare `1fr`. An `fr` track's automatic minimum is
   * `min-content`, so ONE long unbreakable string — an IBAN, an email address, a depot name
   * with no spaces — makes the track wider than its share and scrolls the whole page
   * sideways. It is invisible until real customer data arrives, which is the worst time. */
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 26px 16px 40px;
}

.sc-checkout-progress {
  grid-column: 1 / -1;
  min-width: 0;
}

.sc-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.sc-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sc-panel__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-title {
  /* The prototype's title is 30px at BOTH its 390px mobile frame and its 1180px desktop one,
   * so 30px is the design size and the old 26px base was a guess. It does not fit at 360px,
   * hence the clamp rather than a flat value: 28.6px at 360, 29.4px at 390, 30px from 417px
   * up. A step at a breakpoint would jump the largest text on the page by 4px mid-resize. */
  font-size: clamp(26px, 20px + 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.sc-lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted3);
}

/* The mono eyebrow above each group ("DÁTUM NÁSTUPU", "FREKVENCIA PLATBY"). */
.sc-eyebrow {
  font-family: var(--sc-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted3);
}

.sc-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-group--divided {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 12px;
}

.sc-row-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Bordered explanatory box (Generali terms, and similar). */
.sc-note {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted3);
}

/* ==========================================================================
   4. STEP INDICATOR
   ========================================================================== */

/* Horizontal scroll on narrow screens; the negative margin gives the focus ring room to draw
 * outside the scroll box, which would otherwise clip it. */
.sc-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4px;
  margin: 0 -4px;
  scrollbar-width: none;
}

.sc-steps::-webkit-scrollbar {
  display: none;
}

.sc-steps__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  /* DEPARTS FROM THE EXPORT: the prototype's step button is 34px wide on mobile once its label
   * is hidden. Completed steps are clickable, so they are a 44px target. */
  min-width: 44px;
  min-height: 44px;
  padding: 8px 6px;
  border: none;
  background: transparent;
  cursor: default;
}

.sc-steps__item--done {
  cursor: pointer;
}

.sc-steps__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--muted3);
}

.sc-steps__item--current .sc-steps__dot {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accentText);
}

.sc-steps__item--done .sc-steps__dot {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--sc-on-accent);
}

/* On mobile only the current step is labelled; every step is labelled from the breakpoint up. */
.sc-steps__label {
  display: none;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted3);
}

.sc-steps__item--current .sc-steps__label {
  display: inline;
  font-weight: 700;
  color: var(--ink);
}

.sc-progress {
  height: 2px;
  background: var(--sc-divider);
  margin-top: 14px;
}

.sc-progress__bar {
  height: 100%;
  background: var(--accent);
}

/* ==========================================================================
   5. OPTION CARDS, CHIPS, CHECKBOXES
   ========================================================================== */

/* Radio-like selectable cards: payment frequency, insurance tiers, payment methods.
 * The real <input type="radio"> is visually hidden; .sc-option is its label. */
.sc-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.sc-options--wide {
  gap: 10px;
}

/* The frequency cards. Four full-width rows pushed the first real decision of the checkout
 * below the fold; the design keeps them compact and side by side. Two columns rather than the
 * design's three because there are four options, and 3+1 leaves an orphan on its own row. */
@media (min-width: 700px) {
  .sc-options--grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.sc-option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 44px;
  padding: 14px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--r1);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.sc-option--selected {
  border-color: var(--accent);
  background: var(--tint);
}

/* Focus follows the hidden input, not the label. */
.sc-option:has(:focus-visible) {
  outline: 2px solid var(--accentText);
  outline-offset: 2px;
}

.sc-option__radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--muted3);
  background: var(--surface);
}

.sc-option--selected .sc-option__radio {
  border: 5.5px solid var(--accent);
}

.sc-option__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.sc-option__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sc-option__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.sc-option--selected .sc-option__name {
  color: var(--accentText);
}

.sc-option__price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--sc-font-mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink2);
}

.sc-option--selected .sc-option__price {
  color: var(--ink);
}

.sc-option__was {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted3);
  text-decoration: line-through;
}

.sc-option__note {
  /* 12px is the export's value ("najväčšia flexibilita", "platba raz za 3 mesiace"); 13px was
   * a transcription slip and made the secondary line compete with the option name. */
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.sc-option__note--sm {
  font-size: 12px;
}

/* Right-hand price on the insurance tiers. */
.sc-option__amount {
  font-family: var(--sc-font-mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}

/* Payment-brand marks. Fixed 42×26 box so Visa, Mastercard, Apple/Google Pay and the transfer
 * glyph all line up regardless of their intrinsic aspect ratio. */
.sc-option__marks {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.sc-option__mark {
  width: 42px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 4px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-origin: content-box;
}

/* --- quick-choice chips (Dnes / Zajtra / O týždeň / Iný dátum) --- */

.sc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--r1);
  background: var(--surface);
  color: var(--ink2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* DEPARTS FROM THE EXPORT: the chip is 40px tall by design. Rather than change Tibor's height,
 * an invisible pseudo-element extends the touch target to 44px. */
.sc-chip::after {
  content: "";
  position: absolute;
  inset: -2px 0;
}

.sc-chip--selected {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accentText);
}

/* "Iný dátum" reads as a slot to fill, not a value already chosen. */
.sc-chip--custom {
  border-style: dashed;
  border-color: var(--sc-field-line-strong);
}

.sc-chip--custom.sc-chip--selected {
  border-style: solid;
  border-color: var(--accent);
}

/* --- the gateway's own payment fields ------------------------------------------------------
 *
 * 🔴 EVERYTHING INSIDE `.sc-gateway` IS WOOCOMMERCE'S MARKUP, NOT OURS. `checkout.js` fetches
 * the `.woocommerce-checkout-payment` fragment from Woo's own `?wc-ajax=update_order_review`
 * and injects it here so that `wc-stripe/build/upe-classic.js` has a `#wc-stripe-upe-element`
 * to mount into. That is the only reason a non-`sc-` class name appears in this stylesheet, and
 * every one of them is scoped under `.sc-gateway` so it cannot reach the rest of the site.
 *
 * 🔴 `.sc-gateway` ITSELF DECLARES NO `display`. `checkout.js` toggles `hidden` on this element
 * and an author `display` rule would out-rank the user-agent `[hidden]` rule; §4 of
 * `shell_test.php` fails by name if that discipline is broken here.
 *
 * WHAT THE THREE RULES BELOW HIDE, and why it is not cosmetic:
 *
 *   · Woo's fragment carries its OWN payment-method chooser — a radio and a label per available
 *     gateway. Rendering it would put a second chooser on the page directly beneath ours, with
 *     the two disagreeing the moment the customer used the wrong one. Our cards are the chooser.
 *   · 🔴 The radio is hidden the `.sc-sr-only` way — CLIPPED, never `display:none`. Stripe's
 *     classic UPE script decides whether to mount by reading
 *     `input[name="payment_method"]:checked`, and jQuery's `:visible` is false for a
 *     `display:none` input. Clipping keeps it checkable, focusable and readable by the gateway.
 *   · `.place-order` is Woo's own submit button, terms box and checkout nonce. We never submit
 *     Woo's form — `Order\Submission` builds the POST and `checkout.js` sends it — so a second
 *     "Objednať" button is a control that would answer a press with nothing at all.
 *     `checkout.js` ALSO sets `hidden` on it: two independent mechanisms, because this one
 *     failing is a visible dead button on the page where money moves.
 */

/* 🔴 `form.checkout` IS A LAYOUT ELEMENT WE DID NOT WANT AND CANNOT AVOID. `wc-stripe`'s classic
 * script binds its submit handler directly to `$("form.checkout")` at DOMContentLoaded, so the
 * card rail only charges when a real form is in the served markup — see `Shell::panelPlatba()`.
 *
 * 🔴 IT REPEATS `.sc-panel`'s OWN COLUMN, IT DOES NOT USE `display: contents`. The panel is a
 * flex column with a 24px gap; wrapping three of its children in a form would otherwise collapse
 * them into ONE flex item and delete the gaps between them. `display: contents` would fix the
 * spacing and break something worse: WooCommerce blocks this exact form while the order is in
 * flight (`$form.block()`), and blockUI measures the element it overlays — an element with no
 * box measures nothing and the white overlay lands in the wrong place, over the wrong part of
 * the page, on the one screen where "something is happening" has to be legible.
 *
 * 🔴 THE GAP IS THE SAME 24px `.sc-panel` USES. Two numbers that must agree, and this is the
 * cheaper place to say so than a variable used twice.
 */
.sc-wooform {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 🔴 `:empty`, so the notices sink COSTS NOTHING while it is empty — and it is empty on every
 * render but a failed one. It exists because `upe-classic.js` refuses to report a declined card
 * at all when `.woocommerce-notices-wrapper` is absent (`if (!n.length) return;`), so without it
 * the element is not decoration, it is the difference between a message and silence. Without
 * `:empty` an always-present empty div would add a permanent 24px hole under the card field.
 */
.sc-wooform > .woocommerce-notices-wrapper:empty {
  display: none;
}

.sc-gateway {
  margin-top: 4px;
}

.sc-payment-security { padding: 16px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--surface2); color: var(--muted); font-size: 13px; line-height: 1.6; }
.sc-payment-security__heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.sc-payment-security__heading strong { color: var(--ink); font-weight: 600; }
.sc-payment-security__heading span { white-space: nowrap; }
.sc-payment-security p { margin: 8px 0 0; }

.sc-gateway ul.wc_payment_methods {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sc-gateway .wc_payment_method > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sc-gateway .wc_payment_method > label,
.sc-gateway .place-order {
  display: none;
}

/* Woo's box is the frame around the card iframe. Ours, so it does not read as a foreign panel
 * dropped into the middle of the step. */
.sc-gateway .payment_box {
  margin: 10px 0 0;
  padding: 0;
}

/* --- checkboxes --- */

.sc-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--r1);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.sc-check--on {
  border-color: var(--ink);
}

.sc-check:has(:focus-visible) {
  outline: 2px solid var(--accentText);
  outline-offset: 2px;
}

.sc-check__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1.5px solid var(--muted3);
  border-radius: 2px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--sc-on-accent);
}

.sc-check--on .sc-check__box {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--tint);
}

.sc-check__text {
  font-size: 14px;
  line-height: 1.45;
}

/* Borderless variant — the inline "Poistenie nechcem" opt-out. */
.sc-check--bare {
  align-self: flex-start;
  width: auto;
  align-items: center;
  gap: 9px;
  padding: 10px 2px;
  border-color: transparent;
  background: transparent;
  color: var(--muted3);
}

.sc-check--bare .sc-check__box {
  width: 16px;
  height: 16px;
  margin-top: 0;
  font-size: 11px;
}

.sc-check--bare .sc-check__text {
  font-size: 13px;
}

/* Consent checkbox in an error state. Colour is not the only cue: the box gains a ring and the
 * .sc-error message below it is what actually names the problem. */
.sc-check--error {
  border-color: var(--accentText);
  background: var(--accentTint);
}

.sc-check--error .sc-check__box {
  border-color: var(--accentText);
  border-width: 2px;
}

/* ==========================================================================
   6. FORMS
   ========================================================================== */

.sc-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.sc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sc-field--wide {
  grid-column: 1 / -1;
}

.sc-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.sc-label__aside {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted3);
}

/* 48px tall and 16px text: the height is the design's, the font-size is what stops iOS zooming
 * the whole page on focus. Both matter at 50% mobile. */
.sc-input,
.sc-select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1.5px solid var(--sc-field-line);
  border-radius: var(--r1);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

.sc-select {
  padding: 0 11px;
  cursor: pointer;
}

.sc-input::placeholder {
  color: var(--muted3);
}

.sc-textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 13px;
  border: 1.5px solid var(--sc-field-line);
  border-radius: var(--r1);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}

/* Error state. Three independent cues, none of them colour: a doubled border weight, the
 * ⚠ glyph on the message, and the message text itself (which the field points at with
 * aria-describedby). tokens.css already recolours [aria-invalid="true"]. */
.sc-input[aria-invalid="true"],
.sc-select[aria-invalid="true"],
.sc-textarea[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--accentText);
}

.sc-error {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accentText);
}

.sc-error::before {
  content: "\26A0";
  flex: 0 0 auto;
  font-weight: 700;
}

.sc-error--lg {
  font-size: 13px;
}

/* 🔴 WooCommerce's own queued notices, rendered as TEXT by `Shell::wooNotice()`.
 *
 * It only ever appears on the render AFTER a full-page reload — WooCommerce forces one whenever
 * it registers a customer, which this checkout does on every first order, and it withholds the
 * failure message from the AJAX response when it does. So the one time this box is on screen is
 * the one time the customer has been thrown back to step 1 with no idea why. It sits above the
 * step indicator for that reason, and it is not `hidden`-toggled: `Shell` renders nothing at all
 * when there is nothing to say, so there is no empty box to collapse. */
.sc-woonotice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-hint {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted3);
}

/* Composite field: country prefix select + number input behave as one control, so the focus
 * ring is drawn on the wrapper. outline-offset is negative because the wrapper clips. */
.sc-inputgroup {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1.5px solid var(--sc-field-line);
  border-radius: var(--r1);
  background: var(--surface);
  overflow: hidden;
}

.sc-inputgroup:focus-within {
  outline: 2px solid var(--accentText);
  outline-offset: -3px;
}

.sc-inputgroup[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--accentText);
}

.sc-inputgroup__pre {
  width: 92px;
  flex: 0 0 auto;
  height: 48px;
  padding: 0 4px 0 10px;
  border: none;
  border-right: 1px solid var(--line);
  background: var(--surface2);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}

.sc-inputgroup__field {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

/* Segmented control — Súkromná osoba / Firma. */
.sc-seg {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  border: 1.5px solid var(--sc-field-line-strong);
  border-radius: var(--r1);
  overflow: hidden;
}

.sc-seg__btn {
  min-height: 44px;
  padding: 0 20px;
  border: none;
  background: transparent;
  color: var(--muted3);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.sc-seg__btn--on {
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

/* The ring would be clipped by the wrapper's overflow, so it is drawn inside. */
.sc-seg__btn:focus-visible {
  outline: 2px solid var(--accentText);
  outline-offset: -3px;
}

/* Autocomplete dropdown under the street field. */
.sc-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  box-shadow: 0 16px 34px var(--sc-shadow-2);
}

.sc-field--anchor {
  position: relative;
}

.sc-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--r1);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sc-suggest__item--active {
  background: var(--surface2);
}

.sc-suggest__main {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.sc-suggest__sub {
  font-size: 12px;
  color: var(--muted3);
}

.sc-suggest__main,
.sc-suggest__sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-suggest__credit {
  display: flex;
  justify-content: flex-end;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted3);
}

/* ==========================================================================
   7. BUTTONS, BADGES, LINKS
   ========================================================================== */

.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: var(--r1);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.sc-btn--primary {
  background: var(--accentSolid);
  border-color: var(--accentSolid);
  color: var(--sc-on-accent);
}

.sc-btn--primary:hover {
  background: var(--accentSolidHover);
  border-color: var(--accentSolidHover);
}

.sc-btn--secondary {
  border-color: var(--ink);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding: 0 22px;
}

.sc-btn--secondary:hover {
  background: var(--surface2);
}

/* Disabled "Späť" on step 1. Not colour alone — the cursor and the disabled attribute both
 * carry the state, and screen readers get it from the attribute. */
.sc-btn:disabled,
.sc-btn[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--muted3);
  background: transparent;
  cursor: not-allowed;
}

.sc-btn--sm {
  min-height: 44px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 600;
}

.sc-btn--block {
  width: 100%;
}

.sc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.sc-link {
  color: var(--accentText);
  text-decoration: none;
  font-weight: 600;
}

.sc-link:hover {
  text-decoration: underline;
}

/* Promo / saving badge — "ušetríte 10 %", and the larger "Objednávka prijatá". */
.sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--r1);
  background: var(--tint);
  color: var(--accentText);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sc-badge--lg {
  padding: 7px 12px;
  border-width: 1.5px;
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   8. SUMMARY PANEL + STICKY BAR
   --------------------------------------------------------------------------
   Mobile (base): the summary is a normal block below the form, and the sticky bottom bar
   carries the total plus the continue button. Desktop (>= 900px): the summary becomes the
   right-hand column and sticks below the header; the bottom bar is removed.
   ========================================================================== */

.sc-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Step 5 has no summary — the confirmation restates everything. */
.sc-summary--hidden {
  display: none;
}

.sc-summary__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  overflow: hidden;
}

.sc-summary__photo {
  height: 132px;
  background-color: var(--surface2);
  background-size: cover;
  background-position: center;
}

.sc-summary__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 17px 18px;
}

.sc-summary__block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sc-summary__block--tight {
  gap: 3px;
}

.sc-summary__block--divided {
  border-top: 1px solid var(--sc-divider);
  padding-top: 12px;
}

.sc-summary__unit {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.sc-summary__dims {
  font-family: var(--sc-font-mono);
  font-size: 12px;
  color: var(--muted3);
}

.sc-summary__place {
  font-size: 14px;
  font-weight: 600;
}

.sc-summary__addr {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted3);
}

.sc-summary__note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted3);
}

/* Label / value row, used for every line of the summary. */
.sc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sc-row__label {
  font-size: 13px;
  color: var(--muted3);
}

.sc-row__value {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sc-row--promo .sc-row__label {
  color: var(--accentText);
  font-weight: 600;
}

.sc-row--promo .sc-row__value {
  color: var(--accentText);
  font-weight: 700;
}

.sc-row--sm .sc-row__label,
.sc-row--sm .sc-row__value {
  font-size: 12px;
  color: var(--muted3);
}

.sc-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1.5px solid var(--ink);
  padding-top: 12px;
}

.sc-total__label {
  font-size: 14px;
  font-weight: 700;
}

.sc-total__value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.sc-recurring {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid var(--sc-divider);
  padding-top: 12px;
}

.sc-recurring__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
}

.sc-recurring__value {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* --- sticky bottom bar (mobile) --- */

.sc-sticky {
  position: sticky;
  bottom: 0;
  /* `.sc-root` is a flex column that is at least a viewport tall. On a step whose content is
   * SHORTER than the screen this pushes the bar onto the bottom edge instead of leaving it
   * floating in the middle of the grey ground. It resolves to 0 whenever there is no free
   * space, so it costs nothing on a long step. */
  margin-top: auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -6px 18px var(--sc-shadow-2);
}

.sc-sticky__figure {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
}

.sc-sticky__label {
  font-size: 11px;
  color: var(--muted3);
}

.sc-sticky__price {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sc-sticky__cta {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
}

/* ==========================================================================
   9. CONFIRMATION
   ========================================================================== */

.sc-done {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sc-done__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-title--done {
  font-size: clamp(28px, 20px + 3.2vw, 32px);
}

.sc-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.sc-fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 15px 16px;
}

.sc-fact__value {
  font-family: var(--sc-font-mono);
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sc-fact__value--text {
  font-family: var(--sc-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.sc-paysum {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
}

.sc-paysum__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface2);
}

.sc-paysum__method {
  font-size: 12px;
  color: var(--muted3);
}

.sc-paysum__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.sc-paysum__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.sc-paysum__cell:last-child {
  border-bottom: none;
}

.sc-paysum__amount {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sc-paysum__amount--muted {
  color: var(--ink2);
}

.sc-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.sc-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  flex: 1 1 420px;
  min-width: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--r2);
  padding: 18px;
}

.sc-card--accent {
  flex: 1 1 300px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  border-color: var(--accent);
  background: var(--tint);
}

.sc-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
}

.sc-card__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sc-card--accent .sc-card__title {
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--accentText);
}

.sc-card__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink2);
}

.sc-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

/* App screenshot beside the iLOQ card. */
.sc-shot {
  width: 104px;
  height: 207px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: var(--surface2);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.sc-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.sc-help__text {
  font-size: 14px;
  color: var(--muted3);
}

.sc-help__phone {
  font-size: 16px;
  font-weight: 700;
}

.sc-help__hours {
  font-size: 13px;
  color: var(--muted3);
}

/* ==========================================================================
   10. BREAKPOINTS
   --------------------------------------------------------------------------
   Mobile is the base. These only add.
   ========================================================================== */

/* THE LADDER, and why each rung is where it is. Every number below was measured on the live
 * page at 360 / 390 / 414 / 600 / 768 / 834 / 1024 / 1180 / 1280 / 1440 / 1920.
 *
 *   < 600   phone. Card is full-bleed and square-cornered; 16px gutters; one column; the
 *           sticky bar carries the CTA.
 *   >= 600  the card gains the grey ground around it and 32px gutters. The header's padding
 *           moves WITH the layout's — see `.sc-header`, they must never disagree.
 *   >= 660  the tablet band, and the rung that did not exist. Still one column, because the
 *           form needs ~440px and a 330px rail plus gutters costs 422px — two columns do not
 *           fit until ~900. But the SUMMARY must stop stretching: at 768 and 834 its card ran
 *           the full 704/770px of the content column, throwing "Nástup" and "4. septembra
 *           2026" to opposite ends of a 700px line. It becomes two columns inside one card.
 *   >= 900  two columns. The rail is 300px here, not the design's 330: at 1024 a 330px rail
 *           left the form 562px against the design's 756, and the form is the part being
 *           filled in.
 *   >= 1180 the design's own proportions — 330px rail, 758px form, which is the prototype's
 *           756px to within a border width.
 */

/* Roomier phones and tablets: the design's desktop padding and type sizes, still one column. */
@media (min-width: 600px) {
  /* 🔴 Tracks `.sc-layout` below. If you change one, change the other. */
  .sc-header {
    padding: 18px 32px;
  }

  .sc-layout {
    padding: 26px 32px 40px;
  }

  .sc-steps {
    gap: 22px;
  }

  .sc-steps__label {
    display: inline;
    font-size: 14px;
  }

  .sc-fields {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .sc-options--wide {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .sc-facts {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .sc-paysum__grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .sc-paysum__cell {
    border-bottom: none;
    border-right: 1px solid var(--line);
  }

  .sc-paysum__cell:last-child {
    border-right: none;
  }
}

/* ── the tablet band ──────────────────────────────────────────────────────────────────────
 *
 * 660-899px: one column, but the summary card is split in two so it fills the width instead
 * of being stretched by it. The left half is what you are renting, the right half is what it
 * costs. Below 660 there is not enough width for two readable halves and it stays stacked.
 *
 * The split is by CLASS, not by `:nth-child`: the promo badge between the depot block and the
 * date rows is conditional, so any index-based rule would move the wrong element the moment a
 * promotion is running. If `Shell::summary()` ever adds a block, it lands in the left column
 * (the default) — which is the safe side to fail towards.
 */
@media (min-width: 660px) and (max-width: 899px) {
  .sc-summary__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    /* `dense` is load-bearing: without it the second column's first item is placed AFTER the
     * last row the cursor reached in column one, and the money half starts halfway down. */
    grid-auto-flow: row dense;
    align-content: start;
    column-gap: 32px;
    row-gap: 14px;
    padding: 18px 20px 20px;
  }

  .sc-summary__body > * {
    grid-column: 1;
  }

  .sc-summary__body > [data-summary-rows],
  .sc-summary__body > .sc-total,
  .sc-summary__body > .sc-recurring,
  .sc-summary__body > .sc-summary__note {
    grid-column: 2;
  }

  /* The first item in each column must not draw a divider against the top of the card. */
  .sc-summary__body > [data-summary-rows] {
    border-top: none;
    padding-top: 0;
  }
}

/* Two columns. The summary becomes the right rail and the bottom bar goes away. */
@media (min-width: 900px) {
  .sc-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  /* Step 5: no summary, so the confirmation gets the full width. */
  .sc-layout--single {
    grid-template-columns: minmax(0, 1fr);
  }

  .sc-summary {
    position: sticky;
    /* Clears the ground's own top padding so the card does not touch the viewport edge. */
    top: 20px;
  }

  .sc-sticky {
    display: none;
  }
}

/* The design's proportions, once there is room for them. */
@media (min-width: 1180px) {
  .sc-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

/* ==========================================================================
   11. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .sc-option,
  .sc-chip,
  .sc-check,
  .sc-btn,
  .sc-input,
  .sc-select,
  .sc-textarea,
  .sc-seg__btn {
    transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-root,
  .sc-root * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   12. DARK THEME — PROVISIONAL
   --------------------------------------------------------------------------
   🔴 PROVISIONAL. Token redefinitions ONLY — no layout, no sizing, nothing else may go in
   this block. Swapping in Tibor's confirmed values must stay a one-place change.

   The values below are NOT invented: they are lifted from the `dark` object inside
   `themeVars()` in v13/export-objednavka-standalone.html, which the prototype's Svetlá/Tmavá
   toggle actually renders. tokens.css states the dark theme was unrecoverable; that comment
   predates this find and should be revisited. Two roles are still ours, marked [ours] — they
   have no counterpart in the export and need Tibor to confirm.

   The supplementary tokens in section 2 derive from --ink / --surface and so follow this block
   automatically. Only --sc-on-accent needs restating: --surface is a dark teal here, but the
   filled orange button still needs white on it.

   The public site stores the choice on <html data-theme>. An explicit light choice wins over
   a dark operating system, and an explicit dark choice wins over a light one.
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sc-root {
    --ink: #EEF3F1;
    --ink2: #C6D3D1;
    --muted3: #829390;

    --surface: #0D2C31;
    --surface2: #12343A;
    --tint: #37210F;

    --line: #1E4147;

    --accent: #E05A00;
    --accentTint: rgba(224, 90, 0, 0.16); /* [ours] light is 0.06; too faint on a dark ground */
    --accentText: #FF9052;
    --accentSolid: #BC4B00;
    --accentSolidHover: #A84300;
    --sc-on-accent: #FFFFFF;
  }
}

:root[data-theme="dark"] .sc-root {
  --ink: #EEF3F1;
  --ink2: #C6D3D1;
  --muted3: #829390;
  --surface: #0D2C31;
  --surface2: #12343A;
  --tint: #37210F;
  --line: #1E4147;
  --accent: #E05A00;
  --accentTint: rgba(224, 90, 0, 0.16);
  --accentText: #FF9052;
  --accentSolid: #BC4B00;
  --accentSolidHover: #A84300;
  --sc-on-accent: #FFFFFF;
}

/*
 * The SERVER-rendered failure message — `Route::renderShell()` emits `.sc-fallback` instead of
 * the shell when the unit is missing, sold, or the id is unparseable.
 *
 * 🔴 It had NO RULE AT ALL until now, and neither did `.sc-fatal` until 2026-09-04. Both are
 * the same class of miss: the error path is the one screen nobody looks at while building, and
 * it is the screen a customer meets at the exact moment they are deciding whether this company
 * can be trusted with a card number. Unstyled, it rendered as 16px browser-default text flush
 * against the top-left of a grey page, with the "go back" link as a blue underline.
 *
 * Deliberately NOT inside `.sc-frame`: there is no frame on this path, so it carries its own
 * card. Styled from tokens like everything else, so it survives both themes.
 */
.sc-fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  max-width: 34rem;
  margin: 48px auto;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  color: var(--ink);
}

.sc-fallback__title {
  font-size: clamp(22px, 18px + 1.4vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.sc-fallback__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted3);
}

/* The same shape as `.sc-btn--primary`. It is the only way out of this screen, so it must not
 * read as a lesser control than the CTA the customer was expecting. */
.sc-fallback__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: var(--r1);
  background: var(--accentSolid);
  color: var(--sc-on-accent);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.sc-fallback__cta:hover {
  background: var(--accentSolidHover);
}

/*
 * The boot-failure message. `render()` replaces the whole shell with this when the payload is
 * missing or unparseable — so it is the ONE thing on screen at the moment everything else has
 * failed, and it carries the phone number. It had no rule at all until 2026-09-04: it would
 * have rendered as unstyled 16px text against the page background, at exactly the moment a
 * customer is deciding whether this company can be trusted with a card number.
 *
 * Styled from tokens like everything else, so it survives both themes.
 */
.sc-fatal {
  max-width: 34rem;
  margin: 32px auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r2);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
}

/*
 * 🔴 WooCommerce's saved-payment-methods list draws a BULLET inside our panel.
 *
 * Seen in a screenshot of the mounted card form, 2026-09-07: `.woocommerce-SavedPaymentMethods-new`
 * computes `list-style-type: circle`, so "Použiť novú platobnú metódu" renders with a stray ○
 * hanging off it — the only bulleted thing anywhere in a checkout that has no lists.
 *
 * The theme's reset does not reach it because the element is injected AFTER first paint, and
 * `.sc-root ul` would not have covered it either: the marker is on the `<li>`.
 */
.sc-root .woocommerce-SavedPaymentMethods,
.sc-root .woocommerce-SavedPaymentMethods li,
.sc-root .wc_payment_methods,
.sc-root .wc_payment_methods > li {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

/*
 * 🔴 THE PHONE NUMBER ON THIS SCREEN IS THE ONLY WAY OUT, AND IT MUST BE TAPPABLE.
 *
 * Rendered in a browser for the first time on 2026-09-07 — the screen itself was fine (contrast
 * 16.91, 16px, fits a 375×667 iPhone SE above the fold with no horizontal scroll) but the number
 * was PLAIN TEXT. Half of orders come from a phone, and this is the one screen whose whole
 * purpose is reaching a human: a number you have to memorise and retype is a customer lost at
 * the worst possible moment.
 *
 * `inline-block` with a 44px min-height rather than a bare inline link, because an inline link
 * on one text line is a ~19px tap target — under the 44px minimum, on the screen that can least
 * afford a missed tap. `underline` is kept: on an error screen the affordance has to be obvious
 * without hovering, and colour alone is not one.
 */
.sc-fatal a[href^="tel:"] {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Shared company search and payment pictograms. */
.sc-company-results{display:grid;gap:8px;margin:12px 0}
.sc-company-result{padding:12px;text-align:left;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font:inherit}
.sc-company-result:hover,.sc-company-result:focus-visible{background:var(--surface2);outline:2px solid var(--accent);outline-offset:2px}
.sc-payment-icon{flex:none;margin-right:8px;vertical-align:middle}

.sc-phone-control{display:flex;gap:8px}.sc-phone-control .sc-select{width:130px;flex:none}.sc-phone-control .sc-input{min-width:0;flex:1}

/* Shared company combobox. B is the default; the theme specimen also exposes A/C. */
.sc-root .sc-company-search-anchor { position: relative; }
.sc-root .sc-company-cue { float: right; font-size: .75em; color: var(--accent); }
.sc-root .sc-company-panel { position: relative; z-index: 5; padding: 12px; border: 2px solid var(--accent); border-radius: 8px; background: var(--surface2); color: var(--ink); }
.sc-root .sc-company-panel[hidden] { display: none; }
.sc-root .sc-company-heading { margin: 0 0 8px; font-weight: 600; }
.sc-root .sc-company-panel .sc-company-results { margin: 0; max-height: 280px; overflow-y: auto; }
.sc-root .sc-company-result { display: grid; gap: 4px; width: 100%; }
.sc-root .sc-company-result[aria-selected="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
.sc-root [data-company-variant="b"] .sc-company-panel { position: absolute; top: calc(100% + 6px); inset-inline: 0; }
.sc-root [data-company-search] { border-color: var(--accent); }

.sc-root .sc-wallets { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.sc-root [data-wallet-mount] { min-height: 48px; }
.sc-root .sc-invoice { margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.sc-root .sc-invoice details { margin-top: 16px; }
.sc-root .sc-invoice summary { cursor: pointer; }
.sc-root .sc-invoice__document { width: 100%; height: 600px; border: 0; }

/* Compact secondary action, retaining a full touch target. */
.sc-root .sc-date-edit{display:inline-flex;align-items:center;min-height:44px;padding:4px 0;border:0;background:transparent;color:var(--accentText);font:inherit;font-size:14px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.sc-root [data-bind="dateEdit"]{text-align:right}
.sc-root .sc-company-billing>h3{font-size:16px;margin:0 0 16px}
