/*
 * Booking window (parts/booking.php + assets/tour.js). Loaded on tour pages after desktop.css, mobile.css and blog.css.
 * A file of its own, because desktop.css and mobile.css are edited by hand. Classes here: bk2, optg, opt__pax, paxrow,
 * ord. The option cards (.opt), calendar, fields, buttons and colours come from desktop.css and mobile.css.
 * The old window's rules there (.bk, .bk__*, .opt-group, .pax*, .sum-list*) are no longer used by anything.
 * Layout: title row, steps row, then the step on the left and the order card on the right; phone (max-width: 760px):
 * full screen, the order card becomes the bar at the bottom.
 */

/* ---- Window ---- */
/* Computer: a grey window with white cards on it (title row, steps, the step, the order), the same grey gap around and
   between them (--bk2-gap, smaller on low screens). Phone: one white screen, see the block at the end. */
.bk2 { --bk2-gap: 10px; width: min(1120px, calc(100vw - 48px)); height: min(860px, calc(100vh - 64px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--radius-20); background: var(--bg); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, .35); overflow: hidden; }
.bk2::backdrop { background: rgba(21, 18, 58, .55); backdrop-filter: blur(3px); }
.bk2__frame { display: flex; flex-direction: column; gap: var(--bk2-gap); height: 100%; margin: 0; padding: var(--bk2-gap); }
.bk2 [hidden] { display: none !important; }
.bk2__top, .bk2__stepsrow, .bk2__main { border-radius: 22px; background: #fff; }

/* Title row: photo, "Booking" and the tour name, WhatsApp and close */
.bk2__top { display: flex; flex: none; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; }
.bk2__img { width: 52px; height: 52px; flex: none; border-radius: 14px; object-fit: cover; }
.bk2__titles { flex: 1 1 auto; min-width: 0; }
.bk2__eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; line-height: 1.2; text-transform: uppercase; }
.bk2__title { margin: 0; overflow: hidden; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.bk2__title:focus { outline: none; }
.bk2__tools { display: flex; flex: none; gap: 8px; }
.bk2__wa {display:none;}
.bk2__wa, .bk2__wa:hover { color: var(--green); }

/* Steps: under the title, on the full width. is-done: behind the current step; is-open: ahead but already visited. */
/* The side paddings take off the buttons' own (4px left, 8px right), so the first circle and the last name stand 16px in, as the photo. */
.bk2__stepsrow { display: flex; flex: none; align-items: center; padding: 8px 8px 8px 12px; }
.bk2__steps { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; min-height: 42px; margin: 0; padding: 0; list-style: none; }
.bk2__steps li { display: flex; flex: 1 1 0; align-items: center; min-width: 0; }
.bk2__steps li:last-child { flex: none; }
.bk2__steps li:not(:last-child)::after { content: ""; flex: 1 1 auto; min-width: 16px; height: 2px; margin: 0 16px; border-radius: 2px; background: var(--line); }
.bk2__steps li.is-through:not(:last-child)::after { background: var(--orange); }
.bk2__stepbtn { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 15px var(--font); text-align: left; white-space: nowrap; cursor: default; }
.bk2__num { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1.5px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 14px; font-weight: 600; }
.bk2__stepbtn.is-active { color: var(--black); font-weight: 600; }
.bk2__stepbtn.is-active .bk2__num { border-color: var(--orange); background: var(--orange); color: var(--white); }
.bk2__stepbtn.is-done, .bk2__stepbtn.is-open { color: var(--black); cursor: pointer; }
.bk2__stepbtn.is-done:hover .bk2__steplabel, .bk2__stepbtn.is-open:hover .bk2__steplabel { text-decoration: underline; text-underline-offset: 3px; }
.bk2__stepbtn.is-done .bk2__num { border-color: var(--green-tint); background: var(--green-tint); color: var(--green); font-size: 0; }
.bk2__stepbtn.is-done .bk2__num::after { content: "✓"; font-size: 15px; }

/* Two columns: the step on the left (it scrolls inside its card), the order card on the right */
.bk2__cols { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--bk2-gap); min-height: 0; }
.bk2__main { min-height: 0; padding: 18px 20px 20px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.bk2__main h3 { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
.bk2__steph { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-bottom: 14px; }
.bk2__steph h3 { margin: 0; }
.bk2__steph .switch { margin: 0; font-size: 14.5px; }
.bk2__resnote { margin: -4px 0 14px; }
.bk2__recap { display: none; }

/* Step 1: groups of options that fold, and the people counters inside the chosen option */
.bk2 .opt { grid-template-areas: "main price" "meta meta" "details details" "pax pax"; }
.optg + .optg { margin-top: 10px; }
.optg__head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border: 0; border-radius: 16px; background: var(--bg); color: var(--black); font: 600 15px var(--font); text-align: left; cursor: pointer; }
.optg__head:hover { background: var(--cream); }
.optg__head span { flex: none; }
.optg__head small { min-width: 0; margin-left: auto; overflow: hidden; color: var(--muted); font-size: 14px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.optg__head svg { flex: none; color: var(--muted); transition: transform .2s; }
.optg__head[aria-expanded="true"] svg { transform: rotate(180deg); }
.optg__body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.opt__pax { grid-area: pax; margin: 12px 0 4px; padding: 0 14px 2px; border-radius: 14px; background: #fff; cursor: auto; }
.opt__pax.is-flash { animation: bk2-flash 1.4s ease-out 1; }
@keyframes bk2-flash { 0%, 60% { box-shadow: inset 0 0 0 1px var(--orange), 0 0 0 4px rgba(247, 112, 26, .28); } 100% { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 4px rgba(247, 112, 26, 0); } }
.opt__paxcap { margin: 0; padding: 10px 0 2px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.paxrow { display: flex; align-items: center; gap: 14px; min-height: 54px; }
.paxrow + .paxrow { border-top: 1px dashed var(--line); }
.paxrow__text { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.paxrow__text strong { font-size: 15px; font-weight: 600; }
.paxrow__text small { margin-left: 2px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.paxrow__price { color: var(--text-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.paxrow .stepper { flex: none; gap: 8px; }
.paxrow .stepper button { width: 36px; height: 36px; font-size: 19px; }
.paxrow .stepper output { min-width: 24px; }
.opt__paxnote { margin: 0; padding: 8px 0 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Step 2: the legend under the calendar (on a phone under the heading) */
.bk2__legend { margin-top: 16px; }

/* Step 3 */
/* The room column is as wide as its label, so the label stays on one line and both fields stand level. */
.bk2__hotelrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.bk2__hotelrow > [data-room] { min-width: 220px; }
.bk2__hotelrow > [data-room] .field-label { white-space: nowrap; }
.bk2__hotelrow:has(> [data-room][hidden]) { grid-template-columns: minmax(0, 1fr); }
.bk2 .link-btn { text-align: left; }
.bk2__slot[data-consent-slot="body"] { margin-top: 20px; }
.bk2__privacy { margin: 14px 0 0; }

/* Order card: what is chosen, each part with its own "Change"; under the dashed line the total and the button */
/* overflow-x: the notches of the dashed line stick out 10px on each side */
.bk2__side { display: flex; flex-direction: column; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.bk2__sum { flex: 1 1 auto; min-height: 0; padding: 16px 20px 12px; scrollbar-width: thin; border-radius: 22px 22px 0 0; background: #fff; overflow-x: hidden; overflow-y: auto; }
.bk2__label { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ord__block { padding: 9px 0 10px; border-top: 1px solid var(--line-soft); }
.ord__block--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ord__main { min-width: 0; }
.ord__main .ord__label { display: block; }
.ord__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.ord__label { color: var(--muted); font-size: 13.5px; }
.ord__val { margin: 1px 0 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.ord__val.is-empty { color: var(--muted); font-weight: 400; }
.ord__edit { flex: none; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--orange-text); font: 500 12.5px/1.3 var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.ord__edit:hover { border-color: var(--orange); background: var(--cream); }
.ord__lines { margin: 2px 0 0; font-size: 15px; }
.ord__lines > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 3px 0; }
.ord__lines dt { font-weight: 600; }
.ord__lines dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.ord__lines .is-ok dt { color: var(--text-2); font-weight: 400; }
.ord__lines .is-ok dd { color: var(--green); font-weight: 500; }
.bk2__cancel { min-height:35px;justify-content: center; margin: 4px 0 0; border-radius: 50px; font-size: 13px; text-align: center; }
.bk2__cancel .ico { flex: none; }
.bk2__bar { position: relative; display: flex; flex: none; flex-direction: column; gap: 10px; padding: 14px 20px 16px; border-top: 2px dashed var(--line); border-radius: 0 0 22px 22px; background: #fff; }
.bk2__bar::before, .bk2__bar::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.bk2__bar::before { left: -10px; }
.bk2__bar::after { right: -10px; }
.bk2__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bk2__total span { color: var(--muted); font-size: 15px; }
.bk2__total strong { font-size: 28px; font-weight: 700; line-height: 1.1; }
.bk2__eur { margin: 2px 0 0; color: var(--muted); font-size: 13px; text-align: right; }
.bk2__more { display: none; }
.bk2__cta { width: 100%; }
.bk2__cta-short { display: none; }
/* Back (steps 2 and 3): under the main button, quieter than it */
.bk2__prev { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-15); background: #fff; color: var(--black); font: 500 15px/1.2 var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.bk2__prev:hover { border-color: var(--black); background: var(--bg); }
.bk2__prev svg { flex: none; }
.bk2__consent .consent { font-size: 13px; }
.bk2__msg { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--cream); color: var(--black); font-size: 14px; line-height: 1.45; }
.bk2__msg.is-error { background: #FBECE8; color: var(--red); font-weight: 500; }
.bk2__secure { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.bk2__secure svg { flex: none; margin-top: 1px; color: var(--green); }

@media (min-width: 761px) {
  .bk2 .calendar__day { width: 42px;height: 42px; }
}
/* Low screens (laptops): the window takes nearly the whole height, the rows get tighter */
@media (min-width: 761px) and (max-height: 800px) {
  .bk2 { --bk2-gap: 12px; height: calc(100vh - 32px); }
  .bk2__top { padding-top: 10px; padding-bottom: 10px; }
  .bk2__stepsrow { padding-top: 4px; padding-bottom: 4px; }
  .bk2__main { padding-top: 14px; }
  .bk2__bar { gap: 8px; padding: 12px 18px 14px; }
  .bk2__prev { min-height: 40px; }
}
/* Narrow windows and tablets: a narrower order card, then one month in the calendar */
@media (min-width: 761px) and (max-width: 1040px) {
  .bk2__cols { grid-template-columns: minmax(0, 1fr) 300px; }
  .bk2__sum { padding-left: 16px; padding-right: 16px; }
  .bk2__bar { padding-left: 16px; padding-right: 16px; }
  .bk2 .calendar__months { gap: 20px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .bk2 .calendar__months { grid-template-columns: 1fr; }
  .bk2 .form-grid { grid-template-columns: 1fr; }
  .bk2__hotelrow { grid-template-columns: minmax(0, 1fr); }
  .bk2__hotelrow > [data-room] .field-label { white-space: normal; }
}

/* ---- Phone: full screen; the order card is the bar at the bottom and opens above it ---- */
@media (max-width: 760px) {
  .bk2 { width: 100vw; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; background: #fff; }
  .bk2__frame { gap: 0; padding: 0; }
  .bk2__top, .bk2__stepsrow, .bk2__main { border-radius: 0; }
  .bk2__top { gap: 6px; padding: 8px 8px 0 16px; }
  .bk2__img { display: none; }
  .bk2__titles { padding-right: 4px; }
  .bk2__eyebrow { margin: 0 0 1px; font-size: 11px; }
  .bk2__title { font-size: 16px; }
  .bk2__tools { gap: 4px; }
  .bk2__tools .icon-btn { box-shadow: none; }

  /* Steps: three bars with the names under them */
  .bk2__stepsrow { padding: 10px 16px 9px; border-bottom: 1px solid var(--line-soft); }
  .bk2__steps { align-items: flex-start; gap: 6px; min-height: 0; }
  .bk2__steps li, .bk2__steps li:last-child { flex: 1 1 0; }
  .bk2__steps li::after { content: none !important; }
  .bk2__stepbtn { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; padding: 0; border-radius: 0; font-size: 12.5px; }
  .bk2__stepbtn::before { content: ""; height: 4px; border-radius: 4px; background: var(--line); }
  .bk2__stepbtn.is-active::before, .bk2__stepbtn.is-done::before { background: var(--orange); }
  .bk2__num { display: none; }
  .bk2__steplabel { overflow: hidden; text-overflow: ellipsis; text-align:center;}
  .bk2__stepbtn.is-done .bk2__steplabel::before { content: "✓ "; color: var(--green); }

  .bk2__cols { display: flex; flex-direction: column; gap: 0; }
  .bk2__main { flex: 1 1 auto; padding: 16px 16px 24px; }
  .bk2__main h3 { font-size: 18px; }
  .bk2__steph { flex-direction: column; align-items: flex-start; }
  .bk2__recap { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 10px 14px; border-radius: 14px; background: var(--cream); font-size: 14px; line-height: 1.4; }
  .bk2__recap p { min-width: 0; margin: 0; }
  .bk2__recap .ord__edit { border-color: rgba(185, 72, 10, .3); background: transparent; }
  .bk2__hotelrow { grid-template-columns: minmax(0, 1fr); }
  .bk2__hotelrow > [data-room] .field-label { white-space: normal; }

  /* Step 2: the legend under the heading, then the months one under the other; the times sit under the chosen day's month */
  .bk2__date { display: flex; flex-direction: column; }
  .bk2__date .bk2__steph { order: -2; margin-bottom: 10px; }
  .bk2__legend { order: -1; margin: 0 0 16px; }
  .bk2 .calendar__months--list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bk2 .calendar__months--list > .time-slots { margin: -8px 0 0; padding: 12px 14px 14px; border: 0; border-radius: 16px; background: var(--bg); }

  .bk2 .opt { grid-template-areas: "main main" "meta price" "details details" "pax pax"; }
  .optg__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 10px; padding: 9px 14px; }
  .optg__head svg { grid-row: 1 / 3; align-self: center; }
  .optg__head small { margin-left: 0; font-size: 13px; }
  .opt__pax { margin-top: 10px; padding: 0 12px 2px; }
  .paxrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text stepper" "price stepper"; gap: 1px 10px; padding: 9px 0; }
  .paxrow__text { grid-area: text; align-self: end; }
  .paxrow__price { grid-area: price; align-self: start; font-size: 13.5px; }
  .paxrow .stepper { grid-area: stepper; }

  /* Bottom bar: total and people (tap for the whole order) on the left, the button on the right */
  .bk2__side { flex: none; padding: 0; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 24px rgba(21, 18, 58, .08); overflow: visible; }
  .bk2__sum { display: none; max-height: 55vh; max-height: 55dvh; padding: 16px 16px 6px; border-radius: 0; }
  .bk2__side.is-open .bk2__sum { display: block; }
  .bk2__sum .ord__block:first-of-type { padding-top: 0; border-top: 0; }
  .bk2__sum .bk2__cancel { margin-bottom: 8px; }
  .bk2__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
  .bk2__side.is-open .bk2__bar { border-top: 1px solid var(--line-soft); }
  .bk2__bar::before, .bk2__bar::after { content: none; }
  .bk2__msg { grid-row: 1; grid-column: 1 / -1; margin-bottom: 10px; }
  .bk2__totalrow { grid-row: 2; grid-column: 1; min-width: 0; margin-right: 6px; }
  .bk2__total { justify-content: flex-start; }
  .bk2__total span { display: none; }
  .bk2__total strong { font-size: 22px; }
  /* May break onto a second line on narrow screens, so the total and the buttons keep one line */
  .bk2__eur { margin: 0; font-size: 12px; line-height: 1.3; text-align: left; }
  .bk2:not([data-at="3"]) .bk2__eur { display: none; }
  .bk2__more { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 0; border: 0; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer; }
  .bk2__more span { overflow: hidden; text-decoration: underline dotted; text-overflow: ellipsis; text-underline-offset: 3px; white-space: nowrap; }
  .bk2__more svg { flex: none; transition: transform .2s; }
  .bk2__side.is-open .bk2__more svg { transform: rotate(180deg); }
  .bk2__cta { grid-row: 2; grid-column: 3; width: auto; min-height: 56px; padding: 12px 18px; font-size: 16px; }
  /* Back: a square with the arrow left of the main button; the word stays for screen readers */
  .bk2__prev { grid-row: 2; grid-column: 2; width: 52px; min-height: 52px; padding: 0; }
  .bk2__prev span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* A total too wide to stand next to the buttons (assets/tour.js sets is-tight): it takes the line above them */
  .bk2__bar.is-tight { grid-template-columns: auto minmax(0, 1fr); }
  .bk2__bar.is-tight .bk2__totalrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; grid-column: 1 / -1; margin: 0 0 10px; }
  .bk2__bar.is-tight .bk2__eur { grid-row: 1; grid-column: 2; min-width: 0; text-align: right; }
  .bk2__bar.is-tight .bk2__more { grid-row: 2; grid-column: 1; justify-self: start; }
  .bk2__bar.is-tight .bk2__prev { grid-row: 3; grid-column: 1; }
  .bk2__bar.is-tight .bk2__cta { grid-row: 3; grid-column: 2; width: 100%; }
  .bk2__bar.is-tight:has(.bk2__prev[hidden]) .bk2__cta { grid-column: 1 / -1; }
  .bk2__cta-long { display: none; }
  .bk2__cta-short { display: inline; }
  .bk2__secure { display: none; }
  /* While the keyboard is open the bar steps aside (assets/tour.js sets is-kb) */
  .bk2.is-kb .bk2__side { display: none; }
}
