/* Ticket checkout (draft, kept off the live site by .assetsignore).
   Built on forms.css: same fields, buttons and country accent. Left: the order. Right: your details. */

.ck-body { background: var(--cream); }

.ck-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 124px var(--gutter) 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  font-weight: 500;
}

/* ---------- Left: the order summary ---------- */
.ck-summary { position: sticky; top: 112px; }
.ck-back {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; margin-bottom: 8px;
  font-size: 15px; color: var(--ink-soft); text-decoration: none;
}
.ck-back span { display: inline-block; transition: transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) {
  .ck-back:hover { color: var(--ink); }
  .ck-back:hover span { transform: translateX(-3px); }
}

.ck-photo { margin: 0; aspect-ratio: 5 / 2; border-radius: var(--r-card); overflow: hidden; background: var(--shell); }
.ck-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ck-summary h1 {
  margin: 20px 0 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.01em;
}
.ck-summary h1 em { font-style: italic; color: var(--accent-text); }
.ck-when { margin: 8px 0 0; font-size: 17px; color: var(--ink-soft); }

/* Ticket choice: one card per ticket type, the picked one wears the accent */
.ck-tickets { margin: 22px 0 0; padding: 0; border: 0; display: grid; gap: 10px; }
.ck-tickets legend { padding: 0; margin-bottom: 10px; font-size: 15px; }
.ck-ticket {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  border: 1.5px solid rgba(20, 18, 16, 0.18);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color var(--dur-hover) ease, background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-press);
}
.ck-ticket input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ck-ticket-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ck-ticket-name { font-family: var(--serif); font-size: 19px; }
.ck-ticket-desc { font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.ck-ticket-price { font-family: var(--serif); font-size: 18px; white-space: nowrap; }
@media (hover: hover) { .ck-ticket:hover { border-color: rgba(20, 18, 16, 0.36); } }
.ck-ticket:active { transform: scale(0.99); }
.ck-ticket:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-tint) 22%, transparent); }
.ck-ticket:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The receipt lines */
.ck-lines { margin: 20px 0 0; display: grid; gap: 10px; }
.ck-lines div { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
.ck-lines div[hidden] { display: none; }
.ck-lines dt { color: var(--ink-soft); font-weight: 400; }
.ck-lines dd { margin: 0; }
.ck-total { padding-top: 14px; border-top: 1px solid rgba(20, 18, 16, 0.12); }
.ck-total dt, .ck-total dd { font-family: var(--serif); font-size: 21px; color: var(--ink); font-weight: 500; }
.ck-fx { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); font-weight: 400; }

/* ---------- Right: your details ---------- */
.ck-card {
  background: var(--cream);
  border: 1px solid rgba(20, 18, 16, 0.08);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 3.2vw, 40px);
}
.ck-form { display: grid; gap: 20px; }
.ck-form[hidden], .ck-next[hidden] { display: none; }
.ck-card h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; }

/* Country list matches the text fields */
.fm-field select {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--ink);
  background: transparent;
  border: 1.5px solid rgba(20, 18, 16, 0.18);
  border-radius: 12px;
  padding: 13px 40px 13px 14px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  transition: border-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease;
}
.fm-field select:has(option[value=""]:checked) { color: rgba(20, 18, 16, 0.45); }
@media (hover: hover) { .fm-field select:hover { border-color: rgba(20, 18, 16, 0.32); } }
.fm-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.fm-field.is-invalid select { border-color: var(--terracotta-text); }

.ck-code-row { display: flex; gap: 10px; }
.ck-code-row input { flex: 1; min-width: 0; }
.ck-apply { background: transparent; font: inherit; font-size: 15px; cursor: pointer; flex: none; }
@media (hover: hover) { .ck-apply:hover { background: var(--shell); } }
.ck-code-msg { margin: 0; font-size: 13px; color: var(--ink-soft); }

.ck-agree { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 400; cursor: pointer; }
.ck-agree input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.ck-agree a { color: var(--accent-text); }
.ck-agree.is-invalid { color: var(--terracotta-text); }

.ck-pay { width: 100%; justify-content: center; border: 0; font: inherit; font-size: 17px; cursor: pointer; padding-block: 16px; }
@media (hover: hover) { .ck-pay:hover span[aria-hidden="true"] { transform: translateX(3px); } }
.ck-secure { margin: -6px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); font-weight: 400; text-align: center; }
.ck-secure a { color: var(--accent-text); }

/* Preview stand-in for Bold's window */
.ck-next { outline: none; }
.ck-next-tag { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.ck-next p:not(.ck-next-tag) { margin: 12px 0 0; font-size: 16px; color: var(--ink-soft); font-weight: 400; max-width: 44ch; }
.ck-edit { margin-top: 24px; min-height: 44px; padding: 0; background: none; border: 0; font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
.js .ck-next:not([hidden]), .js .ck-form.is-back { animation: fm-in var(--dur-ui) var(--ease-out) both; }

.ck-pay.is-busy { opacity: 0.7; cursor: progress; }

/* After paying: one card, three possible messages */
.ck-result { grid-template-columns: minmax(0, 620px); justify-content: center; min-height: 60vh; align-content: center; }
.ck-s { display: none; }
.ck-status[data-status="approved"] .ck-s-approved,
.ck-status[data-status="rejected"] .ck-s-rejected,
.ck-status[data-status="pending"] .ck-s-pending { display: block; }
.ck-status h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; }
.ck-status h1 em { font-style: italic; color: var(--accent-text); }
.ck-status p { margin: 14px 0 0; font-size: 17px; font-weight: 400; color: var(--ink-soft); max-width: 46ch; }
.ck-status a:not(.btn) { color: var(--accent-text); }
.ck-status .ck-order { margin-top: 24px; font-size: 13px; }

@media (max-width: 900px) {
  .ck-page { grid-template-columns: 1fr; padding-top: 104px; gap: 28px; }
  .ck-summary { position: static; }
  .ck-photo { aspect-ratio: 21 / 9; }
}
@media (max-width: 640px) {
  .ck-page { padding: 96px 16px 56px; }
  .ck-summary h1 { margin-top: 18px; }
  .ck-ticket { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .ck-next:not([hidden]), .js .ck-form.is-back { animation: none; }
  .ck-back span, .ck-ticket { transition: none; }
}

/* Nov 22: fields filled in a light cream so they stand out from the card */
.ck-card .fm-field input,
.ck-card .fm-field select { background-color: color-mix(in srgb, var(--cream) 45%, #fff); }

/* Nov 22: photo wears the edition colour at 32%, like the rest of the site */
.ck-photo { position: relative; }
.ck-photo::after { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0.32; pointer-events: none; }

/* Nov 22: dates in the edition colour, italic serif */
.ck-when { font-family: var(--serif); font-style: italic; color: var(--accent-text); font-size: clamp(19px, 1.8vw, 22px); margin-top: 2px; }

/* Nov 22: several tickets (tour, festival, day), a sale price crossed out, tickets not on sale yet */
.ck-loading { margin: 0; font-size: 14px; color: var(--ink-soft); }
/* Nov 22: while tickets load, three faint card shapes hold their place so the page below doesn't jump */
.ck-loading-wait { display: grid; gap: 10px; }
.ck-ghost {
  height: 116px;
  border: 1.5px solid rgba(20, 18, 16, 0.08);
  border-radius: 14px;
  background: rgba(20, 18, 16, 0.03);
  animation: ck-ghost 1.2s ease-in-out infinite alternate;
}
@media (max-width: 640px) { .ck-ghost { height: 112px; } }
@keyframes ck-ghost { from { opacity: 0.5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ck-ghost { animation: none; } }
.ck-ticket-price { display: grid; justify-items: end; gap: 2px; }
.ck-was { font-family: var(--sans); font-size: 14px; color: var(--ink-soft); text-decoration: line-through; }
.ck-sale {
  justify-self: start;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill, 999px);
  background: var(--accent);
  color: var(--cream);
  font-size: 12px;
  font-weight: 500;
}
.ck-ticket.is-off { cursor: default; opacity: 0.55; }
.ck-ticket.is-off:active { transform: none; }
.ck-ticket.is-off .ck-ticket-price { font-size: 15px; }
@media (hover: hover) { .ck-ticket.is-off:hover { border-color: rgba(20, 18, 16, 0.18); } }

/* Peru: the pay button and nav button take the terracotta, not the Colombia violet */
.fm-pe .btn-violet, .fm-br .btn-violet, .fm-ar .btn-violet { background: var(--accent-deep); }
@media (hover: hover) { .fm-pe .btn-violet:hover, .fm-br .btn-violet:hover, .fm-ar .btn-violet:hover { background: color-mix(in srgb, var(--accent-deep) 82%, var(--ink)); } }

/* WhatsApp number: country code list + number */
.ck-phone { display: flex; gap: 10px; }
.ck-phone select { flex: 0 0 46%; min-width: 0; text-overflow: ellipsis; }
.ck-phone input { flex: 1; min-width: 0; }
.ck-form .fm-row { grid-template-columns: 1fr; }
.ck-phone select { flex: 0 0 44%; }
.ck-phone select { flex: 0 0 112px; }
.ck-phone select { flex: 0 0 148px; padding-left: 14px; padding-right: 34px; text-overflow: clip; }
.ck-phone select { flex: 0 0 112px; padding-left: 12px; padding-right: 26px; background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; } /* the two halves of the chevron sit side by side */

/* Desktop: the details card starts level with the photo, below the back link */
@media (min-width: 901px) { .ck-summary + .ck-card { margin-top: 52px; } }

/* Ticket policy summary shown above the agree box (English + Español, both required) */
.ck-policy { display: grid; gap: 16px; padding: 16px; border: 1px solid rgba(20, 18, 16, 0.14); border-radius: 12px; background: rgba(249, 246, 240, 0.6); }
.ck-policy h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 1.25; }
.ck-policy ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.5; font-weight: 400; }
.ck-policy li { margin-bottom: 6px; }
.ck-policy-link { font-size: 14px; font-weight: 500; color: var(--accent-text); text-underline-offset: 3px; }
.ck-policy section + section { padding-top: 16px; border-top: 1px solid rgba(20, 18, 16, 0.12); }

.ck-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 24px 22px 20px; border: 0; border-radius: 16px; background: var(--cream); color: var(--ink); box-shadow: 0 24px 60px rgba(20, 18, 16, 0.35); overflow: auto; }
.ck-dialog::backdrop { background: rgba(20, 18, 16, 0.55); }
.ck-dialog[open] { animation: ck-dialog-in 200ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes ck-dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .ck-dialog[open] { animation: none; } }
.ck-dialog .ck-policy { padding: 0; border: 0; background: none; }
.ck-dialog-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.ck-dialog-foot { margin: 18px 0 0; }
.ck-dialog-foot .btn { width: 100%; justify-content: center; }
.ck-dialog-foot .btn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-size: 16px; }
