/* Booking page UI refresh: loaded last, scoped to .booking-page so nothing else changes. */
.booking-page {
  --bk-brand: #0b5c85;
  --bk-brand-dark: #08425f;
  --bk-gold: #e0b43a;
  --bk-surface: #ffffff;
  --bk-surface-2: #f4f8fb;
  --bk-line: #dfe8ef;
  --bk-text: #1d3342;
  --bk-muted: #62788a;
  --bk-shadow: 0 6px 24px rgba(11, 60, 90, .08);
}

.cvr-booking-gallery {
  overflow: hidden;
  border-radius: 14px;
  background: #eaf1f5;
}
.cvr-booking-gallery .carousel-item img {
  width: 100%;
  height: clamp(220px, 42vw, 360px);
  object-fit: cover;
}
.cvr-booking-gallery .carousel-caption {
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2rem 1rem .85rem;
  background: linear-gradient(transparent, rgba(7, 25, 39, .72));
}
.cvr-booking-gallery .carousel-caption span {
  display: inline-block;
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.cvr-booking-gallery .carousel-control-prev,
.cvr-booking-gallery .carousel-control-next {
  width: 12%;
  opacity: .9;
}
html[data-theme="dark"] .booking-page,
html[data-theme="dark"] #roomDetailsModal {
  --bk-brand: #a5d0f0;
  --bk-brand-dark: #cfe6f7;
  --bk-surface: #16212c;
  --bk-surface-2: #1c2a37;
  --bk-line: #2a3b4b;
  --bk-text: #e6edf4;
  --bk-muted: #93a5b7;
  --bk-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

/* ---------- Header + steps ---------- */
.booking-page .booking-page-header h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
.bk-steps {
  display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap;
  list-style: none; margin: 1rem auto 0; padding: 0; max-width: 760px;
}
.bk-steps li {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem .4rem .4rem; border-radius: 999px;
  background: var(--bk-surface-2); border: 1px solid var(--bk-line);
  font-size: .85rem; font-weight: 600; color: var(--bk-muted);
}
.bk-steps li .n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bk-line); color: var(--bk-text); font-size: .8rem;
}
.bk-steps li.active { color: var(--bk-brand-dark); border-color: var(--bk-brand); background: var(--bk-surface); }
.bk-steps li.active .n { background: var(--bk-brand); color: #fff; }
html[data-theme="dark"] .bk-steps li.active .n { color: #0e161e; }
@media (max-width: 575.98px) {
  .bk-steps { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: .25rem; scrollbar-width: none; }
  .bk-steps::-webkit-scrollbar { display: none; }
  .bk-steps li { white-space: nowrap; flex: 0 0 auto; }
}

/* ---------- Search / filter card ---------- */
.booking-page .booking-filter-card {
  background: var(--bk-surface) !important;
  border: 1px solid var(--bk-line); border-radius: 20px; box-shadow: var(--bk-shadow);
  padding: 1.25rem 1.5rem !important;
}
.booking-page .booking-filter-card .form-label {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; margin-bottom: .35rem;
}
.booking-page .booking-filter-card .form-control,
.booking-page .booking-filter-card .form-select {
  min-height: 46px; border-radius: 12px; border-color: var(--bk-line);
}
.booking-page .booking-filter-card .form-control:focus,
.booking-page .booking-filter-card .form-select:focus {
  border-color: var(--bk-brand); box-shadow: 0 0 0 3px rgba(11, 92, 133, .18);
}
.booking-page #bookingSearchBtn { min-height: 46px; border-radius: 12px; font-weight: 700; }
.bk-filter-title {
  display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem;
  font-weight: 700; color: var(--bk-brand-dark); font-size: 1.05rem;
}
.bk-filter-title small { font-weight: 500; color: var(--bk-muted); }
.booking-page #bookingFeedback { border-radius: 12px; font-weight: 500; }

/* ---------- Results header ---------- */
.bk-results-head {
  display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap;
  gap: .5rem 1rem; margin: 0 0 1rem;
}
.bk-results-head h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 0; font-weight: 700; }
.bk-results-meta { color: var(--bk-muted); font-size: .9rem; margin: 0; }
.bk-results-meta strong { color: var(--bk-text); }

/* ---------- Notices (e.g. "room already booked") ---------- */
.booking-page .alert-info { border-radius: 14px; }

/* ---------- Room grid + cards ---------- */
.booking-page .booking-room-grid { justify-content: center; --bs-gutter-y: 1.5rem; }
.booking-page .booking-room-card {
  background: var(--bk-surface); border: 1px solid var(--bk-line) !important; border-radius: 20px;
  box-shadow: var(--bk-shadow); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .booking-page .booking-room-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(11, 60, 90, .14); }
}
.booking-page .room-cover-wrap { position: relative; aspect-ratio: 16 / 10; overflow: hidden; cursor: pointer; }
.booking-page .room-cover-wrap .room-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-price-badge {
  position: absolute; left: .75rem; bottom: .75rem; z-index: 2;
  background: rgba(8, 40, 58, .88); color: #fff; backdrop-filter: blur(4px);
  padding: .35rem .75rem; border-radius: 999px; font-size: .8rem; line-height: 1.2;
}
.bk-price-badge strong { font-size: 1rem; color: var(--bk-gold); }
/* Always-visible "details" hint on touch devices where hover does not exist */
@media (hover: none) {
  .booking-page .room-cover-overlay { opacity: 1; background: transparent; align-items: flex-start; justify-content: flex-end; padding: .6rem; }
  .booking-page .room-cover-overlay-pill { transform: none; opacity: 1; padding: .3rem .65rem; font-size: .75rem; }
}
.booking-page .booking-room-card .p-4 { padding: 1.15rem 1.25rem 1.25rem !important; gap: .55rem; }
.booking-page .booking-room-card h5 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.bk-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.bk-chips li {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px;
  background: var(--bk-surface-2); border: 1px solid var(--bk-line); font-size: .78rem; color: var(--bk-text);
}
.bk-chips li i { color: var(--bk-brand); }
.bk-desc { color: var(--bk-muted); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bk-incl { font-size: .82rem; color: var(--bk-muted); margin: 0; }
.bk-incl b { color: var(--bk-text); }

.bk-rates { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .25rem 0 0; }
.bk-rate {
  background: var(--bk-surface-2); border: 1px solid var(--bk-line); border-radius: 12px;
  padding: .5rem .65rem; display: flex; flex-direction: column; min-width: 0;
}
.bk-rate .l { font-size: .72rem; font-weight: 700; color: var(--bk-muted); text-transform: uppercase; letter-spacing: .03em; }
.bk-rate .t { font-size: .72rem; color: var(--bk-muted); }
.bk-rate .p { font-size: 1.02rem; font-weight: 800; color: var(--bk-brand-dark); margin-top: .1rem; }
.bk-rate.is-selected {
  border-color: var(--bk-brand);
  background: rgba(11, 92, 133, .08);
  background: color-mix(in srgb, var(--bk-brand) 9%, var(--bk-surface));
  box-shadow: inset 0 0 0 1px var(--bk-brand);
}
.bk-rate.is-selected .l,
.bk-rate.is-selected .p { color: var(--bk-brand-dark); }
.bk-rate.ext { grid-column: 1 / -1; }
.bk-rate.ext .p.hint { font-size: .8rem; font-weight: 500; font-style: italic; color: var(--bk-muted); }
.staff-event-date-button {
  border: 0;
  padding: .25rem .4rem;
  border-radius: .4rem;
  color: var(--bk-brand);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .15em;
}
.staff-event-date-button:hover,
.staff-event-date-button:focus-visible {
  color: var(--bk-brand-dark);
  background: var(--bk-surface-2);
}
.staff-event-date-button:focus-visible { outline: 2px solid var(--bk-brand); outline-offset: 2px; }
.staff-event-availability-table { max-height: 34rem; overflow: auto; }
.staff-event-availability-table thead { position: sticky; top: 0; z-index: 1; background: var(--bk-surface); }

.bk-note { font-size: .78rem; color: var(--bk-muted); margin: 0; }
.bk-note summary { cursor: pointer; color: var(--bk-brand); font-weight: 600; list-style: none; }
.bk-note summary::-webkit-details-marker { display: none; }
.bk-note summary::after { content: " ▾"; }
.bk-note[open] summary::after { content: " ▴"; }

.bk-actions { display: flex; gap: .6rem; margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--bk-line); }
.bk-actions .btn { flex: 1; min-height: 46px; border-radius: 12px; font-weight: 700; }

/* ---------- Floating "change dates" shortcut (mobile) ---------- */
.bk-float {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  z-index: 1030; display: none; align-items: center; gap: .45rem; border: 0; cursor: pointer;
  padding: .7rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: var(--bk-brand); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
html[data-theme="dark"] .bk-float { color: #0e161e; }
@media (max-width: 991.98px) {
  .bk-float { display: inline-flex; }
  .bk-float.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
}

/* ---------- Mobile tuning ---------- */
@media (max-width: 575.98px) {
  .booking-page .booking-filter-card { padding: 1rem !important; border-radius: 16px; }
  .bk-rates { grid-template-columns: 1fr 1fr; }
  .booking-page .section-pad, .booking-page.section-pad { padding-top: 1.5rem; }
}
/* Dialog guest picker */
#roomDetailsModal .room-guest-picker { background: var(--bk-surface-2, #f4f8fb); }
#roomDetailsModal .modal-footer .btn { min-height: 44px; }
@media (max-width: 575.98px) {
  #roomDetailsModal .modal-footer { position: sticky; bottom: 0; background: inherit; }
  #roomDetailsModal .modal-footer .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .booking-page .booking-room-card, .bk-float { transition: none; }
}

/* ---------- Event reservation form ---------- */
.booking-page .booking-event-card {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; transform: none !important;
}
.booking-page .booking-event-form { --bs-gutter-y: 1.25rem; }
.bk-form-section {
  background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: 20px;
  box-shadow: var(--bk-shadow); padding: 1.25rem 1.5rem 1.5rem;
}
.bk-sec-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding-bottom: .85rem; border-bottom: 1px solid var(--bk-line); }
.bk-sec-head .n {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bk-brand); color: #fff; font-weight: 800; font-size: .95rem;
}
html[data-theme="dark"] .bk-sec-head .n { color: #0e161e; }
.bk-sec-head h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--bk-brand-dark); }
.bk-sec-head p { margin: .1rem 0 0; font-size: .84rem; color: var(--bk-muted); }
.booking-page .booking-event-form .form-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.booking-page .booking-event-form .form-control,
.booking-page .booking-event-form .form-select { min-height: 46px; border-radius: 12px; border-color: var(--bk-line); }
.booking-page .booking-event-form textarea.form-control { min-height: 110px; }
.booking-page .booking-event-form .form-control:focus,
.booking-page .booking-event-form .form-select:focus { border-color: var(--bk-brand); box-shadow: 0 0 0 3px rgba(11, 92, 133, .18); }
.booking-page .booking-event-form .booking-event-package-details .soft-card { border-radius: 16px; }
.bk-submit-bar { display: flex; justify-content: flex-end; }
.bk-submit-bar .btn { min-height: 50px; border-radius: 14px; font-weight: 700; }
@media (max-width: 767.98px) {
  .bk-form-section { padding: 1rem; border-radius: 16px; }
  .bk-submit-bar {
    position: sticky; bottom: 0; z-index: 20; margin-top: .5rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--bk-surface); border-top: 1px solid var(--bk-line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
  }
  .bk-submit-bar .btn { width: 100%; }
}
