/*
 * Booking flow — additions to the Jordan Aviation design system.
 *
 * Only what the design pack does not already cover: pieces the static mockups
 * faked (the order summary, the review cards) and the held-space timer, which
 * does not exist in a static page at all. Everything else reuses the pack's own
 * classes. Loaded after style-{lang}.css, and written to inherit its tokens.
 */

/* ---- price pills: real fares are longer than the mockup's placeholders ---- */
.date-pill {
  flex: 0 0 auto;
  width: auto;
  min-width: 6.5rem;
}
.date-pill__val {
  white-space: nowrap;
  font-size: 0.9375rem;
}

/* ---- held-space countdown ---- */
.hold-timer {
  border-radius: var(--r-md, 0.75rem);
  font-size: 0.9375rem;
}
.hold-timer .ic {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
}
.hold-timer b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---- order summary ---- */
.bk-summary {
  position: sticky;
  top: 1.5rem;
}
.sum-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.4375rem;
  font-size: 0.9375rem;
}
.sum-row__k {
  color: var(--ja-muted, #6b7280);
}
.sum-row__v {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.sum-row--total {
  font-size: 1.0625rem;
  padding-block: 0.625rem;
}
.sum-row--total .sum-row__k {
  color: inherit;
  font-weight: 600;
}

/* ---- review screen ---- */
.bk-card__edit {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ja-gold-700, #9a7c47);
  text-decoration: none;
}
.bk-card__edit:hover {
  text-decoration: underline;
}
.bk-card__edit .ic {
  width: 0.9375rem;
  height: 0.9375rem;
}

.rev-flight + .rev-flight {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ja-line-soft, #eceff3);
}
.rev-flight__label {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ja-muted, #6b7280);
  margin-bottom: 0.25rem;
}
.rev-flight__route {
  font-size: 1.0625rem;
  margin-bottom: 0.125rem;
}
.rev-flight__meta {
  font-size: 0.8125rem;
  margin-bottom: 0;
}

.rev-pax {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-block: 0.5rem;
}
.rev-pax__num {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--ja-gold, #b79a69);
  color: #fff;
}

/* ---- seat map: keep the released-seat highlight distinct from selected ---- */
.seat.is-mine {
  outline: 2px solid var(--ja-navy, #0c1a35);
  outline-offset: 1px;
}

/* ---- add-ons: quantity control inside the design's .addon card ---- */
.addon__flag {
  display: inline-block;
  margin-inline-start: 0.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ja-gold-100, #f2ebde);
  color: var(--ja-gold-700, #9a7c47);
  vertical-align: middle;
}
.addon__cta {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.addon__cta .form-label {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ja-muted, #6b7280);
}
.addon__cta .form-control {
  width: 5rem;
}
.addon.is-selected {
  border-color: var(--ja-gold, #b79a69);
}

/* ---- confirmation ----
   The design pack gives .bpass__head a navy band, so everything inside it has
   to be light. Without this the heading is navy-on-navy and simply disappears. */
.bpass__head {
  /* The pack lays this out as a row; the confirmation is a single centred
     statement, so stack it instead of spreading it across three columns. */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  padding: 2rem 1.25rem;
  color: var(--ja-white, #fff);
}
.bpass__head .bk-title {
  max-width: 24ch;
}
.bpass__head .bk-title,
.bpass__head .bk-subtitle,
.bpass__head p {
  color: var(--ja-white, #fff);
}
.bpass__head .bk-subtitle,
.bpass__head .text-muted {
  color: rgba(255, 255, 255, 0.75) !important;
}
.bpass__tick {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  background: var(--ja-green-100, #e3f2ec);
  color: var(--ja-green, #0b7049);
}
.bpass__tick .ic {
  width: 2rem;
  height: 2rem;
}
.bpass__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  background: var(--ja-line-soft, #eceff3);
  border-block: 1px solid var(--ja-line-soft, #eceff3);
}
.bpass__cell {
  background: var(--ja-white, #fff);
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.25rem;
}
.bpass__k {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ja-muted, #6b7280);
}
.bpass__v {
  font-size: 1.125rem;
  font-weight: 700;
}
.bpass__leg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--ja-line-soft, #eceff3);
}
.bpass__pax {
  padding: 1.25rem;
}

/* ---- forms inside booking cards ---- */
.bk-card .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.3125rem;
}

@media (max-width: 640px) {
  .bpass__leg { flex-wrap: wrap; }
  .addon__cta .form-control { width: 4.5rem; }
}

/* ---- helper text and the optional passenger panel ---- */
/* The pack has the opt-toggle button but no panel behind it, because its mockup never opens
   one. These two are ours, kept in this layer so the pack stylesheet stays untouched. */
.bk-note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ja-muted, #6b7280);
  margin: 0 0 0.75rem;
}
.opt-panel {
  margin-top: 0.875rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--ja-line-soft, #eceff3);
  border-radius: 0.75rem;
  background: var(--ja-tint, #f7f8fa);
}
.opt-panel .bk-note:last-child { margin-bottom: 0; }

/* ---- passenger tab strip ---- */
/* The tick and the numbered chip are both in the markup and CSS picks one: which passenger is
   done changes as seats are picked, and toggling a class beats rebuilding the tab in script. */
.pax-tab .pax-tab__done { display: none; }
.pax-tab--done .pax-tab__done { display: inline-block; }
.pax-tab--done .pax-tab__num { display: none; }
.pax-tab .pax-acc__num {
  width: 1.125rem;
  height: 1.125rem;
  font-size: 0.625rem;
  flex: 0 0 auto;
}

/* The terms checkbox turns red when it is what is holding the payment up. */
.check-ja.is-invalid .check-ja__box { border-color: var(--ja-red, #c0392b); }
.check-ja.is-invalid { color: var(--ja-red, #c0392b); }

/* A reservation VRS has not returned HK for is not "Confirmed" — say Pending, and do not
   colour it like a success. */
.chip-status--pending {
  background: var(--ja-amber-tint, #fdf3e0);
  color: var(--ja-amber-700, #8a5a00);
}

/* ---- a document the airline has not supplied ---- */
/* The old site linked 14 PDFs that are not in the backup. Keeping the label and the PDF icon
   without a link made them look clickable, so they are marked plainly instead: dimmed, struck
   through, and not offering a pointer. Restoring the file turns them back into real links on
   the next content regeneration. */
.doc-unavailable {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--ja-muted, #6b7280);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  cursor: not-allowed;
  opacity: 0.75;
}
.doc-unavailable img { filter: grayscale(1); opacity: 0.6; }
.doc-unavailable::after {
  content: " (" attr(title) ")";
  text-decoration: none;
  font-size: 0.75em;
  opacity: 0.9;
}
