/* Booking page: "contact us" landing (no token) and the private booking link form (?t=token).
   Builds on the booking-* / form-grid / total-summary styles in style.css. */

.bk-page .booking-shell { align-items: start; padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 80px); }
.bk-app { width: min(820px, 100%); }
.bk-view[hidden] { display: none !important; }

.bk-app h1 { margin: 0; color: var(--mono-text); font-size: clamp(28px, 4.6vw, 42px); line-height: 1.25; }
.bk-lead { max-width: 56ch; margin: 14px auto 0; color: var(--mono-muted); font-size: clamp(15px, 1.8vw, 17px); line-height: 1.9; }
.bk-app .eyebrow { margin: 0 0 10px; color: var(--accent); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
html[dir="rtl"] .bk-app .eyebrow { letter-spacing: 0; text-transform: none; font-size: 13px; }

/* ---------- landing ---------- */
.bk-landing, .bk-closed, .bk-done, .bk-loading { text-align: center; padding: clamp(6px, 2vw, 18px) 0; }
.bk-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: clamp(26px, 4vw, 38px) 0; padding: 0; list-style: none; text-align: start; counter-reset: none; }
.bk-steps li { display: grid; gap: 12px; align-content: start; padding: 20px 18px; border: 1px solid var(--mono-line); border-radius: 12px; background: color-mix(in srgb, var(--mono-text) 3%, transparent); }
.bk-steps strong { display: block; color: var(--mono-text); font-size: 16px; line-height: 1.5; }
.bk-steps p { margin: 6px 0 0; color: var(--mono-muted); font-size: 14px; line-height: 1.8; }
.bk-step-num {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  font: 700 16px/1 "JetBrains Mono", monospace;
}

.bk-wa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px;
  border-radius: 999px; background: #1fa855; color: #fff !important; font-weight: 800; font-size: 16px; text-decoration: none;
  box-shadow: 0 14px 32px rgba(31, 168, 85, .25); transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.bk-wa-btn:hover { transform: translateY(-1px); background: #1a9a4d; box-shadow: 0 18px 38px rgba(31, 168, 85, .32); }
.bk-wa-btn:focus-visible { outline: 3px solid color-mix(in srgb, #1fa855 45%, transparent); outline-offset: 3px; }
.bk-wa-btn img { width: 26px; height: 26px; }
.bk-closed .bk-wa-btn, .bk-done .bk-wa-btn { margin-top: 26px; }

/* ---------- loading / closed / done ---------- */
.bk-loading { display: grid; justify-items: center; gap: 16px; min-height: 220px; align-content: center; color: var(--mono-muted); }
.bk-loading p { margin: 0; }
.bk-spinner { width: 38px; height: 38px; border: 3px solid var(--mono-line); border-top-color: var(--accent); border-radius: 50%; animation: bk-spin .8s linear infinite; }
@keyframes bk-spin { to { transform: rotate(360deg); } }
.bk-closed-icon, .bk-done-icon {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 800 32px/1 "JetBrains Mono", monospace;
}
.bk-done-icon { background: color-mix(in srgb, #1fa855 16%, transparent); color: #1fa855; animation: bk-pop .45s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes bk-pop { from { transform: scale(.6); opacity: 0; } }
.bk-home-link { display: block; width: fit-content; margin: 18px auto 0; color: var(--mono-muted); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.bk-home-link:hover { color: var(--accent); }

/* ---------- agreed terms ---------- */
.bk-agreed { margin-bottom: 8px; }
.bk-agreed-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.bk-date-card {
  display: grid; justify-items: center; align-content: center; gap: 4px; padding: 18px 10px; border-radius: 12px;
  background: var(--accent); color: #fff; text-align: center;
}
.bk-date-day { font: 700 46px/1 "Bebas Neue", "Cairo", sans-serif; letter-spacing: .02em; }
.bk-date-month { font-weight: 800; font-size: 15px; }
.bk-date-weekday { font-size: 13px; opacity: .85; }
.bk-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.bk-fact { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--mono-line); border-radius: 12px; min-width: 0; }
.bk-fact dt { color: var(--mono-muted); font-size: 12.5px; font-weight: 700; }
.bk-fact dd { margin: 0; color: var(--mono-text); font-size: 15.5px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.bk-fact.is-wide { grid-column: 1 / -1; }

.bk-money { margin: 0 0 16px !important; }
.bk-money .customer-summary-item strong { direction: ltr; unicode-bidi: isolate; }
.bk-agreement { margin: 0 0 8px; padding: 16px 18px; border: 1px solid var(--mono-line); border-inline-start: 3px solid var(--accent); border-radius: 12px; }
.bk-agreement h3 { margin: 0 0 8px; color: var(--mono-text); font-size: 15px; }
.bk-agreement p { margin: 0; color: var(--mono-text); white-space: pre-wrap; line-height: 1.9; }

/* ---------- form ---------- */
.bk-app .input-group { position: relative; }
.bk-app textarea { width: 100%; min-height: 96px; resize: vertical; font: inherit; }
.bk-err { display: block; min-height: 0; color: #d4553f; font-size: 13px; font-weight: 700; }
.bk-err:empty { display: none; }
.bk-app .is-invalid { border-color: #d4553f !important; box-shadow: 0 0 0 3px rgba(212, 85, 63, .14) !important; }
.bk-err-agree { margin: -6px 0 12px; }
.bk-form-error { margin: 0 0 12px; padding: 12px 16px; border-radius: 10px; background: rgba(212, 85, 63, .1); color: #d4553f; font-weight: 700; text-align: center; }
.bk-app .submit-btn { width: 100%; }
.bk-app .submit-btn.is-busy { cursor: progress; opacity: .8; }

@media (max-width: 760px) {
  .bk-steps { grid-template-columns: minmax(0, 1fr); }
  .bk-steps li { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 16px; }
  .bk-agreed-grid { grid-template-columns: minmax(0, 1fr); }
  .bk-date-card { grid-template-columns: auto auto; grid-auto-flow: column; justify-content: center; gap: 4px 14px; padding: 14px; }
  .bk-date-day { grid-row: span 2; font-size: 44px; }
  .bk-wa-btn { width: 100%; }
}
@media (max-width: 420px) {
  .bk-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bk-spinner, .bk-done-icon { animation: none; }
}
.bk-app { position: relative; }

/* client picks date / city / packages */
.bk-agreement-top { margin: 0 0 22px; }
.bk-busy { margin: 10px 0 0; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--mono-text); font-size: 14px; font-weight: 700; line-height: 1.6; }
.bk-busy[hidden], .bk-hint[hidden] { display: none; }
.bk-hint { margin: 8px 0 0; color: var(--mono-muted); font-size: 13.5px; }
.bk-err-block { margin-top: 8px; }
.bk-packages { margin-bottom: 14px; }
.bk-packages.is-invalid .package-card { border-color: #d4553f; }
.bk-app input[type="date"] { min-height: 48px; font-family: inherit; }
.bk-app .bk-money { margin: 26px 0 16px !important; }

/* ---------- 4-step form ---------- */
.bk-step[hidden] { display: none !important; }
.bk-step > .booking-section-title:first-of-type { margin-top: 8px; }
.bk-step .booking-section-title:focus { outline: none; }

.bk-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 26px 0 28px; padding: 0; list-style: none; counter-reset: none; }
.bk-progress li { position: relative; display: grid; justify-items: center; }
.bk-progress li + li::before {
  content: ""; position: absolute; top: 19px; inset-inline-end: calc(50% + 24px); inset-inline-start: calc(-50% + 24px);
  height: 2px; border-radius: 2px; background: var(--mono-line); transition: background-color .25s ease;
}
.bk-progress li.is-done::before, .bk-progress li.is-current::before { background: var(--accent); }
.bk-progress button {
  display: grid; justify-items: center; gap: 8px; padding: 0 4px; border: 0; background: none; color: var(--mono-muted);
  font: inherit; cursor: pointer; text-align: center;
}
.bk-progress button:disabled { cursor: default; }
.bk-progress button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.bk-dot {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--mono-line); background: var(--mono-bg, transparent); color: var(--mono-muted);
  font: 700 15px/1 "JetBrains Mono", monospace; transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.bk-dot-label { font-size: 13px; font-weight: 800; line-height: 1.35; }
.bk-progress li.is-done .bk-dot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.bk-progress li.is-current .bk-dot { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.bk-progress li.is-current .bk-dot-label { color: var(--mono-text); }
.bk-progress li.is-done button:hover .bk-dot-label { color: var(--accent); }

/* step 1 */
.bk-date-field { max-width: 380px; }
.bk-field-title { margin: 22px 0 10px; color: var(--mono-text); font-weight: 700; }
.bk-cities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bk-city, .bk-pkg {
  position: relative; display: grid; align-content: start; gap: 6px; padding: 16px 14px; border: 1px solid var(--mono-line);
  border-radius: 12px; background: color-mix(in srgb, var(--mono-text) 3%, transparent); color: var(--mono-text);
  font: inherit; text-align: center; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.bk-city:hover, .bk-pkg:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.bk-city:focus-visible, .bk-pkg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bk-city strong { font-size: 16px; }
.bk-city span { color: var(--mono-muted); font-size: 12.5px; font-weight: 700; }
.bk-city.selected, .bk-pkg.selected {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 26px rgba(0, 0, 0, .14);
}
.bk-city.selected span { color: var(--accent); }
.bk-cities.is-invalid .bk-city { border-color: #d4553f; }

/* step 2 */
.bk-pkg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.bk-promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: calc(50% - 6px); }
.bk-pkg { padding: 18px 14px 16px; text-align: start; gap: 8px; }
/* "most popular": a small pill inside the card, on its own line above the name */
.bk-pkg-badge { grid-column: 1 / -1; justify-self: start; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 11.5px; font-weight: 800; line-height: 1.5; font-style: normal; white-space: nowrap; }
.bk-pkg.is-featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--mono-line)); }
.bk-pkg-name { font-size: 15.5px; line-height: 1.4; }
.bk-pkg-price { color: var(--mono-muted); font-size: 13px; font-weight: 700; direction: ltr; unicode-bidi: isolate; justify-self: start; }
html[dir="rtl"] .bk-pkg-price { direction: rtl; }
.bk-pkg-price b { color: var(--accent); font: 700 26px/1.1 "Bebas Neue", "JetBrains Mono", sans-serif; letter-spacing: .02em; }
.bk-pkg-items { display: grid; gap: 6px; margin: 6px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--mono-line); list-style: none; color: var(--mono-muted); font-size: 12.5px; font-weight: 600; line-height: 1.55; }
.bk-pkg-items li.is-new { color: var(--mono-text); }
/* selected: a check in front of the name (in the flow, so it never covers the badge or the price) */
.bk-pkg-name { display: flex; align-items: center; gap: 8px; }
.bk-pkg.selected .bk-pkg-name::before {
  content: "✓"; flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent); color: #fff; font: 800 11px/1 sans-serif;
}
.bk-packages.is-invalid .bk-pkg { border-color: #d4553f; }

/* step 4 */
.bk-review { display: grid; gap: 12px; margin: 0 0 4px; }
.bk-review-group { padding: 14px 18px; border: 1px solid var(--mono-line); border-radius: 12px; }
.bk-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.bk-review-head h3 { margin: 0; color: var(--mono-text); font-size: 15px; }
.bk-review-edit { padding: 4px 12px; border: 1px solid var(--mono-line); border-radius: 999px; background: none; color: var(--accent); font: 700 12.5px/1.6 inherit; cursor: pointer; }
.bk-review-edit:hover { border-color: var(--accent); }
.bk-review-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px dashed var(--mono-line); }
.bk-review-row dt { color: var(--mono-muted); font-size: 13.5px; font-weight: 700; }
.bk-review-row dd { margin: 0; color: var(--mono-text); font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }
html[dir="rtl"] .bk-review-row dd[dir="ltr"] { text-align: end; justify-self: start; }
.bk-app .bk-money { margin: 18px 0 0 !important; }
.bk-terms { margin-top: 18px !important; }
.bk-terms ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 10px; color: var(--mono-muted); line-height: 1.8; }
.bk-terms li { padding: 0; }
.bk-terms li::before { content: none; }
.bk-terms li::marker { color: var(--accent); font-weight: 800; }
.bk-extra-terms { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--mono-line); }
.bk-extra-terms[hidden] { display: none; }
.bk-extra-terms h4 { margin: 0 0 10px; color: var(--accent); font-size: 14px; }
.bk-extra-terms ol { color: var(--mono-text); }

/* nav */
.bk-nav { display: grid; gap: 14px; margin-top: 26px; }
.bk-running { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--mono-line); border-radius: 10px; }
.bk-running[hidden] { display: none; }
.bk-running span { color: var(--mono-muted); font-weight: 700; }
.bk-running strong { color: var(--mono-text); font-size: 18px; direction: ltr; unicode-bidi: isolate; }
.bk-nav-buttons { display: flex; gap: 12px; }
.bk-nav-buttons [hidden] { display: none !important; }
.bk-nav-buttons .submit-btn { flex: 1 1 auto; margin-top: 0; }
.bk-next { background: var(--accent) !important; }
.bk-back {
  flex: 0 0 auto; min-width: 110px; padding: 15px 18px; border: 1px solid var(--mono-line); border-radius: 8px;
  background: none; color: var(--mono-text); font: inherit; font-weight: 800; cursor: pointer;
}
.bk-back:hover { border-color: var(--accent); color: var(--accent); }
.bk-app .bk-form-error { margin: 18px 0 0; }

@media (max-width: 760px) {
  .bk-progress { margin: 20px -6px 22px; }
  .bk-dot { width: 34px; height: 34px; font-size: 13px; }
  .bk-progress li + li::before { top: 16px; inset-inline-end: calc(50% + 21px); inset-inline-start: calc(-50% + 21px); }
  .bk-dot-label { font-size: 11.5px; }
  .bk-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-pkg-grid, .bk-promo-grid { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .bk-pkg { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
  .bk-pkg-name { grid-column: 1; }
  .bk-pkg-price { grid-column: 2; grid-row: 1; }
  .bk-pkg-items { grid-column: 1 / -1; }
  .bk-date-field { max-width: none; }
  .bk-review-row { grid-template-columns: 110px minmax(0, 1fr); }
  .bk-back { min-width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-progress li::before, .bk-dot, .bk-city, .bk-pkg { transition: none; }
}
.bk-app .bk-next { color: #fff !important; }

/* group errors: only the cards' own stroke turns red, never a box around the group */
.bk-app .bk-cities.is-invalid, .bk-app .bk-packages.is-invalid { border: 0 !important; box-shadow: none !important; }
.bk-cities.is-invalid .bk-city { border-color: #d4553f; }

/* ---------- custom date picker (assets/js/booking-calendar.js) ---------- */
.bk-date-field { display: grid; gap: 10px; max-width: 420px; }
.bk-date-field .bk-field-title { margin: 0; }
.bk-cal {
  padding: 14px 14px 10px; border: 1px solid var(--mono-line); border-radius: 14px;
  background: color-mix(in srgb, var(--mono-text) 3%, transparent); user-select: none;
}
.bk-app .bk-cal.is-invalid { border-color: #d4553f !important; box-shadow: none !important; }
.bk-cal-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; margin-bottom: 10px; }
.bk-cal-nav, .bk-cal-title, .bk-cal-day, .bk-cal-month {
  border: 0; background: none; color: var(--mono-text); font: inherit; cursor: pointer;
}
.bk-cal-nav { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--mono-line); }
.bk-cal-nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.bk-cal-nav:disabled { opacity: .3; cursor: default; }
.bk-cal-arrow { display: block; }
.bk-cal-title { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 10px; font-weight: 800; font-size: 16px; }
.bk-cal-title:hover { color: var(--accent); }
.bk-cal-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; }
.bk-cal-week, .bk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-cal-week span { padding: 4px 0 6px; color: var(--mono-muted); font-size: 12px; font-weight: 800; text-align: center; }
.bk-cal-week .is-friday { color: color-mix(in srgb, var(--accent) 75%, var(--mono-muted)); }
.bk-cal-day {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: 38px; border-radius: 10px;
  font: 700 15px/1 "JetBrains Mono", "Cairo", monospace; transition: background-color .15s ease, color .15s ease;
}
.bk-cal-day:hover:not(:disabled):not(.is-selected) { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.bk-cal-day:disabled { color: var(--mono-muted); opacity: .35; cursor: default; }
.bk-cal-day.is-today { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.bk-cal-day.is-busy::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #d4553f; }
.bk-cal-day.is-selected { background: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.bk-cal-day.is-selected::after { background: #fff; }
.bk-cal-day:focus-visible, .bk-cal-month:focus-visible, .bk-cal-title:focus-visible, .bk-cal-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bk-cal-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 6px; }
.bk-cal-month { min-height: 48px; border-radius: 10px; border: 1px solid var(--mono-line); font-weight: 700; font-size: 14px; }
.bk-cal-month:hover:not(:disabled) { border-color: var(--accent); }
.bk-cal-month:disabled { opacity: .3; cursor: default; }
.bk-cal-month.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.bk-cal-legend { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; color: var(--mono-muted); font-size: 12px; font-weight: 600; }
.bk-cal-dot { width: 6px; height: 6px; border-radius: 50%; background: #d4553f; }
.bk-cal-picked { margin: 0; color: var(--mono-text); font-weight: 800; }
.bk-cal-picked[hidden] { display: none; }
@media (max-width: 760px) {
  .bk-date-field { max-width: none; }
  .bk-cal { padding: 12px 8px 8px; }
  .bk-cal-day { min-height: 0; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .bk-cal-day { transition: none; } }

/* step 1: calendar and governorates side by side on wide screens */
.bk-step1-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.bk-step1-grid .bk-date-field { max-width: none; }
.bk-city-field { display: grid; gap: 10px; }
.bk-city-field .bk-field-title { margin: 0; }
.bk-step1-grid .bk-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-step1-grid .bk-city { min-height: 86px; align-content: center; }
@media (max-width: 760px) {
  .bk-step1-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .bk-pkg-badge { grid-row: 1; }
  .bk-pkg.is-featured .bk-pkg-name, .bk-pkg.is-featured .bk-pkg-price { grid-row: 2; }
}
