/* Boletos checkout. One screen, one action. Phone-first: everything
   above PAGAR must fit a 375x700 viewport without scrolling. */

.boletos-page {
  padding: 7rem 1.25rem 4rem;
  max-width: 560px;
  margin: 0 auto;
  min-height: 70vh;
}

/* ===== Header ===== */
.checkout__head { margin-bottom: 2rem; }
.checkout__eyebrow { color: var(--ember); }
.checkout__event {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 14vw, 5.5rem);
  letter-spacing: var(--tracking-display);
  line-height: 0.92;
  margin: 0.5rem 0;
}
.checkout__meta { color: var(--cream-dim); }

/* The same three faces the events list uses to name a night: date in the display face,
   location in editorial, the 24h notice in mono. A buyer who arrives from a shared link has
   to be able to tell which party this is, and every Despapaye night shares the same name. */
.checkout__place {
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  line-height: 1.05;
  margin: 0 0 0.35rem;
}
.checkout__place:empty { display: none; }

/* The flyer is how this audience actually recognises a night. Full colour, never cropped to
   a different aspect than the artwork was made at. */
.checkout__flyer {
  width: 100%;
  max-width: 420px;
  margin: 0 0 2rem;
  background: var(--ash);
}
.checkout__flyer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--smoke);
}

/* ===== Sheet: ticket / quantity / total rows ===== */
.checkout__sheet { display: flex; flex-direction: column; }

.checkout__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--smoke);
}
.checkout__row:first-child { border-top: 1px solid var(--smoke); }
.checkout__row[hidden] { display: none; }

.checkout__label {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--cream-dim);
}
.checkout__label--total { color: var(--cream); }

.checkout__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: var(--tracking-display);
  color: var(--cream);
}
.checkout__cur { font-size: 0.9rem; color: var(--cream-dim); }

/* Quantity stepper: 52px targets, one-thumb reach */
.qty { display: flex; align-items: center; gap: 0.25rem; }
.qty__btn {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--ash);
  border: 1px solid var(--cream-dim);
  color: var(--cream);
  padding: 0;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.qty__btn:hover { border-color: var(--cream); }
.qty__btn:active { background: var(--smoke); }
.qty__btn:disabled { opacity: 0.3; pointer-events: none; }
.qty__num {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: var(--tracking-display);
  color: var(--cream);
  min-width: 3ch;
  text-align: center;
}

.checkout__row--total { border-bottom: none; padding-bottom: 0.75rem; }
.checkout__total {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: var(--tracking-display);
  line-height: 1;
  color: var(--cream);
}

/* Refund policy: plain Spanish, full-strength cream, directly above the button */
.checkout__policy {
  font-family: var(--font-editorial);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--cream);
  margin: 0.75rem 0 1.5rem;
}

/* The one primary action. The only ember fill on the page. */
.checkout__pay {
  display: block;
  width: 100%;
  text-align: center;
  font-size: clamp(1.6rem, 6vw, 1.9rem);
  padding: 1.05rem 1.5rem;
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ink);
}
.checkout__pay::before { background: var(--cream); }
.checkout__pay:hover { color: var(--ink); border-color: var(--cream); }
.checkout__pay:focus-visible { outline-color: var(--cream); }

.checkout__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--cream-dim);
}
.checkout__secure svg { flex-shrink: 0; }

/* ===== Discount code: collapsed link, expanding field, applied chip ===== */
.checkout__code {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--smoke);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Quiet toggle, 44px hit area on a small visual line */
.code-toggle {
  background: none;
  border: none;
  padding: 0.75rem 0;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--cream-dim);
  border-bottom: 1px solid transparent;
  transition: color 200ms var(--ease-out);
}
.code-toggle:hover { color: var(--cream); }
.code-toggle[hidden] { display: none; }

.code-field {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  padding: 0.25rem 0 0.9rem;
}
.code-field[hidden] { display: none; }
.code-field__input {
  flex: 1;
  min-width: 0;
  background: var(--ash);
  border: 1px solid var(--smoke);
  color: var(--cream);
  padding: 0.75rem 1rem;
  min-height: 48px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.code-field__input:focus { border-color: var(--ember); outline: none; }
.code-field__input:disabled { opacity: 0.5; }
.code-field__input::placeholder { color: var(--cream-dim); opacity: 0.6; }
.code-field__apply {
  background: transparent;
  border: 1px solid var(--cream-dim);
  color: var(--cream);
  padding: 0 1.1rem;
  min-height: 48px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.code-field__apply:hover { border-color: var(--cream); }
.code-field__apply:disabled { opacity: 0.4; pointer-events: none; }

.code-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.9rem;
}
.code-status[hidden] { display: none; }
.code-status--checking { color: var(--cream-dim); }
.code-status--invalid { color: var(--ember); }

/* Applied chip: quiet confirmation a friend can spot at a glance */
.code-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0.9rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--cream-dim);
  background: var(--ash);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.code-chip[hidden] { display: none; }
.code-chip svg { color: var(--ember); flex-shrink: 0; }
.code-chip__code { color: var(--cream); }
.code-chip__remove {
  background: none;
  border: none;
  color: var(--cream-dim);
  padding: 0.5rem;
  margin: -0.5rem -0.25rem -0.5rem 0;
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  transition: color 200ms var(--ease-out);
}
.code-chip__remove:hover { color: var(--cream); }

/* Breakdown rows shown only when a code is applied */
.checkout__subtotal {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: var(--tracking-display);
  color: var(--cream-dim);
}
.checkout__discount {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: var(--tracking-display);
  color: var(--ember);
}
.checkout__label--discount { color: var(--ember); }

/* ===== Confirmation (Stripe return) ===== */
.confirm {
  padding: 3.5rem 1.5rem;
  text-align: center;
  border: 1px solid var(--smoke);
  background: var(--ash);
  position: relative;
  overflow: hidden;
}
.confirm[hidden] { display: none; }
.confirm::before {
  content: '';
  position: absolute;
  inset: -50% -50% auto auto;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(232, 114, 44, 0.18), transparent 70%);
  pointer-events: none;
}
.confirm__mark { color: var(--ember); margin-bottom: 1rem; }
.confirm__mark svg { display: inline-block; }
.confirm__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 8vw, 3rem);
  letter-spacing: var(--tracking-display);
  line-height: 0.95;
  margin: 0 0 1rem;
}
.confirm__body {
  font-family: var(--font-editorial);
  color: var(--cream-dim);
  line-height: 1.6;
  margin: 0 auto 2rem;
  max-width: 34ch;
}
.confirm__email { color: var(--cream); font-weight: 600; word-break: break-all; }
.confirm__open { font-size: 1.4rem; }
.confirm__hint {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--cream-dim);
  margin: 1.5rem auto 0;
  max-width: 38ch;
}

/* The on-sale nav item and the mobile stagger moved to components.css: the BOLETOS item now
   appears on every page, and this sheet only loads on the checkout. */
@media (max-width: 768px) {
  .boletos-page { padding: 6rem 1.25rem 3.5rem; }
}

/* Why a purchase did not go through, said where the buyer is already looking: directly
   above the button they just pressed, not in a toast that can be missed. Ember, because
   this is the one moment the page has bad news. */
.checkout__note {
  margin: 0 0 0.9rem;
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  line-height: 1.5;
}
