/* ============================================================
   NHP EVENTS — Checkout flow (Steps 2-4)
   Relies on the :root palette defined in style.css
   ============================================================ */

.checkout-body {
  background: var(--body-bg);
  min-height: 100vh;
}

/* ------------------------------------------------------------
   TOP BAR + STEPPER
   ------------------------------------------------------------ */
.checkout-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.checkout-topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}
.checkout-topbar .brand-logo .brand-text { font-size: 17px; }

.stepper { display: flex; align-items: center; gap: 0; }
.stepper .step { display: flex; align-items: center; gap: 9px; }
.stepper .num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  background: #e9ebf0; color: #9aa1b2;
  transition: all .3s;
  flex-shrink: 0;
}
.stepper .label { font-size: 14px; font-weight: 600; color: #9aa1b2; white-space: nowrap; }
.stepper .step.is-active .num,
.stepper .step.is-done .num { background: var(--magenta-700); color: #fff; }
.stepper .step.is-active .label,
.stepper .step.is-done .label { color: var(--ink); }
.stepper .connector {
  width: 46px; height: 2px;
  background: #e3e6ec;
  margin: 0 14px;
  border-radius: 2px;
}
.stepper .connector.is-done { background: var(--magenta-700); }

@media (max-width: 640px) {
  .stepper .label { display: none; }
  .stepper .connector { width: 24px; margin: 0 8px; }
}

/* shared page container */
.checkout-main { padding: 30px 0 70px; }

/* ============================================================
   STEP 2 — SEAT SELECTION
   ============================================================ */
.seat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.back-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--magenta-600);
  display: grid; place-items: center;
  font-size: 16px;
  transition: all .2s;
  flex-shrink: 0;
}
.back-btn:hover { background: var(--magenta-700); color: #fff; border-color: var(--magenta-700); }
.seat-head .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; color: var(--muted-2); }
.seat-head h1 { font-size: 21px; font-weight: 800; color: var(--ink); margin: 0; }

.seat-tools { display: flex; gap: 8px; }
.seat-tools button {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  transition: all .2s;
}
.seat-tools button:hover { color: var(--magenta-600); border-color: var(--magenta-300, #e7b9cd); }

.seatmap-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.seatmap-viewport {
  position: relative;
  width: 100%;
  height: 520px;            /* updated by JS to match the fitted scene */
  overflow: hidden;
  border-radius: var(--radius-lg);
  touch-action: none;
}
.seatmap-viewport.is-zoomed { cursor: grab; }
.seatmap-viewport.is-grabbing { cursor: grabbing; }

.seatmap-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  transition: transform .22s ease;
  will-change: transform;
}
.seatmap-scene.no-anim { transition: none; }
#seatmap { position: absolute; inset: 0; }

.seat {
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 3px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.seat:hover { transform: translate(-50%, -50%) scale(1.55); box-shadow: 0 0 0 3px rgba(0,0,0,.06); z-index: 5; }
.seat.is-unavailable { background: #d9dde3 !important; cursor: not-allowed; opacity: .65; }
.seat.is-unavailable:hover { transform: translate(-50%, -50%); box-shadow: none; }
.seat.is-selected {
  background: var(--magenta-600) !important;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg) scale(1.25);
  box-shadow: 0 0 0 3px rgba(190, 26, 91, .18);
  z-index: 6;
}
.seat.is-selected:hover { transform: translate(-50%, -50%) rotate(45deg) scale(1.45); }

.zone-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  color: var(--ink-soft);
  pointer-events: none;
  z-index: 4;
}

.stage-ellipse {
  position: absolute;
  left: 50%; bottom: 6px;
  transform: translateX(-50%);
  width: 230px; height: 96px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #fce4ee, #f8cfe0);
  border: 2px dashed #e891b4;
  display: grid; place-items: center;
  text-align: center;
  box-shadow: 0 0 40px rgba(190, 26, 91, .15);
}
.stage-ellipse .s-title { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--magenta-700); }
.stage-ellipse .s-sub { font-size: 8px; letter-spacing: 1.5px; color: #c77ba0; margin-top: 2px; }

.seat-tooltip {
  position: fixed;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity .12s;
}
.seat-tooltip.show { opacity: 1; }

/* legend */
.seat-legend {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfcfe;
}
.seat-legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.seat-legend .swatch { width: 13px; height: 13px; border-radius: 3px; }
.seat-legend .swatch.diamond-sel { transform: rotate(45deg); border-radius: 2px; }
.seat-legend .price { color: var(--muted-2); font-weight: 600; }

/* selection sidebar */
.selection-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: sticky;
  top: 92px;
}
.sel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.sel-head .title { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); font-size: 15px; }
.sel-head .title i { color: var(--magenta-600); }
.sel-clear { background: none; border: 0; color: var(--magenta-600); font-size: 12.5px; font-weight: 600; }
.sel-clear:hover { text-decoration: underline; }

.sel-count {
  margin: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(100deg, var(--magenta-900), var(--magenta-600));
  border-radius: 14px;
  padding: 16px 18px;
  color: #fff;
}
.sel-count .big { font-size: 30px; font-weight: 800; line-height: 1; }
.sel-count .lbl { font-size: 10px; letter-spacing: 1.2px; opacity: .8; font-weight: 600; }
.sel-count .chosen { font-size: 14px; font-weight: 700; }

.sel-body { padding: 0 20px 4px; max-height: 360px; overflow-y: auto; }
.sel-zone-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  color: var(--ink); margin: 14px 0 8px;
}
.sel-zone-label .dot { width: 8px; height: 8px; border-radius: 50%; }
.sel-zone-label .each { color: var(--muted-2); font-weight: 600; letter-spacing: 0; }
.sel-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 9px;
}
.sel-item .seat-badge {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.sel-item .meta { flex: 1; }
.sel-item .meta .r { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sel-item .meta .p { font-size: 12px; font-weight: 600; }
.sel-item .rm {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 0; background: #f1f2f5; color: var(--muted);
  font-size: 12px; flex-shrink: 0;
  transition: all .2s;
}
.sel-item .rm:hover { background: var(--magenta-700); color: #fff; }
.sel-empty { text-align: center; color: var(--muted-2); font-size: 13px; padding: 24px 0; }

.sel-coupon { display: flex; gap: 8px; padding: 16px 20px 6px; border-top: 1px solid var(--line); margin-top: 8px; }
.sel-coupon input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
}
.sel-coupon input:focus { outline: none; border-color: var(--magenta-500); }
.sel-coupon .apply {
  border: 0; border-radius: 10px;
  background: linear-gradient(100deg, var(--magenta-900), var(--magenta-600));
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 0 20px;
}
.sel-total { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 20px 6px; }
.sel-total .t-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted-2); }
.sel-total .t-val { font-size: 26px; font-weight: 800; color: var(--ink); }
.sel-total .t-val small { font-size: 12px; color: var(--muted); font-weight: 700; }
.sel-cta { padding: 6px 20px 12px; }
.btn-proceed {
  width: 100%;
  border: 0; border-radius: 13px;
  background: linear-gradient(100deg, var(--magenta-900), var(--magenta-600));
  color: #fff; font-weight: 700; font-size: 15px;
  padding: 15px;
  box-shadow: 0 12px 26px rgba(168, 23, 78, .3);
  transition: transform .2s, box-shadow .2s;
}
.btn-proceed:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(168, 23, 78, .4); color: #fff; }
.btn-proceed:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.sel-foot { text-align: center; font-size: 11.5px; color: var(--muted-2); padding-bottom: 14px; }

/* ============================================================
   STEP 3 — PAYMENT
   ============================================================ */
.pay-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px;
  margin-bottom: 18px;
}
.event-summary { display: flex; align-items: center; gap: 18px; }
.event-summary .thumb {
  width: 92px; height: 78px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.event-summary .es-body { flex: 1; }
.event-summary h3 { font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 2px; }
.event-summary .venue { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.es-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.es-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f6f7fa; border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 10px;
  font-size: 12.5px; color: var(--ink-soft); font-weight: 600;
}
.es-chip i { color: var(--magenta-600); }
.es-price { text-align: right; flex-shrink: 0; }
.es-price .amt { font-size: 22px; font-weight: 800; color: var(--ink); }
.es-price .cur { font-size: 12px; color: var(--muted-2); font-weight: 700; display: block; }
.es-price .disc { font-size: 12.5px; color: var(--green-tx); font-weight: 700; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.es-tickets { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

.section-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; color: var(--muted-2); margin: 4px 0 14px; }

.pay-option {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.pay-option .radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #cfd4dd;
  display: grid; place-items: center; flex-shrink: 0;
  transition: all .2s;
}
.pay-option .radio i { font-size: 12px; color: #fff; opacity: 0; }
.pay-option .po-body { flex: 1; }
.pay-option .po-body .t { font-weight: 700; color: var(--ink); font-size: 15px; }
.pay-option .po-body .s { font-size: 12.5px; color: var(--muted); }
.pay-badge { font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 4px 10px; border-radius: 6px; }
.pay-badge.local { background: #e7f7ef; color: var(--green-tx); }
.pay-badge.intl { background: #fdf0e1; color: #e08a1e; }
.pay-option.is-selected {
  border-color: var(--magenta-600);
  background: linear-gradient(0deg, rgba(190,26,91,.04), rgba(190,26,91,.04));
}
.pay-option.is-selected .radio { border-color: var(--magenta-600); background: var(--magenta-600); }
.pay-option.is-selected .radio i { opacity: 1; }

.service-row {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.service-row.is-on { border-color: var(--magenta-600); }
.service-row .s-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; flex-shrink: 0;
  background: #fdeef4; color: var(--magenta-600);
}
.service-row.wa .s-icon { background: #e7f7ef; color: #25a35a; }
.service-row .s-body { flex: 1; }
.service-row .s-body .t { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.service-row .s-body .s { font-size: 12px; color: var(--muted); }

/* toggle switch */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0;
  background: #d7dbe2; border-radius: 999px;
  transition: background .25s; cursor: pointer;
}
.switch .track::before {
  content: ""; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--magenta-600); }
.switch input:checked + .track::before { transform: translateX(20px); }

.delivery-box {
  display: flex; gap: 14px;
  background: #f7f8fb; border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px;
}
.delivery-box .d-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: #fdeef4; color: var(--magenta-600);
  display: grid; place-items: center; flex-shrink: 0;
}
.delivery-box h6 { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.delivery-box p { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; line-height: 1.55; }
.delivery-box .linked { font-size: 12px; color: var(--muted); }
.delivery-box .linked a { color: var(--magenta-600); font-weight: 600; }

.consent-row { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.consent-row .cbox {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid #cfd4dd;
  display: grid; place-items: center; flex-shrink: 0; cursor: pointer;
  background: #fff; transition: all .2s; margin-top: 1px;
}
.consent-row .cbox i { font-size: 12px; color: #fff; opacity: 0; }
.consent-row.is-checked .cbox { background: var(--magenta-600); border-color: var(--magenta-600); }
.consent-row.is-checked .cbox i { opacity: 1; }
.consent-row a { color: var(--magenta-600); font-weight: 600; text-decoration: underline; }

/* order summary */
.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px;
  position: sticky; top: 92px;
}
.order-card h4 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0 0 18px; }
.order-line { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 11px; }
.order-line .lbl { color: var(--muted); }
.order-line .val { color: var(--ink-soft); font-weight: 600; }
.order-line.discount .val { color: var(--green-tx); }
.order-line.sub { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 4px; }
.order-line.sub .lbl, .order-line.sub .val { color: var(--ink); font-weight: 700; }
.order-total {
  background: linear-gradient(135deg, #fdeef4, #f9e3ef);
  border-radius: 14px; padding: 16px 18px; margin: 16px 0;
}
.order-total .ot-label { font-size: 11px; color: var(--muted); font-weight: 600; }
.order-total .ot-row { display: flex; align-items: center; justify-content: space-between; }
.order-total .ot-amt { font-size: 26px; font-weight: 800; color: var(--ink); }
.order-total .ot-amt small { font-size: 13px; color: var(--magenta-600); font-weight: 700; }
.order-total .ot-vat { font-size: 11px; color: var(--muted-2); }
.btn-pay {
  width: 100%; border: 0; border-radius: 13px;
  background: linear-gradient(100deg, var(--magenta-900), var(--magenta-600));
  color: #fff; font-weight: 700; font-size: 15.5px; padding: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 12px 26px rgba(168, 23, 78, .3);
  transition: transform .2s, box-shadow .2s;
}
.btn-pay:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(168, 23, 78, .4); color: #fff; }
.secured { text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 12px; }

/* ============================================================
   STEP 4 — CONFIRMATION
   ============================================================ */
.confirm-wrap { max-width: 600px; margin: 0 auto; text-align: center; padding-top: 16px; }
.confirm-check {
  width: 74px; height: 74px; border-radius: 50%;
  background: #e3f7ec; color: var(--green-tx);
  display: grid; place-items: center; margin: 0 auto 18px;
  font-size: 36px;
  animation: popIn .5s cubic-bezier(.2,.8,.2,1.2);
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-wrap h1 { font-size: 28px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.confirm-wrap .sent { font-size: 14.5px; color: var(--muted); margin-bottom: 28px; }
.confirm-wrap .sent strong { color: var(--magenta-600); }

.ticket {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(22, 23, 53, .1);
  overflow: hidden;
  text-align: left;
}
.ticket-hero { height: 190px; position: relative; overflow: hidden; }
.ticket-hero img { width: 100%; height: 100%; object-fit: cover; }
.ticket-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 22px 26px;
  gap: 16px;
  border-bottom: 1px dashed var(--line);
}
.ticket-meta .tm-label { font-size: 10.5px; letter-spacing: 1px; color: var(--muted-2); font-weight: 600; margin-bottom: 5px; }
.ticket-meta .tm-val { font-size: 15px; font-weight: 700; color: var(--ink); }
.ticket-meta .tm-sub { font-size: 11.5px; color: var(--muted-2); }

.ticket-body { display: flex; gap: 26px; padding: 24px 26px; border-bottom: 1px dashed var(--line); }
.ticket-qr { text-align: center; flex-shrink: 0; }
.ticket-qr img { width: 118px; height: 118px; border-radius: 8px; }
.ticket-qr span { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 6px; }
.ticket-info { flex: 1; display: grid; grid-template-columns: 1fr; gap: 12px; align-content: start; }
.ticket-info .ti-label { font-size: 10.5px; letter-spacing: 1px; color: var(--muted-2); font-weight: 600; margin-bottom: 2px; }
.ticket-info .ti-val { font-size: 14px; font-weight: 700; color: var(--ink); }
.ticket-info .ti-val.paid { color: var(--magenta-700); }

.ticket-foot { display: flex; align-items: center; gap: 9px; padding: 18px 26px; }
.ticket-foot i { color: var(--magenta-600); font-size: 16px; }
.ticket-foot .tf-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.ticket-foot .tf-sub { font-size: 12px; color: var(--muted-2); }

.confirm-actions { display: flex; gap: 14px; margin-top: 26px; }
.confirm-actions .btn { flex: 1; border-radius: 13px; padding: 14px; font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.btn-download { background: #fff; border: 1px solid var(--magenta-300, #e7b9cd); color: var(--magenta-700); }
.btn-download:hover { background: #fff5f8; color: var(--magenta-700); }
.btn-share { background: linear-gradient(100deg, var(--magenta-900), var(--magenta-600)); color: #fff; border: 0; box-shadow: 0 12px 26px rgba(168, 23, 78, .3); }
.btn-share:hover { transform: translateY(-2px); color: #fff; }

@media (max-width: 575.98px) {
  .event-summary { flex-wrap: wrap; }
  .es-price { text-align: left; }
  .ticket-meta { grid-template-columns: 1fr 1fr; }
  .ticket-body { flex-direction: column; align-items: center; }
  .confirm-actions { flex-direction: column; }
}
