/* Checkout: one focused vertical action column on the left (buyer details,
   optional custom fields, consent and payment) beside a compact sticky order
   summary on the right. Below 60rem the summary stacks above the form so the
   buyer confirms what they are buying before entering their details. */
.checkout {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  inline-size: 100%;
  margin-inline: auto;
  max-inline-size: var(--column-content);
}

/* Enclosed checkout funnel: keep the brand and back-to-event link in the
   header, and hide top-level site navigation links that pull buyers away. */
body:has(.checkout) .site-header__menu,
body:has(.checkout) .site-header__toggle {
  display: none;
}

.site-main:has(.checkout) {
  padding-block-start: var(--space-m);
}

/* Pair email beside optional phone on wider viewports so the entire standard
   checkout — including the primary payment CTA — fits above the fold. */
.checkout__contact-row {
  display: grid;
  gap: var(--space-s);
}

@media (min-width: 36rem) {
  .checkout__contact-row:has(> :nth-child(2)) {
    align-items: start;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}

.checkout__reassurance {
  border-block-start: var(--border-width) solid var(--color-subtle);
  color: var(--color-muted);
  display: flex;
  flex-direction: column;
  font-size: var(--step--2);
  gap: var(--space-2xs);
  padding-block-start: var(--space-s);

  li {
    align-items: center;
    display: flex;
    gap: var(--space-2xs);
  }

  .icon {
    --icon-size: 0.95rem;
    flex-shrink: 0;
  }
}

@media (min-width: 60rem) {
  .checkout {
    align-items: start;
    display: grid;
    gap: var(--space-s) var(--space-l);
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24.5rem);
    max-inline-size: 66rem;
  }

  .checkout__head {
    grid-column: 1 / -1;
  }

  .checkout__form {
    grid-column: 1;
    grid-row: 2;
  }

  .checkout__summary {
    grid-column: 2;
    grid-row: 2;
    inset-block-start: calc(var(--header-height) + var(--space-s));
    position: sticky;
  }
}

/* What a returned checkout got wrong (orders/_error_summary): a list, so the
   icon sits at its top, of links tall enough to tap (WCAG 2.5.8) */
.checkout__errors {
  align-items: start;

  a {
    display: inline-block;
    padding-block: var(--space-3xs);
  }
}
