/* =====================================================
   Commerce — Cart, Checkout, Order Confirmation
   Matches design-mockup.html pages 3, 4, 5, 6.
   ===================================================== */

/* ════════════════════════════════════════════════════════
   CART HEADER DROPDOWN
   Dropdown panel that expands when clicking the cart icon.
   Commerce JS uses slideToggle() + .cart-block--contents__expanded.
   ════════════════════════════════════════════════════════ */

/* Dropdown panel — anchors to .cart--cart-block (position: relative).
   Use .cart--cart-block ancestor for higher specificity than Commerce's
   commerce_cart.theme.css (.cart-block--contents { width:225px }) which
   loads in a later CSS aggregate bundle.

   top: calc(100% + 20px):
     The header is 64px tall. The cart icon block (~36px) is vertically
     centered, leaving ~14px below it before the header ends. Using 20px
     offset ensures the dropdown starts clearly BELOW the header bottom,
     preventing the dark header background from overlapping the panel top.

   right: auto; left: 0:
     Aligns the dropdown's LEFT edge with the cart block's left edge so it
     extends rightward, staying within the viewport even when the cart block
     is narrow (68px). right:0 would extend it 340-68=272px to the LEFT,
     going off-screen on narrower viewports. */
.cart--cart-block .cart-block--contents {
  position: absolute !important;
  top: calc(100% + 20px) !important;
  right: 0 !important;
  z-index: 600 !important;
  width: 360px !important;
  max-width: min(360px, calc(100vw - 16px)) !important;
  background: var(--color-surface) !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden !important;
}

/* Override Commerce's padding:10px on inner */
.cart--cart-block .cart-block--contents__inner {
  display: flex !important;
  flex-direction: column;
  padding: 0 !important;
}

/* ── Items area ── */
.cart--cart-block .cart-block--contents__items {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

/* Commerce cart block view wrapper — remove default spacing */
.cart--cart-block .cart-block--contents__items .cart.cart-block,
.cart--cart-block .cart-block--contents__items .views-element-container,
.cart--cart-block .cart-block--contents__items .view-commerce-cart-block {
  padding: 0 !important;
  margin: 0 !important;
}

/* Convert table to block layout so rows can use flexbox */
.cart--cart-block .cart-block--contents__items .views-table {
  display: block !important;
  width: 100% !important;
}

.cart--cart-block .cart-block--contents__items .views-table thead {
  display: none !important;
}

.cart--cart-block .cart-block--contents__items .views-table tbody {
  display: block !important;
  width: 100% !important;
}

/* Each row = one order item */
.cart--cart-block .cart-block--contents__items .views-table tbody tr {
  display: flex !important;
  align-items: center !important;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.12s;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cart--cart-block .cart-block--contents__items .views-table tbody tr:last-child {
  border-bottom: none;
}

.cart--cart-block .cart-block--contents__items .views-table tbody tr:hover {
  background: var(--color-surface-alt);
}

/* Each <td> — flex item, no table-cell */
.cart--cart-block .cart-block--contents__items .views-table tbody td {
  display: block !important;
  padding: 0 !important;
  border: none;
  font-size: var(--font-sm);
  /* Do NOT set white-space: nowrap here — individual fields control wrapping */
  min-width: 0;
  box-sizing: border-box;
}

/* Quantity: "1 x" — muted, fixed-width, no shrink */
.cart--cart-block .cart-block--contents__items .views-field-quantity {
  color: var(--color-text-muted);
  flex-shrink: 0;
  width: 28px;
  min-width: 28px;
  white-space: nowrap;
}

/* Title + Event info column — fills remaining space, stacks vertically */
.cart--cart-block .cart-block--contents__items .views-field-title {
  flex: 1 1 0;
  min-width: 0;
  /* Children (seat name line + event line) stack vertically */
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

/* Seat name anchor — single line, truncate with ellipsis */
.cart--cart-block .cart-block--contents__items .views-field-title a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--color-primary) !important;
  text-decoration: none;
  line-height: 1.3;
}

.cart--cart-block .cart-block--contents__items .views-field-title a:hover {
  color: var(--color-accent) !important;
}

/* Event name — second line under the seat title, muted, truncate */
.cart--cart-block .cart-block--contents__items .views-field.views-field-field-event {
  /* Remove from row flex flow — it lives inside views-field-title via JS reorder
     OR, if Drupal renders it as a separate <td>, keep it in the row but hide it
     and instead show it as a sub-line. Since it IS a separate <td> in the row,
     we make it a narrow muted label that also truncates. */
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 120px;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  align-self: center;
}

.cart--cart-block .cart-block--contents__items .views-field.views-field-field-event a {
  color: var(--color-text-muted) !important;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Price — right-aligned, bold, fixed width so it never gets squeezed */
.cart--cart-block .cart-block--contents__items .views-field-total-price__number {
  font-weight: 700 !important;
  color: var(--color-primary) !important;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
  min-width: 48px;
}

/* ── Empty cart state inside dropdown ── */
.cart-block--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 20px;
  text-align: center;
}

.cart-block--empty__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fce4ec 0%, #f8f9fa 100%);
  border: 1.5px solid #f8bbd0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--color-accent);
}

.cart-block--empty__title {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin: 0;
}

.cart-block--empty__sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0 0 6px;
}

.cart-block--empty p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.cart-block--browse-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.cart-block--browse-link:hover {
  text-decoration: underline;
}

/* ── Footer: View Cart + Checkout buttons ── */
.cart--cart-block .cart-block--contents__links {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-block--btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: var(--font-sm);
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}

/* Primary: Proceed to Checkout */
.cart-block--btn--primary {
  background: var(--color-accent);
  color: white !important;
  border-color: var(--color-accent);
}

.cart-block--btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: white !important;
}

/* Secondary: View Cart */
.cart-block--btn--secondary {
  background: transparent;
  color: var(--color-primary) !important;
  border-color: var(--color-border);
}

.cart-block--btn--secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
}

/* ── Cart dropdown — responsive positioning ── */

/* Medium screens: flip to right-aligned so it doesn't overflow left */
@media (max-width: 1100px) {
  .cart--cart-block .cart-block--contents {
    left: auto !important;
    right: 0 !important;
    max-width: min(360px, calc(100vw - 32px)) !important;
    width: 360px !important;
  }
}

/* Mobile: full-width fixed panel below header */
@media (max-width: 768px) {
  .cart--cart-block .cart-block--contents {
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
  }

  .cart--cart-block .cart-block--contents__items {
    max-height: 50vh;
  }
}

/* ════════════════════════════════════════════════════════
   CART PAGE
   ════════════════════════════════════════════════════════ */

/* ── Two-column layout ──────────────────────────────── */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 32px 0 56px;
  max-width: var(--max-width-content);
  margin-inline: auto;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* Grid children: min-width:0 lets them shrink below intrinsic content width */
.cart-table-col,
.cart-summary-col {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Tablet (≤ 1024px): shrink sidebar so the seats column stays comfortable */
@media (max-width: 1024px) {
  .cart-layout {
    grid-template-columns: 1fr 220px;
    gap: 20px;
  }
}

/* Mobile (≤ 768px): single column — Order Summary moves above seats */
@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0 40px;
  }

  .cart-summary-col {
    order: -1;
  }

  .cart-summary-col .order-summary,
  .cart-summary-col .cart-order-summary {
    padding: 16px;
  }

  /* Card layout (≤ 560px) replaces horizontal scroll — no overflow-x needed */
  .cart-items-card {
    overflow-x: visible;
  }

  .cart-section-header__title {
    font-size: var(--font-md);
  }
}

/* ── Left column internals ──────────────────────────── */

/* ── SELECTED SEATS — section header unified with the table card ──
   Header is the top portion (no bottom border), card is the body.
   They form one visual box — no gap between them. */
.cart-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  margin-bottom: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.cart-section-header__title {
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

/* Card wrapper — bottom portion, top corners flat to meet the header */
.cart-items-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Remove bottom margin from views-form so the table flows into the card */
.cart-table-col .views-form {
  margin: 0;
}

/* The form element — no extra spacing */
.cart-table-col form {
  margin: 0;
}

/* ── Cart items table ── */

/* Commerce cart form wrapper */
.view-commerce-cart-form {
  margin: 0;
  padding: 0;
}

/* Hide quantity column — seats are always qty 1 */
.view-commerce-cart-form th.views-field-edit-quantity,
.view-commerce-cart-form td.views-field-edit-quantity {
  display: none;
}

/* Table resets */
.cart-table,
.views-table.views-view-table {
  width: 100%;
  border-collapse: collapse;
}

/* Column headers */
.cart-table th,
.views-table th {
  text-align: left;
  font-size: var(--font-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  padding: 12px 20px;
  background: var(--color-surface-alt);
  border-bottom: 2px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Table cells */
.cart-table td,
.views-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-sm);
  vertical-align: middle;
}

/* Last row — no bottom border */
.cart-table tbody tr:last-child td,
.views-table tbody tr:last-child td {
  border-bottom: none;
}

/* Row hover */
.views-table tbody tr:hover {
  background: var(--color-surface-alt);
  transition: background var(--transition-fast);
}

/* Product title link */
.views-table .views-field-title a,
.views-table .field--name-title a {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.views-table .views-field-title a:hover,
.views-table .field--name-title a:hover {
  color: var(--color-accent);
}

/* Price cells — bold, accent, right-aligned */
.views-table .views-field-unit-price__number,
.views-table .views-field-unit-price,
.views-table .views-field-total-price {
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  font-size: var(--font-md);
  white-space: nowrap;
  text-align: right;
}

/* Remove column */
.views-table .views-field-edit-delete {
  width: 80px;
  text-align: center;
}

.views-table .views-field-edit-delete input[type="submit"],
.views-table .views-field-edit-delete button,
.views-table .views-field-edit-delete a {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--font-sm);
  font-family: var(--font-family);
  text-decoration: underline;
  padding: 0;
  transition: color var(--transition-fast);
}

.views-table .views-field-edit-delete input[type="submit"]:hover,
.views-table .views-field-edit-delete button:hover,
.views-table .views-field-edit-delete a:hover {
  color: var(--color-accent);
}

/* ── Cart table — Commerce cart form view ───────────────
   Selector covers cols-3 (legacy) and cols-4 (current: Seat/Event/Price/Remove).
   Strips Drupal/Olivero chrome and applies design tokens.
   ──────────────────────────────────────────────────────── */

.views-table.cols-3,
.views-table.cols-4 {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  margin: 0;
}

/* ── Headers ── */
.views-table.cols-3 thead th,
.views-table.cols-4 thead th {
  background: var(--color-surface-alt);
  padding: 10px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
  /* NOTE: removed padding-inline-start: var(--sp1) — Drupal token is undefined
     in this theme, causing left padding to collapse to 0 and misalign with
     tbody cells which use the design-token padding (10px 20px). */
}

.views-table.cols-3 thead .views-field-unit-price__number,
.views-table.cols-4 thead .views-field-unit-price__number {
  text-align: right;
}

.views-table.cols-3 thead .views-field-remove-button,
.views-table.cols-4 thead .views-field-remove-button {
  text-align: center;
  width: 72px;
}

/* ── Cells ── */
.views-table.cols-3 tbody td,
.views-table.cols-4 tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-sm);
  vertical-align: middle;
}

.views-table.cols-3 tbody tr:last-child td,
.views-table.cols-4 tbody tr:last-child td {
  border-bottom: none;
}

.views-table.cols-3 tbody tr:hover td,
.views-table.cols-4 tbody tr:hover td {
  background: var(--color-surface-alt);
}

/* ── SEAT column (title) — section badge + seat code ── */
.views-table.cols-3 .views-field-title,
.views-table.cols-4 .views-field-title {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  letter-spacing: 0.02em;
  /* Allow wrapping on narrow screens to avoid forced horizontal scroll */
  white-space: normal;
  word-break: break-word;
}

/* Style the text as "SECTION · CODE" — the variation title already contains
   this format (e.g. "GENERAL · Seat E-08"), so we just make it look clean */
.views-table.cols-3 .views-field-title a,
.views-table.cols-4 .views-field-title a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
}

/* ── EVENT column — linked event name, truncate on small screens ── */
.views-table.cols-4 .views-field-field-event {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

.views-table.cols-4 .views-field-field-event a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.views-table.cols-4 .views-field-field-event a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ── PRICE column — right-aligned, accent ── */
.views-table.cols-3 .views-field-unit-price__number,
.views-table.cols-4 .views-field-unit-price__number {
  text-align: right;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  font-size: var(--font-lg);
  white-space: nowrap;
}

/* ── REMOVE column — strip all Drupal/Olivero button chrome ── */
.views-table.cols-3 .views-field-remove-button,
.views-table.cols-4 .views-field-remove-button {
  width: 72px;
  text-align: center;
}

.views-table.cols-3 .views-field-remove-button .button,
.views-table.cols-3 .views-field-remove-button .button--danger,
.views-table.cols-3 .views-field-remove-button input[type="submit"],
.views-table.cols-3 .views-field-remove-button button,
.views-table.cols-4 .views-field-remove-button .button,
.views-table.cols-4 .views-field-remove-button .button--danger,
.views-table.cols-4 .views-field-remove-button input[type="submit"],
.views-table.cols-4 .views-field-remove-button button {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--color-text-muted) !important;
  cursor: pointer;
  font-size: var(--font-sm);
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  padding: 4px 0 !important;
  text-decoration: none;
  transition: color var(--transition-fast);
  outline: none;
  min-width: 0 !important;
  width: auto !important;
  display: inline !important;
  border-radius: 0 !important;
}

.views-table.cols-3 .views-field-remove-button .button:hover,
.views-table.cols-3 .views-field-remove-button .button--danger:hover,
.views-table.cols-3 .views-field-remove-button input[type="submit"]:hover,
.views-table.cols-3 .views-field-remove-button button:hover,
.views-table.cols-4 .views-field-remove-button .button:hover,
.views-table.cols-4 .views-field-remove-button .button--danger:hover,
.views-table.cols-4 .views-field-remove-button input[type="submit"]:hover,
.views-table.cols-4 .views-field-remove-button button:hover {
  color: var(--color-accent) !important;
  background: none !important;
  text-decoration: none;
}

/* ── Responsive: collapse Event column and tighten padding ── */
@media (max-width: 768px) {
  .views-table.cols-3 tbody td,
  .views-table.cols-4 tbody td {
    padding: 12px 12px;
  }

  .views-table.cols-3 thead th,
  .views-table.cols-4 thead th {
    padding: 10px 12px;
  }

  /* Hide Event column — seat code + price is enough on small screens */
  .views-table.cols-4 .views-field-field-event,
  .views-table.cols-4 thead .views-field-field-event {
    display: none;
  }

  /* Price column: slightly smaller so it doesn't crowd seat name */
  .views-table.cols-3 .views-field-unit-price__number,
  .views-table.cols-4 .views-field-unit-price__number {
    font-size: var(--font-md);
  }
}

/* ── Cart table → card layout on phones ────────────────────────────────
   Replaces the table with vertically-stacked seat cards from 560px down.
   Each <tr> becomes a 2-column grid: [seat info | remove button].
   ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  /* No horizontal scroll — cards fill full width */
  .cart-items-card {
    overflow-x: visible;
  }

  /* Convert <table> to block so children can use flex/grid */
  .views-table.cols-3,
  .views-table.cols-4 {
    display: block;
    width: 100%;
  }

  .views-table.cols-3 thead,
  .views-table.cols-4 thead {
    display: none;
  }

  .views-table.cols-3 tbody,
  .views-table.cols-4 tbody {
    display: block;
  }

  /* Each row is a 2-col grid: seat+price | remove */
  .views-table.cols-3 tbody tr,
  .views-table.cols-4 tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 2px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  .views-table.cols-3 tbody tr:hover,
  .views-table.cols-4 tbody tr:hover {
    background: var(--color-surface-alt);
  }

  .views-table.cols-3 tbody tr:last-child,
  .views-table.cols-4 tbody tr:last-child {
    border-bottom: none;
  }

  .views-table.cols-3 tbody td,
  .views-table.cols-4 tbody td {
    border: none;
    padding: 0;
    display: block;
  }

  /* Seat name — top-left, wraps */
  .views-table.cols-3 .views-field-title,
  .views-table.cols-4 .views-field-title {
    grid-column: 1;
    grid-row: 1;
    white-space: normal;
    font-size: var(--font-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    letter-spacing: 0.01em;
  }

  /* Event — already hidden at 600px */

  /* Price — bottom-left, accent */
  .views-table.cols-3 .views-field-unit-price__number,
  .views-table.cols-4 .views-field-unit-price__number {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: var(--font-md);
    color: var(--color-accent);
    font-weight: var(--font-weight-bold);
  }

  /* Remove — right column, spans both rows, vertically centered */
  .views-table.cols-3 .views-field-remove-button,
  .views-table.cols-4 .views-field-remove-button {
    grid-column: 2;
    grid-row: 1 / 3;
    width: auto;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  /* Generous touch target for remove button */
  .views-table.cols-3 .views-field-remove-button .button,
  .views-table.cols-3 .views-field-remove-button button,
  .views-table.cols-4 .views-field-remove-button .button,
  .views-table.cols-4 .views-field-remove-button button {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 4px !important;
  }
}

/* ── JS state helpers ── */

/* Footer-totals container is hidden once cart.js has moved its content */
.cart-footer-totals {
  /* Visible until JS runs */
}

.cart-footer-totals.js-moved {
  display: none;
}

/* Original form-actions are hidden; proxy button in sidebar handles checkout */
.form-actions.js-cart-actions-hidden {
  display: none;
}

/* ── Continue shopping link ── */

.cart-continue {
  margin-top: 16px;
}

.cart-continue__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cart-continue__link:hover {
  color: var(--color-accent);
}

/* ── Cart page: Order summary sidebar ── */

.order-summary,
.cart-order-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px 24px;
  overflow: hidden;
  /* Flex/grid children must be able to shrink */
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .order-summary,
  .cart-order-summary {
    position: static;
    /* Ensure totals text can wrap — no fixed column widths inside */
    word-break: break-word;
  }
}

/* Header row */
.order-summary__header {
  margin-bottom: 0;
}

.order-summary h3,
.cart-order-summary h3 {
  font-size: var(--font-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

/* Totals slot (populated by cart.js) */
.cart-summary__totals {
  padding: 0;
}

/* Commerce order total wrapper */
.cart-summary__totals .field--name-total-price {
  margin-bottom: 0;
}

/* ── Order total lines — Commerce uses .order-total-line-label / -value (hyphen) ── */
.order-total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 7px 0;
  font-size: var(--font-sm);
}

.order-total-line-label {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.order-total-line-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  white-space: nowrap;
  text-align: right;
}

/* Subtotal row — light separator above */
.order-total-line__subtotal {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 4px;
}

/* Grand total row — strong separator + prominent value */
.order-total-line__total {
  border-top: 2px solid var(--color-border);
  margin-top: 6px;
  padding-top: 12px;
  font-weight: var(--font-weight-bold);
}

.order-total-line__total .order-total-line-label {
  color: var(--color-primary);
  font-size: var(--font-md);
  font-weight: var(--font-weight-bold);
}

.order-total-line__total .order-total-line-value {
  font-size: var(--font-xl);
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

/* Summary rows (generic subtotal/total used by non-JS path) */
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-sm);
  padding: 8px 0;
}

.summary-total {
  border-top: 2px solid var(--color-border);
  margin-top: 12px;
  padding-top: 12px;
}

.summary-total strong {
  font-size: var(--font-xl);
  color: var(--color-accent);
}

/* ── Divider inside sidebar ── */

.cart-summary__divider {
  height: 1px;
  background: var(--color-border);
  margin: 20px 0;
}

/* ── Actions slot (proxy button injected by cart.js) ── */

.cart-summary__actions {
  /* Spacing provided by the divider above */
}

/* Proxy checkout button */
.btn--checkout-proxy {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-size: var(--font-lg);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family);
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: white;
  transition: background-color var(--transition-fast);
}

.btn--checkout-proxy:hover {
  background: var(--color-accent-hover);
}

/* The Commerce Checkout input[type=submit] (real, hidden by JS; also styled for no-JS) */
.cart-checkout-btn-wrapper {
  display: block;
}

.cart-checkout-btn-wrapper input[type="submit"],
#edit-checkout {
  width: 100%;
  display: block;
  padding: 14px 24px;
  font-size: var(--font-lg);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition-fast);
}

.cart-checkout-btn-wrapper input[type="submit"]:hover,
#edit-checkout:hover {
  background: var(--color-accent-hover);
}

/* Secure checkout note */
.secure-checkout-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* Secondary browse-events CTA */
.cart-summary__browse {
  margin-top: 16px;
  text-align: center;
}

.cart-summary__browse-link {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cart-summary__browse-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ── Empty cart state — styles moved to css/cart.css ── */

/* Large button variant (used on empty cart and elsewhere) */
.btn--lg {
  padding: 14px 32px;
  font-size: var(--font-lg);
}

/* ── Backward-compat wrapper ── */

.cart-wrapper {
  max-width: var(--max-width-content);
  margin-inline: auto;
  padding: var(--spacing-6) 32px;
}

/* Remove button (legacy class) */
.remove-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--font-sm);
  text-decoration: underline;
  padding: 0;
}

.remove-btn:hover {
  color: var(--color-accent);
}

/* Responsive — tighten padding and ensure full-width flex on small screens */
@media (max-width: 768px) {
  .cart-section-header {
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 12px 16px;
  }

  .cart-items-card {
    border-radius: 0 0 var(--radius) var(--radius);
    width: 100%;
    box-sizing: border-box;
  }

  .cart-table th,
  .views-table th,
  .cart-table td,
  .views-table td {
    padding: 12px 14px;
  }

  .order-summary,
  .cart-order-summary {
    padding: 16px;
    position: static;
    width: 100%;
    box-sizing: border-box;
  }

  /* Checkout button full-width and easy to tap */
  .btn--checkout-proxy,
  .cart-checkout-btn-wrapper input[type="submit"],
  #edit-checkout {
    padding: 16px 24px;
    font-size: var(--font-md);
  }

  /* Continue shopping link touch target */
  .cart-continue__link {
    padding: 10px 0;
    display: inline-flex;
  }
}

/* ════════════════════════════════════════════════════════
   CHECKOUT PAGE
   ════════════════════════════════════════════════════════ */

/* Checkout step indicator */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 32px;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}

.step.active {
  color: var(--color-accent);
}

.step.done {
  color: var(--seat-available);
}

.step__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
}

.step.active .step__num {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.step.done .step__num {
  background: var(--seat-available);
  color: white;
  border-color: var(--seat-available);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin: 0 4px;
}

.step-connector.done {
  background: var(--seat-available);
}

/* Checkout two-column layout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 32px;
  max-width: var(--max-width-content);
  margin-inline: auto;
}

@media (max-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* Checkout form heading */
.checkout-form h2 {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 20px;
}

/* Form field groups */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: var(--font-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-md);
  font-family: var(--font-family);
  transition: border-color var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Stripe redirect badge */
.stripe-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-top: 12px;
}

.stripe-logo {
  background: #635bff;
  color: white;
  font-size: 0.7rem;
  font-weight: var(--font-weight-bold);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Drupal Commerce checkout pane cards */
.checkout-pane {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-6);
  margin-bottom: var(--spacing-6);
}

.checkout-pane h2 {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-4);
  border-bottom: 1px solid var(--color-border);
}

/* Drupal Commerce primary submit button */
.form-actions .button--primary,
.form-actions .button {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 12px 32px;
  font-size: var(--font-md);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  font-family: var(--font-family);
}

.form-actions .button--primary:hover,
.form-actions .button:hover {
  background: var(--color-accent-hover);
}

/* ════════════════════════════════════════════════════════
   CHECKOUT FORM LAYOUT
   Custom template wraps main + footer in .layout-checkout-main-col
   so the sidebar height does not push row 1 taller than its content.

   Desktop (>900px):
     col 1 → .layout-checkout-main-col  (form panes + actions stacked)
     col 2 → .layout-region-checkout-secondary  (sticky order summary)

   Mobile (≤900px): single column, summary below form, footer last.
   ════════════════════════════════════════════════════════ */

/* ── Outer two-column grid ── */
.layout-checkout-form {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 32px 0 0;
  max-width: var(--max-width-content);
  margin-inline: auto;
  align-items: start;
}

/* ── Left column wrapper (main panes + footer stacked) ── */
.layout-checkout-main-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ── Main region (form panes) ── */
.layout-region-checkout-main {
  /* Override Commerce float-based layout */
  float: none !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Right column (order summary) ── */
.layout-region-checkout-secondary {
  /* Override Commerce float-based layout */
  float: none !important;
  width: 100% !important;
  position: sticky;
  top: 24px;
}

/* ── Footer (form actions) ── */
.layout-region-checkout-footer {
  /* Override Commerce float-based layout */
  float: none !important;
  width: 100% !important;
  clear: none !important;
}

@media (max-width: 900px) {
  .layout-checkout-form {
    grid-template-columns: 1fr;
    padding: 16px 0 40px;
  }
  .layout-region-checkout-secondary {
    position: static;
  }
}

/* ── Review pane cards (fieldsets) ── */
.layout-region-checkout-main > fieldset {
  background: var(--color-surface);
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Override Olivero's teal/slate legend background */
.layout-region-checkout-main > fieldset > legend.fieldset__legend {
  float: none !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--color-surface-alt) !important;
  color: var(--color-primary) !important;
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--color-border) !important;
  border-radius: 0 !important;
  font-size: inherit !important;
}

/* Span inside legend — section title row */
.layout-region-checkout-main > fieldset > legend .fieldset__label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 20px !important;
  font-size: var(--font-md) !important;
  font-weight: var(--font-weight-bold) !important;
  color: var(--color-primary) !important;
  background: var(--color-border) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Edit link in legend */
.checkout-review-edit-link {
  margin-left: auto;
  padding-left: 16px;
}

.checkout-review-edit-link a {
  font-size: var(--font-sm) !important;
  font-weight: var(--font-weight-medium) !important;
  color: var(--color-accent) !important;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.checkout-review-edit-link a:hover {
  text-decoration: underline;
  color: var(--color-accent-hover) !important;
}

/* Fieldset content wrapper */
.layout-region-checkout-main > fieldset > .fieldset__wrapper {
  padding: 20px !important;
  font-size: var(--font-sm);
  color: var(--color-primary);
  line-height: 1.7;
}

/* Contact info — email address */
#edit-review-contact-information .fieldset__wrapper {
  font-size: var(--font-md) !important;
  font-weight: var(--font-weight-medium) !important;
  color: var(--color-primary) !important;
}

/* Payment info — card label + icon */
.layout-region-checkout-main .field--name-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-md);
  margin-bottom: 4px;
}

.layout-region-checkout-main .field--name-expires {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

/* Billing address block */
.layout-region-checkout-main .field--name-billing-profile {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.layout-region-checkout-main .address p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--color-primary);
  line-height: 1.7;
}

/* ── Right column — order summary (desktop) ── */
.layout-region-checkout-secondary > h3 {
  font-size: var(--font-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0 0 12px;
}

/* ══════════════════════════════════════════════════════════
   CHECKOUT ORDER SUMMARY SIDEBAR
   Seat column: compact variation template → SECTION · Row · CODE
   Mobile ≤600px: converts 3-col table to stacked cards.
   ══════════════════════════════════════════════════════════ */

/* Order summary card */
.layout-region-checkout-secondary .checkout-pane-order-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* ── Mobile: unify "Order summary" h3 + card into one visual box ──
   At ≤900px the layout is single-column; the h3 sits directly above the
   card. Style .layout-region-checkout-secondary as the outer card shell,
   turning the h3 into a header row and removing the inner pane's duplicate
   border/shadow. These rules intentionally come AFTER the base rules above
   to win the cascade. */
@media (max-width: 900px) {
  .layout-region-checkout-secondary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  .layout-region-checkout-secondary > h3 {
    padding: 14px 20px;
    margin: 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.7rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  /* Strip double card from the inner pane — outer wrapper is the card */
  .layout-region-checkout-secondary .checkout-pane-order-summary {
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ── Seat items table (cols-3: Seat | Event | Price) ── */
.checkout-pane-order-summary .views-table {
  width: 100%;
  border-collapse: collapse;
}

/* Hide thead — columns are self-explanatory */
.checkout-pane-order-summary .views-table thead {
  display: none;
}

/* Hide quantity column (qty always 1) */
.checkout-pane-order-summary .views-table .views-field-quantity {
  display: none;
}

/* Cell baseline */
.checkout-pane-order-summary .views-table tbody td {
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  padding: 12px 14px;
  font-size: var(--font-sm);
}

.checkout-pane-order-summary .views-table tbody tr:last-child td {
  border-bottom: none;
}

.checkout-pane-order-summary .views-table tbody tr:hover td {
  background: var(--color-surface-alt);
}

/* Seat column */
.checkout-pane-order-summary .views-field-purchased-entity {
  width: 45%;
}

/* Compact seat-var-summary (from our Twig template) */
.seat-var-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  line-height: 1.4;
}

.seat-var-summary__section {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.seat-var-summary__sep {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.seat-var-summary__row {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

.seat-var-summary__code {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  font-family: monospace;
  letter-spacing: 0.04em;
}

/* Fallback: hide field labels if old variation template still renders */
.checkout-pane-order-summary .views-field-purchased-entity .field__label,
.checkout-pane-order-summary .views-field-purchased-entity .field--name-price {
  display: none;
}

/* Event column */
.checkout-pane-order-summary .views-field-field-event {
  color: var(--color-text-muted);
}

.checkout-pane-order-summary .views-field-field-event a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--font-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checkout-pane-order-summary .views-field-field-event a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Price column */
.checkout-pane-order-summary .views-field-total-price__number {
  text-align: right;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  font-size: var(--font-md);
  white-space: nowrap;
  vertical-align: top;
}

/* ── Mobile card layout (≤600px) ───────────────────────────
   Each row becomes a 2-col grid:
     col 1 (top): seat info    |  col 2 (top): price
     col 1-2 (bottom): event name (full width, muted)
   ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .checkout-pane-order-summary .views-table {
    display: block;
  }

  .checkout-pane-order-summary .views-table tbody {
    display: block;
  }

  .checkout-pane-order-summary .views-table tbody tr {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .checkout-pane-order-summary .views-table tbody td {
    border-bottom: none;
    padding: 0;
    max-width: none;
    width: auto !important;
  }

  /* Seat — top-left */
  .checkout-pane-order-summary .views-field-purchased-entity {
    grid-column: 1;
    grid-row: 1;
    padding: 12px 16px 4px;
    align-self: center;
  }

  /* Price — top-right */
  .checkout-pane-order-summary .views-field-total-price__number {
    grid-column: 2;
    grid-row: 1;
    padding: 12px 16px 4px 0;
    align-self: center;
  }

  /* Event — full-width bottom row */
  .checkout-pane-order-summary .views-field-field-event {
    grid-column: 1 / 3;
    grid-row: 2;
    padding: 2px 16px 12px;
    border-bottom: 1px solid var(--color-border);
  }

  .checkout-pane-order-summary .views-field-field-event a {
    -webkit-line-clamp: 1;
    color: var(--color-text-muted);
    font-size: 0.78rem;
  }

  .checkout-pane-order-summary .views-table tbody tr:last-child
  .views-field-field-event {
    border-bottom: none;
  }
}

/* ── Order totals in checkout sidebar (commerce-checkout-order-summary view) ── */
.checkout-order-summary__totals {
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-alt);
}

.checkout-order-summary__totals, .checkout-order-summary__items {
  padding: 16px 20px;
}

/* Totals rendered via field--name-total-price */
.checkout-order-summary__totals .field--name-total-price {
  margin: 0;
}

/* Inherit global .order-total-line styles; add context-specific overrides */
.checkout-order-summary__totals .order-total-line {
  padding: 6px 0;
}

.checkout-order-summary__totals .order-total-line__subtotal {
  border-top: none;
  margin-top: 0;
  padding-top: 6px;
}

.checkout-order-summary__totals .order-total-line__total {
  margin-top: 8px;
  padding-top: 12px;
}

.checkout-order-summary__totals .order-total-line__total .order-total-line-value {
  font-size: var(--font-lg);
}

/* Legacy view footer path (if order summary renders via view footer) */
.checkout-pane-order-summary .view-footer {
  padding: 16px 20px;
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-alt);
}

/* ── Form actions (footer region) ── */
.layout-region-checkout-footer .form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 4px 0;
}

/* Pay and complete purchase button */
.layout-region-checkout-footer .form-actions #edit-actions-next,
.layout-region-checkout-footer .form-actions .button--primary {
  background: var(--color-accent) !important;
  color: white !important;
  border: none !important;
  border-radius: var(--radius) !important;
  padding: 14px 32px !important;
  font-size: var(--font-md) !important;
  font-weight: var(--font-weight-bold) !important;
  font-family: var(--font-family) !important;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.25) !important;
  white-space: nowrap;
}

.layout-region-checkout-footer .form-actions #edit-actions-next:hover,
.layout-region-checkout-footer .form-actions .button--primary:hover {
  background: var(--color-accent-hover) !important;
  box-shadow: 0 3px 12px rgba(233, 69, 96, 0.35) !important;
}

/* Go back link */
.layout-region-checkout-footer .form-actions .link--previous {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.layout-region-checkout-footer .form-actions .link--previous:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════
   ORDER CONFIRMATION PAGE
   ════════════════════════════════════════════════════════ */

/* Background wrapper for the confirmation section */
.confirmation-page {
  background: var(--color-surface-alt);
  padding: 64px 32px;
  min-height: 60vh;
}

/* Centered confirmation card */
.confirmation {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.confirmation__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.confirmation h1 {
  font-size: var(--font-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 12px;
  color: var(--color-primary);
}

.confirmation > p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-size: var(--font-lg);
}

/* Order detail / next-steps box */
.confirmation__order {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.confirmation__order h3 {
  font-size: var(--font-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: 12px;
  color: var(--color-primary);
}

/* "What happens next" steps */
.next-steps {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  text-align: left;
}

.next-steps h3 {
  color: #2e7d32;
}

.next-steps ol {
  padding-left: 20px;
  margin: 0;
  font-size: var(--font-sm);
  color: #444;
  line-height: 1.8;
}

/* Individual ticket line items */
.ticket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-sm);
}

.ticket-item:last-child {
  border-bottom: none;
}

.ticket-seat {
  font-weight: var(--font-weight-bold);
}

/* CTA row */
.confirmation__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Small footnote under CTAs */
.confirmation__footnote {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-top: 24px;
}

/* Default checkout completion class (used by older template version) */
.commerce-checkout-completion-message {
  max-width: 640px;
  margin: var(--spacing-12) auto;
  text-align: center;
  padding: var(--spacing-8);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.commerce-checkout-completion-message h2 {
  font-size: var(--font-2xl);
  color: var(--color-primary);
  margin-bottom: var(--spacing-4);
}

.commerce-checkout-completion-message .success-icon {
  margin-bottom: 24px;
}

.commerce-checkout-completion-message .lead {
  font-size: var(--font-lg);
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.commerce-checkout-completion-message .next-steps {
  margin-top: var(--spacing-6);
  padding: var(--spacing-4);
  background: #e8f5e9;
  border-radius: var(--radius);
  text-align: left;
}

.commerce-checkout-completion-message .next-steps h3 {
  font-size: var(--font-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: 8px;
}

.commerce-checkout-completion-message .next-steps ol {
  padding-left: 20px;
  font-size: var(--font-sm);
  color: #444;
  line-height: 1.8;
  margin: 0;
}

.completion-actions {
  margin-top: var(--spacing-6);
  display: flex;
  gap: var(--spacing-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════
   USER ACCOUNT / MY ORDERS
   ════════════════════════════════════════════════════════ */

.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 32px;
  max-width: var(--max-width-content);
  margin-inline: auto;
}

@media (max-width: 768px) {
  .account-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* Account sidebar navigation */
.account-nav {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 24px;
}

.account-nav h3 {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.account-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: var(--font-sm);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  margin-bottom: 2px;
}

.account-nav a:hover,
.account-nav a.active {
  background: var(--color-accent);
  color: white;
  text-decoration: none;
}

/* Orders list */
.orders-list h2 {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 20px;
}

.order-row {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
  .order-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.order-row__info h4 {
  font-weight: var(--font-weight-bold);
  margin-bottom: 4px;
}

.order-row__info p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.order-row__meta {
  text-align: right;
}

.order-row__total {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

/* Order status pills */
.order-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
}

.order-status--completed { background: #e8f5e9; color: #2e7d32; }
.order-status--pending   { background: #fff3e0; color: #e65100; }
.order-status--cancelled { background: #fce4ec; color: #c62828; }
