/* ==========================================================================
   Checkout flows: tours, hotels, live hotels, transfers (and the payment step
   the flight checkout shares). Loaded by resources/views/checkout/styles.blade.php.

   Same tokens as the rest of the site (site.css). Ink carries the page; brand
   red is spent on the one button that takes money. A focused field gets an ink
   border and a neutral halo, so red is left to mean "this needs fixing".
   Class names (lh-*, fl-*) are the ones these pages have always used.
   ========================================================================== */

:root {
    --fl: var(--to-brand); --fl-dk: var(--to-brand-hover);
    --navy: var(--to-ink); --ink: var(--to-ink); --mute: var(--to-muted); --line: var(--to-line);
    --ok: var(--to-ok); --bad: var(--to-bad);
    --ease: var(--ease-out);
    --co-ring: var(--to-ring);
}
[x-cloak] { display: none !important; }

/* ---------- Page ---------- */
.lh-page { min-height: 70vh; padding: var(--s6) 0 var(--s9); background: var(--to-surface-2); color: var(--to-ink-2); }
.lh-page h1, .lh-page h2, .lh-page h3 { text-transform: none; }
.lh-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: calc(var(--s3) * -1) 0 var(--s2); color: var(--to-muted); font: 600 14px/1 var(--to-font); text-decoration: none; transition: color var(--t-fast) var(--ease-out); }
.lh-back:hover { color: var(--to-ink); }
.lh-h1 { margin: 0 0 var(--s5); color: var(--to-ink); font: 800 clamp(26px, 3.4vw, 34px)/1.15 var(--to-font); letter-spacing: -.035em; }
.lh-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }
.lh-cols__main, .lh-cols__side { min-width: 0; }
@media (min-width: 992px) {
    .lh-cols { grid-template-columns: minmax(0, 1fr) 392px; gap: var(--s6); }
    .lh-cols__side { position: sticky; top: 92px; }
}
@media (max-width: 991.98px) {
    /* On a phone, what you are paying for comes before the form that pays for it. The hotel and
       transfer pages lay out with Bootstrap columns; the summary column moves up the same way. */
    .lh-cols__side { order: -1; }
    .lh-page .row > [class*="col-lg-"]:has(> .lh-sum) { order: -1; }
}

/* Hero band on the results pages */
.lh-hero { padding: var(--s6) 0 var(--s5); background: var(--to-surface-2); border-bottom: 1px solid var(--to-line); color: var(--to-ink-2); }
.lh-crumbs { margin-bottom: var(--s3); color: var(--to-muted); font-size: 13.5px; }
.lh-crumbs a { color: var(--to-muted); text-decoration: none; }
.lh-crumbs a:hover { color: var(--to-ink); text-decoration: underline; }
.lh-title { margin: 0; color: var(--to-ink); font: 800 clamp(24px, 3.4vw, 32px)/1.15 var(--to-font); letter-spacing: -.03em; }
.lh-stars { margin-bottom: 6px; color: var(--to-star); font-size: 13px; letter-spacing: 1px; }
.lh-sub { display: flex; flex-wrap: wrap; gap: 6px var(--s4); margin-top: 6px; color: var(--to-muted); font-size: 14.5px; }
.lh-sub a { color: var(--to-ink); }
.lh-chip { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--to-card); box-shadow: var(--sh-1); color: var(--to-ink-2); font-size: 13.5px; }
.lh-chip a { color: var(--to-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards ---------- */
.lh-card { border-radius: var(--r-lg); background: var(--to-card); box-shadow: var(--sh-1); }
.lh-card-hd { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--to-line); color: var(--to-ink); font: 700 16px/1.3 var(--to-font); letter-spacing: -.015em; }
.lh-card-bd { padding: var(--s5); }

/* Room / vehicle rows */
.lh-room { display: flex; gap: var(--s5); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--to-line); }
.lh-room:last-child { border-bottom: 0; }
.lh-room-main { flex: 1; min-width: 0; }
.lh-room-title { color: var(--to-ink); font: 700 16px/1.3 var(--to-font); letter-spacing: -.015em; }
.lh-room-desc { display: -webkit-box; margin-top: 4px; color: var(--to-muted); font-size: 13.5px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lh-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: var(--s2); font-size: 12.5px; }
.lh-ok { color: var(--ok); font-weight: 600; }
.lh-muted { color: var(--to-muted); }
.lh-room-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; min-width: 170px; text-align: right; }
.lh-price { color: var(--to-ink); font: 800 22px/1.1 var(--to-font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lh-price-sub { color: var(--to-muted); font-size: 12.5px; }

/* ---------- Buttons and links ---------- */
.lh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    min-height: 48px; padding: 0 var(--s5); border: 0; border-radius: var(--r-md);
    background: var(--to-brand); color: #fff; font: 700 15px/1 var(--to-font); letter-spacing: -.01em; text-decoration: none; cursor: pointer;
    transition: background-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.lh-btn:hover { background: var(--to-brand-hover); color: #fff; }
.lh-btn:active { transform: scale(.97); }
.lh-btn:focus-visible { outline: 2px solid var(--to-ink); outline-offset: 2px; }
.lh-btn[disabled], .lh-btn.is-busy { opacity: .55; cursor: progress; transform: none; }
.lh-btn--block { width: 100%; }
.lh-link { color: var(--to-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--to-line-2); text-underline-offset: 3px; transition: text-decoration-color var(--t-fast) var(--ease-out); }
.lh-link:hover { color: var(--to-ink); text-decoration-color: var(--to-ink); }

.lh-empty { padding: var(--s7) var(--s5); color: var(--to-muted); text-align: center; }
.lh-empty i { display: block; margin-bottom: var(--s3); color: var(--to-line-2); font-size: 32px; }
.lh-empty h3 { margin-bottom: 6px; color: var(--to-ink); font: 700 18px/1.3 var(--to-font); }

/* ---------- Steps ---------- */
.fl-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; margin-bottom: var(--s5); }
.fl-step { display: flex; align-items: center; gap: var(--s2); font: 600 13.5px/1 var(--to-font); }
.fl-step-num { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.fl-step.active .fl-step-num { background: var(--to-ink); color: var(--to-on-ink); }
.fl-step.done .fl-step-num { background: var(--to-card); color: var(--to-ink); box-shadow: inset 0 0 0 1.5px var(--to-ink); }
.fl-step.inactive .fl-step-num { background: var(--to-surface); color: var(--to-muted); }
.fl-step.active span { color: var(--to-ink); }
.fl-step.done span { color: var(--to-ink-2); }
.fl-step.inactive span { color: var(--to-muted); }
.fl-step .fl-step-num, .fl-step .fl-step-num i { color: inherit; }
.fl-step.active .fl-step-num, .fl-step.active .fl-step-num i { color: var(--to-on-ink); }
.fl-step.done .fl-step-num, .fl-step.done .fl-step-num i { color: var(--to-ink); }
.fl-step-line { flex: 0 1 48px; min-width: 20px; height: 1.5px; margin: 0 var(--s3); background: var(--to-line-2); }

/* ---------- Form cards ---------- */
.fl-billing { margin-bottom: var(--s4); border-radius: var(--r-lg); background: var(--to-card); box-shadow: var(--sh-1); overflow: hidden; }
.fl-billing-hdr { margin: 0; padding: var(--s5) var(--s5) 0; color: var(--to-ink); font: 700 18px/1.3 var(--to-font); letter-spacing: -.02em; }
.fl-billing-hdr i { display: none; } /* the old icon in every heading added nothing */
.fl-billing-body { padding: var(--s4) var(--s5) var(--s5); }
.lh-fields { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fl-label { display: block; margin-bottom: 6px; color: var(--to-ink); font: 600 14px/1.3 var(--to-font); }
.fl-optional { color: var(--to-muted); font-weight: 400; }
.fl-input {
    width: 100%; min-height: 48px; padding: 0 var(--s4); border: 1px solid var(--to-line-2); border-radius: var(--r-md); background: var(--to-card);
    color: var(--to-ink); font: 500 15.5px/1.4 var(--to-font);
    transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
/* The theme styles input[type=email|tel] directly; out-specify it so every field matches. */
.fl-billing input.fl-input, .fl-billing select.fl-input { height: 48px; padding: 0 var(--s4); border: 1px solid var(--to-line-2); border-radius: var(--r-md); background-color: var(--to-card); color: var(--to-ink); font: 500 15.5px/1.4 var(--to-font); line-height: normal; box-shadow: none; }
.fl-billing textarea.fl-input { height: auto; min-height: 96px; padding: var(--s3) var(--s4); border: 1px solid var(--to-line-2); border-radius: var(--r-md); font: 500 15.5px/1.5 var(--to-font); resize: vertical; }
.fl-billing .fl-input:hover, .fl-input:hover { border-color: var(--to-muted); }
.fl-billing .fl-input:focus, .fl-input:focus, .fl-billing .fl-input:focus-visible, .fl-input:focus-visible { outline: none; border-color: var(--to-ink); box-shadow: var(--co-ring); }
.fl-billing .fl-input.is-invalid, .fl-input.is-invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
.fl-input::placeholder { color: var(--to-muted); opacity: 1; }
.fl-error { margin-top: 6px; color: var(--bad); font-size: 13px; }
.fl-hint { margin-top: 6px; color: var(--to-muted); font-size: 13px; line-height: 1.5; }
.fl-hint--top { max-width: 36.6em; margin: 0 0 var(--s4); font-size: 14.5px; }
.lh-notice { display: flex; gap: var(--s3); align-items: flex-start; margin-bottom: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--to-warn-bg); color: var(--to-warn); font-size: 14.5px; line-height: 1.5; }
.lh-notice svg { flex: none; margin-top: 2px; }

/* ---------- Summary ---------- */
.lh-sum { position: sticky; top: 92px; }
.lh-cols__side .lh-sum { position: static; padding: var(--s5); }
.lh-sum-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; }
.lh-sum-head img { width: 72px; height: 72px; border-radius: var(--r-md); object-fit: cover; background: var(--to-surface); }
.lh-sum-head > div:only-child { grid-column: 1 / -1; }
.lh-sum-name { margin: 0; color: var(--to-ink); font: 700 17px/1.3 var(--to-font); letter-spacing: -.02em; }
.lh-sum-where { margin: 2px 0 0; color: var(--to-muted); font-size: 14px; }
.lh-sum-facts { display: grid; gap: var(--s2); margin: var(--s4) 0 0; padding: var(--s4) 0; border-block: 1px solid var(--to-line); }
.lh-sum-facts > div { display: flex; justify-content: space-between; gap: var(--s4); font-size: 14.5px; }
.lh-sum-facts dt { color: var(--to-muted); font-weight: 400; }
.lh-sum-facts dd { margin: 0; color: var(--to-ink); font-weight: 600; text-align: right; }
.lh-sum-lines { padding: var(--s3) 0; }
.lh-sum-row { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; font-size: 14.5px; }
.lh-sum-row span:first-child { color: var(--to-ink-2); }
.lh-sum-row span:last-child { color: var(--to-ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lh-sum-row--off span:last-child, .lh-sum-row--off span:first-child { color: var(--ok); }
.lh-sum-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-top: 0; padding-top: var(--s4); border-top: 1px solid var(--to-line); color: var(--to-ink); font: 600 15.5px/1.3 var(--to-font); }
.lh-sum-total span:last-child { color: var(--to-ink); font: 800 24px/1.1 var(--to-font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lh-fine { margin-top: var(--s3); color: var(--to-muted); font-size: 13px; line-height: 1.55; }
.lh-fine a { color: var(--to-ink-2); text-decoration: underline; text-underline-offset: 2px; }
.lh-fine a:hover { color: var(--to-ink); }
.lh-cols__main > .lh-fine { max-width: 37.8em; }

/* ---------- Hotel photos: one swipeable strip ---------- */
.lh-gallery { display: flex; gap: var(--s2); margin: 0 0 var(--s5); padding: 2px 0 6px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; overscroll-behavior-x: contain; }
.lh-gallery:focus-visible { outline: 2px solid var(--to-ink); outline-offset: 2px; border-radius: var(--r-md); }
.lh-gallery figure { flex: 0 0 auto; margin: 0; scroll-snap-align: start; }
.lh-gallery img { display: block; width: auto; max-width: none; height: 210px; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--to-surface); object-fit: cover; }
.lh-gallery figure:first-child img { aspect-ratio: 3 / 2; }

/* About the hotel */
.lh-about { margin-bottom: var(--s5); }
.lh-about-text { margin: 0; color: var(--to-ink-2); font-size: 15px; line-height: 1.65; }
.lh-about-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.lh-more { min-height: 32px; padding: 6px 0; border: 0; background: none; color: var(--to-ink); font-weight: 700; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lh-more:hover { text-decoration-thickness: 2px; }
.lh-more:focus-visible { outline: 2px solid var(--to-ink); outline-offset: 2px; border-radius: 4px; }
.lh-amen { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s3) 0 0; padding: 0; list-style: none; }
.lh-amen li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--to-surface); color: var(--to-ink-2); font-size: 12.5px; }
.lh-amen svg { color: var(--ok); }
.lh-times { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: var(--s3); color: var(--to-muted); font-size: 13.5px; }
.lh-times span { display: inline-flex; align-items: center; gap: 6px; }
.lh-times strong { color: var(--to-ink); font-variant-numeric: tabular-nums; }

/* Travellers on the guest form */
.lh-party { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--to-line); }
.lh-party-title { margin: 0 0 2px; color: var(--to-ink); font: 700 16px/1.3 var(--to-font); }
/* Same 3 / 4 / 5 split and gutter as the lead guest's row above, so the columns line up. */
.lh-traveller { display: grid; grid-template-columns: 3fr 4fr 5fr; gap: 10px var(--s4); align-items: start; padding: var(--s3) 0; border-bottom: 1px solid var(--to-line); }
.lh-traveller:last-child { border-bottom: 0; }
.lh-traveller--child { grid-template-columns: 3fr 4fr 5fr; }
.lh-traveller-who { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s2); color: var(--to-ink-2); font-size: 13.5px; font-weight: 700; }
.lh-tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; background: var(--to-surface); color: var(--to-ink-2); font-size: 11.5px; font-weight: 700; }
.lh-age { display: flex; align-items: center; height: 48px; color: var(--to-muted); font-size: 14px; }
.lh-guests { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.lh-guests li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.lh-guests li span:last-child { color: var(--to-muted); }

@media (max-width: 767.98px) {
    .lh-page { padding-top: var(--s5); }
    .lh-gallery img, .lh-gallery figure:first-child img { height: 170px; }
    .lh-traveller, .lh-traveller--child { grid-template-columns: 1fr 1fr; }
    .lh-traveller > .lh-traveller-title { grid-column: 1 / -1; }
    .lh-room { flex-direction: column; gap: var(--s3); padding: var(--s4); }
    .lh-room-side { align-items: stretch; min-width: 0; text-align: left; }
    .lh-room-side .lh-btn { width: 100%; margin-top: var(--s2); }
    .lh-sum { position: static; }
    .fl-step-line { flex-basis: 16px; }
    /* One line of steps on a phone: only the current step keeps its word on screen (the others
       stay readable to a screen reader). */
    .fl-step:not(.active) > span:not(.fl-step-num) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .fl-steps { flex-wrap: nowrap; }
    .fl-billing-hdr { padding: var(--s4) var(--s4) 0; }
    .fl-billing-body { padding: var(--s3) var(--s4) var(--s4); }
    .lh-cols__side .lh-sum { padding: var(--s4); }
    /* 16px keeps iOS from zooming the page when a field takes focus. */
    .fl-input, .fl-billing input.fl-input, .fl-billing select.fl-input, .fl-billing textarea.fl-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .lh-btn, .fl-input, .lh-back, .lh-link { transition: none; }
    .lh-btn:active { transform: none; }
    .lh-gallery { scroll-behavior: auto; }
}

/* The page is tinted to its last pixel; the footer follows without a white gap. */
main:has(> .lh-page) + .to-footer { margin-top: 0; }

/* On a phone the floating chat and back-to-top buttons would sit on the pay button; the
   payment step carries its own line to WhatsApp instead. */
@media (max-width: 991.98px) {
    body:has(main > .lh-page) .to-wa, body:has(main > .lh-page) .to-top { display: none; }
}

/* Line these pages up with the header: they use Bootstrap's wider .container. */
.lh-page > .container, .lh-hero > .container { max-width: var(--to-container); padding-inline: var(--s4); }
@media (min-width: 768px) { .lh-page > .container, .lh-hero > .container { padding-inline: var(--s5); } }
