/* FORBICI — the selling flows inside the site's layout: /book, /buy/<package>, /account, /checkout/done/<id> and
   /review/<code>. They sit on the ivory surface with navy ink, like a printed booking card: 1px hairlines, corners
   barely softened, navy fill for what is chosen, gold only as a fine accent line (never as text on ivory).
   Tokens, fonts, .btn, .price, .num and .visually-hidden come from theme.css; the --flow-* names map them once for
   these pages, and the fallbacks only cover a token that is missing. booking.css and review.css build on this file.
   Logical properties only; every control is at least 44px; fields are 16px so a phone never zooms into them. */

.flow {
  --flow-ink: var(--ink, #0D1724);
  --flow-soft: var(--ink-soft, #3a4553);
  --flow-paper: var(--ivory, #F8F1E4);
  --flow-fill: var(--ivory-2, #efe5d3);
  --flow-rule: var(--line-ink, rgba(13, 23, 36, 0.16));
  --flow-rule-strong: rgba(13, 23, 36, 0.4);
  --flow-accent: var(--gold, #C4A484);
  --flow-danger: var(--danger, #b3261e);
  --flow-radius: var(--radius, 2px);
  --flow-ring: 0 0 0 3px rgba(13, 23, 36, 0.14);
  --flow-top: calc(var(--header-h, 68px) + 1.5rem);
  min-height: 70svh;
  padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 9vw, 7rem);
  background: var(--flow-paper);
  color: var(--flow-ink);
  color-scheme: light;
  font-size: 1rem;
  line-height: 1.65;
}
/* The flow pages keep a bar and a notice fixed to the screen. The layout's page-in animation moves <main> with a
   transform and keeps filling after it ends, which in some browsers makes <main>, not the screen, the frame those
   fixed pieces hang on. These pages draw their content themselves, so they do without that entrance. */
body[data-flow] main { animation: none; }
main:has(> .flow) { animation: none; }
.flow [hidden] { display: none !important; }
.flow :where(h2, h3, h4) { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.5; font-weight: 700; letter-spacing: 0; }
.flow :where(p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
.flow :where(ul[role="list"], ol[role="list"]) { list-style: none; }
.flow :where(fieldset) { min-width: 0; margin: 0; padding: 0; border: 0; }

/* ---------- headings ---------- */
.flow-head { display: grid; gap: 0.5rem; margin-block-end: clamp(1.5rem, 4vw, 2.5rem); padding-block-end: clamp(1.25rem, 3vw, 2rem); border-block-end: 1px solid var(--flow-rule); }
.flow__eyebrow { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; font-weight: 500; color: var(--flow-soft); }
.flow__eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--flow-accent); }
.flow__title { font-size: clamp(1.875rem, 1.5rem + 1.9vw, 2.875rem); text-wrap: balance; overflow-wrap: anywhere; }
.flow__title:focus { outline: none; }
h2.flow__subtitle, .flow__subtitle { font-family: var(--font-display); font-size: clamp(1.375rem, 1.25rem + 0.7vw, 1.75rem); line-height: 1.3; font-weight: var(--display-weight, 400); letter-spacing: var(--display-tracking, 0); text-wrap: balance; }
[dir="rtl"] .flow__title { line-height: 1.35; }
[dir="rtl"] .flow__subtitle { line-height: 1.5; }
.flow__lede { max-width: 60ch; color: var(--flow-soft); }

/* ---------- shared pieces ---------- */
.flow-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--flow-ink); cursor: pointer;
  font: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: var(--flow-rule-strong); text-decoration-thickness: 1px; text-underline-offset: 0.25em;
  transition: text-decoration-color 150ms ease;
}
.flow-link[disabled] { opacity: 0.5; cursor: default; }
@media (hover: hover) and (pointer: fine) { .flow-link:not([disabled]):hover { text-decoration-color: currentColor; } }
.flow-back { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; margin-block-end: 0.75rem; font-weight: 500; color: var(--flow-ink); }
.flow-back__arrow { width: 1.125em; height: 1.125em; flex: none; transition: transform 200ms var(--ease-out); }
[dir="rtl"] .flow-back__arrow { scale: -1 1; }
/* the arrow is mirrored right-to-left by `scale`, which also mirrors this nudge: one value moves it toward the start in both directions */
@media (hover: hover) and (pointer: fine) { .flow-back:hover .flow-back__arrow { transform: translateX(-4px); } }

.flow-field { display: grid; gap: 0.5rem; min-width: 0; }
.flow-label { font-size: 0.9375rem; font-weight: 700; }
.flow-label__required { margin-inline-start: 0.25em; color: var(--flow-danger); }
.flow-input {
  width: 100%; min-height: 52px; padding: 0.75rem 1rem; border: 1px solid var(--flow-rule-strong); border-radius: var(--flow-radius);
  background: var(--flow-paper); color: var(--flow-ink); font: inherit; font-size: 1rem; line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.flow-input::placeholder { color: var(--flow-soft); opacity: 1; }
.flow-input:focus-visible { border-color: var(--flow-ink); box-shadow: var(--flow-ring); outline: none; }
.flow-field[data-invalid] .flow-input { border-color: var(--flow-danger); }
select.flow-input {
  appearance: none; padding-inline-end: 2.75rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--flow-ink) 50%), linear-gradient(135deg, var(--flow-ink) 50%, transparent 50%);
  background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 1.25rem) 55%, calc(100% - 1.25rem + 6px) 55%;
}
[dir="rtl"] select.flow-input { background-position: 1.25rem 55%, calc(1.25rem + 6px) 55%; }
.flow-hint { font-size: 0.875rem; color: var(--flow-soft); }
.flow-error { font-size: 0.9375rem; font-weight: 500; color: var(--flow-danger); }
.flow-choices { display: grid; gap: 0.5rem; }
.flow-choices legend { margin-block-end: 0.5rem; padding: 0; }
.flow-choices label { display: flex; align-items: center; gap: 0.75rem; min-height: 48px; padding: 0.5rem 1rem; border: 1px solid var(--flow-rule-strong); border-radius: var(--flow-radius); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.flow-choices label:has(input:checked) { border-color: var(--flow-ink); background: var(--flow-fill); }
.flow-choices input { flex: none; width: 1.125rem; height: 1.125rem; accent-color: var(--flow-ink); }

/* a quiet block for "nothing here", "not available" and "did not load": always with a way on */
.flow-state { display: grid; justify-items: start; gap: 0.75rem; max-width: 42rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-block-start: 1px solid var(--flow-accent); background: var(--flow-fill); }
.flow-state > p { max-width: 34em; color: var(--flow-soft); }
.flow-state > p strong { color: var(--flow-ink); }
.flow-state :focus { outline: none; }
.flow-state__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 0.75rem; }

.flow-skeleton { border-radius: var(--flow-radius); background: var(--flow-fill); animation: flow-pulse 1.8s ease-in-out infinite; }
.flow-skeleton--title { height: 2.75rem; width: min(100%, 22rem); }
.flow-skeleton--text { height: 1.25rem; width: min(100%, 30rem); }
.flow-skeleton--row { height: 5rem; margin-block-start: 1rem; }
.flow-skeleton--card { height: 18rem; }
@keyframes flow-pulse { 50% { opacity: 0.55; } }

/* ---------- /account ---------- */
.acct__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1rem 2rem; }
.acct__head > div { display: grid; gap: 0.5rem; min-width: 0; }
.acct-muted { color: var(--flow-soft); font-size: 0.9375rem; }
.acct__section + .acct__section { margin-block-start: clamp(2.5rem, 6vw, 4rem); }
.acct__section > h2 { margin-block-end: 1.25rem; }
.acct__none { color: var(--flow-soft); }
.acct__more { margin-block-start: 1.5rem; }

/* upcoming bookings: when, then what */
.acct-bookings { border-block-start: 1px solid var(--flow-rule-strong); }
.acct-booking { display: grid; gap: 0.375rem 2rem; padding-block: 1.25rem; border-block-end: 1px solid var(--flow-rule); }
.acct-booking__when { display: grid; gap: 0.125rem; }
.acct-booking__day { font-size: 1.125rem; font-weight: 700; }
.acct-booking__time { font-variant-numeric: tabular-nums lining-nums; }
.acct-booking__what { display: grid; gap: 0.125rem; min-width: 0; }
.acct-booking__what h3 { font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
.acct-booking[data-cancelled] :is(.acct-booking__day, .acct-booking__time) { text-decoration: line-through; text-decoration-color: var(--flow-rule-strong); }
@media (min-width: 640px) { .acct-booking { grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); align-items: start; } }
.acct-past { margin-block-start: 1rem; }
.acct-past > summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; cursor: pointer; text-decoration: underline; text-decoration-color: var(--flow-rule-strong); text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.acct-bookings--past { margin-block-start: 0.5rem; border-block-start-color: var(--flow-rule); }
.acct-bookings--past .acct-booking__day { font-size: 1rem; font-weight: 500; }

/* orders: the receipt each booking or package belongs to */
.acct-orders { display: grid; gap: 1rem; }
.acct-order { padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--flow-radius); background: var(--flow-fill); }
.acct-order[data-closed] { background: none; border: 1px solid var(--flow-rule); }
.acct-order__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; }
.acct-order__head h3 { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.acct-order__items { margin-block-start: 1rem; border-block-start: 1px solid var(--flow-rule); }
.acct-order__item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-block: 0.875rem; border-block-end: 1px solid var(--flow-rule); }
.acct-order__item > div { min-width: 0; }
.acct-order__name { font-weight: 500; overflow-wrap: anywhere; }
.acct-order__amount { flex: none; font-weight: 500; }
.acct-order__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-block-start: 1rem; }
.acct-order__total { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.acct-order__total strong { font-size: 1.125rem; font-weight: 700; }
.acct-order__paid, .acct-order__due { display: inline-flex; align-items: baseline; gap: 0.375rem; font-size: 0.9375rem; color: var(--flow-soft); }
.acct-order__due { color: var(--flow-ink); font-weight: 700; }

/* ---------- /buy/<package>: one page from the package to the hosted checkout ---------- */
.buy__grid { display: grid; gap: clamp(2rem, 5vw, 3rem); }
.buy__main { min-width: 0; }
.buy__main > :first-child { margin-block-start: 0; }
.buy__description { max-width: 60ch; color: var(--flow-soft); white-space: pre-line; }
.buy__group { min-width: 0; margin-block-start: clamp(1.75rem, 4vw, 2.5rem); }
.buy__legend { display: block; margin-block-end: 0.75rem; padding: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.5; font-weight: 700; letter-spacing: 0; }
.buy__date { max-width: 22rem; }
.buy-included { border-block-start: 1px solid var(--flow-rule-strong); }
.buy-included li { padding-block: 0.75rem; border-block-end: 1px solid var(--flow-rule); font-variant-numeric: tabular-nums lining-nums; }
.buy-options { display: grid; gap: 0.5rem; }
.buy-option {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.25rem; min-height: 60px; padding: 0.875rem 1rem;
  border: 1px solid var(--flow-rule-strong); border-radius: var(--flow-radius); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.buy-option:has(input:checked) { border-color: var(--navy, #0D1724); background: var(--navy, #0D1724); color: var(--ivory, #F8F1E4); }
.buy-option:has(input:focus-visible) { outline: 2px solid var(--flow-ink); outline-offset: 3px; }
.buy-option__name { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.buy-option__price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.625rem; font-weight: 700; }
.buy-option__price s { font-weight: 400; font-size: 0.9375rem; text-decoration: none; opacity: 0.75; }
.buy-option__price s .num { text-decoration: line-through; }
.buy-option__save { font-size: 0.875rem; font-weight: 400; }
@media (hover: hover) and (pointer: fine) { .buy-option:not(:has(input:checked)):hover { border-color: var(--flow-ink); background: var(--flow-fill); } }
.buy-fields__list { display: grid; gap: 1.25rem; }

.buy-summary { display: grid; gap: 1.25rem; padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--flow-radius); background: var(--flow-fill); }
.buy-summary__title { font-size: 1.125rem; }
.buy-summary__title::after { content: ""; display: block; width: 2.5rem; height: 1px; margin-block-start: 0.75rem; background: var(--flow-accent); }
.buy-summary__lines { display: grid; }
.buy-summary__lines > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding-block: 0.75rem; border-block-end: 1px solid var(--flow-rule); }
.buy-summary__lines dt { min-width: 0; overflow-wrap: anywhere; }
.buy-summary__lines > div:first-child dt { font-weight: 500; }
.buy-summary__lines > div:not(:first-child) dt { color: var(--flow-soft); }
.buy-summary__lines dd { text-align: end; }
.buy-summary__total { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; font-weight: 700; }
.buy-summary__total strong { font-size: 1.375rem; font-weight: 700; }
.buy-summary__deposit { display: flex; justify-content: space-between; gap: 1.5rem; font-size: 0.9375rem; color: var(--flow-soft); }
.buy-summary__bar { display: grid; gap: 0.75rem; }
.buy-summary__dock { display: block; height: 1px; margin-block-end: -1px; }
.buy-summary__go-label { transition: opacity 200ms ease, filter 200ms ease; }
.buy-summary__go[data-busy] .buy-summary__go-label { opacity: 0.6; filter: blur(2px); } /* the blur masks the label swap */
.buy-summary__note { font-size: 0.875rem; color: var(--flow-soft); }

.buy-earlier { display: grid; gap: 0.5rem; padding: 1rem; border: 1px solid var(--flow-rule-strong); border-radius: var(--flow-radius); background: var(--flow-paper); }
.buy-earlier__title { font-size: 1rem; }
.buy-earlier__title:focus { outline: none; }
.buy-earlier__text, .buy-earlier__meta { font-size: 0.9375rem; color: var(--flow-soft); }
.buy-earlier__list { display: grid; }
.buy-earlier__item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-block: 0.625rem; border-block-start: 1px solid var(--flow-rule); }
.buy-earlier__item > div { display: grid; gap: 0.125rem; min-width: 0; }
.buy-earlier__name { font-weight: 500; overflow-wrap: anywhere; }

/* phones: the total and the one action stay within the thumb's reach while the page scrolls, and rest in the
   summary once it is on screen */
@media (max-width: 899.98px) {
  .buy[data-bar-floating] .buy-summary__bar {
    position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30; gap: 0.5rem;
    padding: 0.75rem var(--gutter, 5vw) max(0.75rem, env(safe-area-inset-bottom));
    border-block-start: 1px solid var(--flow-rule-strong); background: var(--flow-paper);
  }
  .buy[data-bar-floating] .buy-summary__total strong { font-size: 1.25rem; }
}
@media (min-width: 900px) {
  .buy__grid { grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem); gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
  .buy__side { position: sticky; inset-block-start: var(--flow-top); }
}

/* ---------- /checkout/done/<id>: the return from the hosted checkout ---------- */
.done { display: grid; justify-items: start; gap: 0.75rem; max-width: 40rem; padding-block: clamp(1rem, 5vw, 3rem); }
.done__mark { display: grid; place-items: center; width: 4rem; height: 4rem; margin-block-end: 0.75rem; border: 1px solid var(--flow-rule-strong); border-radius: var(--flow-radius); color: var(--flow-ink); }
.done[data-state="success"] .done__mark { border-color: var(--navy, #0D1724); background: var(--navy, #0D1724); color: var(--ivory, #F8F1E4); }
.done[data-state="failure"] .done__mark { border-color: var(--flow-danger); color: var(--flow-danger); }
.done__mark svg { width: 2.25rem; height: 2.25rem; }
.done__spinner { width: 1.5rem; height: 1.5rem; border: 1.5px solid var(--flow-rule); border-block-start-color: var(--flow-ink); border-radius: 50%; animation: done-spin 700ms linear infinite; }
@keyframes done-spin { to { transform: rotate(360deg); } }
/* the one moment of delight: the check draws itself once the order is confirmed */
.done__check { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 400ms var(--ease-out) 120ms; }
@starting-style { .done__check { stroke-dashoffset: 1; } }
.done__text { max-width: 34em; color: var(--flow-soft); }
.done__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .flow-skeleton { animation: none; }
  .flow-input, .flow-link, .flow-back__arrow, .buy-option, .buy-summary__go-label, .flow-choices label { transition: none; }
  .flow-back:hover .flow-back__arrow { transform: none; }
  .buy-summary__go[data-busy] .buy-summary__go-label { filter: none; }
  .done__check { transition: none; }
  .done__spinner { animation-duration: 1.6s; }
}
