/* Booking enquiry modal (includes/booking-modal.php) */
.bm[hidden] { display: none; }
.bm { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bm-backdrop { position: absolute; inset: 0; background: rgba(27, 20, 16, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: bmFade .25s ease; }
.bm-panel { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain; padding: 36px 40px 28px; border-radius: 22px; background: #fffdf8; box-shadow: 0 40px 90px -30px rgba(20, 12, 8, .6); border-top: 4px solid #bc8c3f; animation: bmRise .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes bmFade { from { opacity: 0; } }
@keyframes bmRise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
html.bm-open, html.bm-open body { overflow: hidden; }

.bm-x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #4a3a2f; font-size: 18px; transition: background .2s; }
.bm-x:hover { background: #f1eadc; }
html body .bm .bm-eyebrow:not(#_) { margin: 0 0 2px; font-family: 'Caveat', cursive !important; font-size: 24px !important; font-weight: 600; line-height: 1.1 !important; color: #bc8c3f; }
html body .bm h2.bm-title:not(#_):not(#_) { margin: 0; font-family: 'Playfair Display', serif !important; font-size: clamp(26px, 3.4vw, 34px) !important; line-height: 1.15 !important; color: #2a1c13; padding-right: 40px; }
html body .bm .bm-lead:not(#_) { margin: 6px 0 0; font-size: 15px !important; color: #6b5f54; }
html body .bm .bm-for:not(#_) { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 7px 14px; border-radius: 999px; background: #f3e6c8; color: #6b4a1c; font-size: 13.5px !important; font-weight: 600; }
.bm-for[hidden] { display: none !important; }

.bm-form { margin-top: 22px; }
.bm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-bottom: 16px; }
.bm-grid--wide { grid-template-columns: 1fr 1.6fr; }
.bm-f { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
html body .bm .bm-f > span:not(#_), html body .bm .bm-captcha > span:not(#_) { font-size: 14px !important; font-weight: 600; color: #3b3028; }
html body .bm .bm-f em:not(#_) { font-style: normal; font-weight: 400; color: #8a7c6f; font-size: 13px !important; }
.bm input[type="text"], .bm input[type="tel"], .bm input[type="email"], .bm input[type="date"], .bm select, .bm textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid #ded3c1; border-radius: 12px; background: #fff; color: #2a1c13; font: inherit; font-size: 15px !important; transition: border-color .2s, box-shadow .2s;
}
.bm textarea { resize: vertical; min-height: 50px; line-height: 1.5; }
.bm select { appearance: auto; }
.bm input::placeholder, .bm textarea::placeholder { color: #a99c8d; }
.bm input:focus, .bm select:focus, .bm textarea:focus { outline: none; border-color: #bc8c3f; box-shadow: 0 0 0 3px rgba(188, 140, 63, .2); }
.bm [aria-invalid="true"] { border-color: #b9472f !important; box-shadow: 0 0 0 3px rgba(185, 71, 47, .15) !important; }

.bm-captcha { margin-bottom: 16px; }
.bm-cap-row { display: grid; grid-template-columns: 180px 52px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.bm-cap-img { width: 180px; height: 56px; border: 1px solid #ded3c1; border-radius: 12px; background: #f7f1e6; }
.bm-cap-new { display: grid; place-items: center; border: 1px solid #ded3c1; border-radius: 12px; background: #fff; color: #4a3a2f; font-size: 17px; transition: background .2s, transform .3s; }
.bm-cap-new:hover { background: #f1eadc; }
.bm-cap-new.is-spin i { transform: rotate(360deg); transition: transform .4s; }
.bm .bm-cap-in { min-height: 56px; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; }

.bm-consent { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 18px; cursor: pointer; }
.bm-consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: #3b3028; }
html body .bm .bm-consent span:not(#_) { font-size: 14px !important; line-height: 1.6 !important; color: #5a4d43; }
.bm-consent a { color: #2a1c13; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.bm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
html body .bm .bm-err:not(#_) { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fbe9e4; color: #9a3520; font-size: 14px !important; }

.bm-send { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px; background: linear-gradient(180deg, #4a3a2f, #2f241d); color: #fff8ec; font-size: 16px !important; font-weight: 600; letter-spacing: .02em; box-shadow: 0 18px 30px -18px rgba(47, 36, 29, .9); transition: transform .2s, box-shadow .2s, background .2s; }
.bm-send:hover { transform: translateY(-1px); background: linear-gradient(180deg, #a57131, #8a5c25); }
.bm-send i { font-size: 13px; }
html body .bm .bm-note:not(#_) { margin: 14px 0 0; font-size: 12.5px !important; line-height: 1.6 !important; color: #8a7c6f; text-align: center; }
.bm button:focus-visible, .bm a:focus-visible, .bm-consent input:focus-visible { outline: 3px solid #a57131; outline-offset: 3px; }

@media (max-width: 640px) {
  .bm { padding: 0; align-items: flex-end; }
  .bm-panel { width: 100%; max-height: 92vh; padding: 28px 20px 22px; border-radius: 22px 22px 0 0; }
  .bm-grid, .bm-grid--wide { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .bm-cap-row { grid-template-columns: 1fr 48px; }
  .bm-cap-img { width: 100%; }
  .bm .bm-cap-in { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .bm-backdrop, .bm-panel { animation: none; } }

/* Compact sizing so the whole form fits on one screen without scrolling */
.bm-panel { padding: 24px 32px 20px; max-height: calc(100vh - 24px); }
.bm-x { top: 12px; right: 12px; }
html body .bm .bm-eyebrow:not(#_) { display: none; }
html body .bm h2.bm-title:not(#_):not(#_) { font-size: clamp(24px, 2.6vw, 28px) !important; }
html body .bm .bm-lead:not(#_) { margin-top: 4px; font-size: 14px !important; }
html body .bm .bm-for:not(#_) { margin-top: 10px; padding: 5px 12px; font-size: 12.5px !important; }
.bm-form { margin-top: 16px; }
.bm-grid { gap: 10px 16px; margin-bottom: 10px; }
.bm-f { gap: 5px; }
html body .bm .bm-f > span:not(#_), html body .bm .bm-captcha > span:not(#_) { font-size: 13px !important; }
.bm input[type="text"], .bm input[type="tel"], .bm input[type="email"], .bm input[type="date"], .bm select, .bm textarea { min-height: 44px; padding: 9px 14px; border-radius: 10px; font-size: 14.5px !important; }
.bm textarea { min-height: 44px; height: 44px; }
.bm-captcha { margin-bottom: 10px; }
.bm-cap-row { grid-template-columns: 150px 46px minmax(0, 1fr); gap: 10px; }
.bm-cap-img { width: 150px; height: 46px; border-radius: 10px; }
.bm-cap-new { border-radius: 10px; }
.bm .bm-cap-in { min-height: 46px; }
.bm-consent { margin: 2px 0 12px; gap: 10px; }
html body .bm .bm-consent span:not(#_) { font-size: 13px !important; line-height: 1.5 !important; }
html body .bm .bm-err:not(#_) { margin-bottom: 10px; padding: 8px 12px; font-size: 13px !important; }
html body .bm button.bm-send:not(#_) { min-height: 48px; font-size: 15px !important; text-transform: none !important; letter-spacing: .01em !important; }
html body .bm .bm-note:not(#_) { margin-top: 10px; font-size: 12px !important; line-height: 1.5 !important; }
@media (max-width: 640px) {
  .bm-panel { padding: 22px 18px 18px; max-height: 94vh; }
  .bm-grid, .bm-grid--wide { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .bm-grid--wide .bm-f:last-child { grid-column: 1 / -1; }
  .bm-cap-row { grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); }
  .bm-cap-img { width: 100%; }
  .bm .bm-cap-in { grid-column: auto; }
}
@media (max-width: 330px) {
  .bm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  html body .bm .bm-lead:not(#_) { font-size: 13px !important; }
  html body .bm .bm-note:not(#_) { display: none; }
  .bm input[type="date"] { padding: 9px 8px; font-size: 13.5px !important; }
}

/* Slimmer panel with a little more air, still sized to fit one screen */
.bm-panel { width: min(640px, 100%); padding: 28px 32px 22px; }
html body .bm h2.bm-title:not(#_):not(#_) { font-size: clamp(26px, 3vw, 32px) !important; }
.bm-grid--wide { grid-template-columns: 1fr 1.4fr; }
.bm input[type="text"], .bm input[type="tel"], .bm input[type="email"], .bm input[type="date"], .bm select, .bm textarea { min-height: 46px; }
.bm textarea { height: 46px; }
.bm-cap-row { grid-template-columns: 140px 46px minmax(0, 1fr); }
.bm-cap-img { width: 140px; }
html body .bm button.bm-send:not(#_) { min-height: 50px; }
@media (max-height: 700px) and (min-width: 641px) {
  .bm-panel { padding: 22px 30px 18px; }
  html body .bm .bm-note:not(#_) { display: none; }
}

/* ===== Phone layout: one field per row, roomy tap targets, safe-area aware bottom sheet ===== */
@media (max-width: 640px) {
  .bm-panel { max-height: calc(100dvh - 16px); padding: 26px 18px calc(22px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; scroll-padding-bottom: 5rem; }
  .bm-panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 4px; background: #d8ccb8; }
  .bm-x { top: 10px; right: 10px; width: 44px; height: 44px; background: #f4ede0; font-size: 18px; }
  html body .bm h2.bm-title:not(#_):not(#_) { font-size: 26px !important; padding-right: 48px; }
  html body .bm .bm-lead:not(#_) { font-size: 14px !important; margin-top: 6px; }
  .bm-form { margin-top: 18px; }
  .bm-grid, .bm-grid--wide { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .bm-grid--wide .bm-f:last-child { grid-column: auto; }
  .bm-f { gap: 6px; }
  html body .bm .bm-f > span:not(#_), html body .bm .bm-captcha > span:not(#_) { font-size: 14px !important; }
  /* 16px stops iOS Safari zooming into the field on focus */
  .bm input[type="text"], .bm input[type="tel"], .bm input[type="email"], .bm input[type="date"], .bm select, .bm textarea { min-height: 50px; padding: 12px 14px; font-size: 16px !important; border-radius: 12px; }
  .bm input[type="date"] { padding: 12px 14px; font-size: 16px !important; }
  .bm textarea { height: 84px; min-height: 84px; }
  .bm-cap-row { grid-template-columns: minmax(0, 1fr) 50px; gap: 10px; }
  .bm-cap-img { width: 100%; height: 54px; }
  .bm-cap-new { min-height: 54px; }
  .bm .bm-cap-in { grid-column: 1 / -1; min-height: 52px; }
  html body .bm .bm-consent span:not(#_) { font-size: 14px !important; line-height: 1.5 !important; }
  .bm-consent input { width: 22px; height: 22px; }
  html body .bm button.bm-send:not(#_) { min-height: 54px; font-size: 16px !important; }
}
@media (max-width: 640px) and (max-height: 640px) { .bm-panel { max-height: 100dvh; border-radius: 0; } }

/* Phone: slightly smaller inputs (still above the 44px tap-target minimum). */
@media (max-width: 640px) {
  .bm input[type="text"], .bm input[type="tel"], .bm input[type="email"], .bm input[type="date"], .bm select, .bm textarea { min-height: 44px; padding: 9px 14px; border-radius: 10px; }
  .bm textarea { height: 68px; min-height: 68px; }
  .bm-grid, .bm-grid--wide { gap: 11px; margin-bottom: 11px; }
  .bm-f { gap: 5px; }
  .bm-cap-img { height: 48px; }
  .bm-cap-new { min-height: 48px; }
  .bm .bm-cap-in { min-height: 46px; }
}

/* Phone: captcha image, refresh and code box on a single row. */
@media (max-width: 640px) {
  .bm-cap-row { grid-template-columns: minmax(0, 1.15fr) 44px minmax(0, 1fr); gap: 8px; align-items: stretch; }
  .bm-cap-img { width: 100%; height: 46px; object-fit: fill; }
  .bm-cap-new { min-height: 46px; }
  .bm .bm-cap-in { grid-column: auto; min-height: 46px; padding-left: 10px; padding-right: 10px; letter-spacing: .18em; font-size: 15px !important; }
}
@media (max-width: 340px) { .bm-cap-row { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 6px; } }

/* Phone: Travel date + Travellers share one row; every other field stays full width. */
@media (max-width: 640px) {
  .bm-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; row-gap: 11px; }
  .bm-form > *, .bm-grid > .bm-f { grid-column: 1 / -1; }
  .bm-grid, .bm-grid--wide { display: contents; }
  .bm-grid > .bm-f:has(.bm-date), .bm-grid--wide > .bm-f:has(select) { grid-column: auto; }
  .bm-form > .bm-grid, .bm-form > .bm-captcha, .bm-form > .bm-consent { margin-bottom: 0; }
  .bm input[type="text"].bm-date { padding-left: 12px; padding-right: 8px; }
  .bm select { padding-left: 12px; padding-right: 6px; }
}
@media (max-width: 640px) { .bm-form .bm-grid--wide > .bm-f:has(textarea) { grid-column: 1 / -1; } }

/* Phone: centred card (not a bottom sheet) and a one-line message box. */
@media (max-width: 640px) {
  .bm { align-items: center; justify-content: center; padding: 12px; }
  .bm-panel { width: 100%; max-height: calc(100dvh - 24px); border-radius: 20px; padding: 24px 18px 18px; }
  .bm-panel::before { display: none; }
  .bm-x { top: 10px; right: 10px; }
  .bm textarea { height: 44px; min-height: 44px; resize: none; overflow: hidden; white-space: nowrap; line-height: 1.5; }
  .bm textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 640px) and (max-height: 640px) { .bm-panel { max-height: calc(100dvh - 24px); border-radius: 20px; } }

/* ===== Inline use (Contact page, Package sidebar): same form, no overlay ===== */
.bm.bm--inline { position: static; inset: auto; z-index: auto; display: block; padding: 0; }
.bm--inline .bm-form { margin-top: 0; }
.bm-grid--one { grid-template-columns: 1fr; }
html body .bm .bm-err.is-ok:not(#_) { background: #e7f4ea; color: #166534; }
html body .bm--inline .bm-note:not(#_) { display: block; }

/* Narrow column (sidebar): fields stack, Travel date + Travellers share a row, captcha stays on one row. */
.bm--narrow .bm-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; row-gap: 11px; }
.bm--narrow .bm-form > *, .bm--narrow .bm-grid > .bm-f, .bm--narrow .bm-grid--wide > .bm-f:has(textarea) { grid-column: 1 / -1; }
.bm--narrow .bm-grid, .bm--narrow .bm-grid--wide { display: contents; }
.bm--narrow .bm-grid > .bm-f:has(.bm-date), .bm--narrow .bm-grid--wide > .bm-f:has(select) { grid-column: auto; }
.bm--narrow .bm-cap-row { grid-template-columns: minmax(0, 1.15fr) 44px minmax(0, 1fr); gap: 8px; }
.bm--narrow .bm-cap-img { width: 100%; height: 46px; }
.bm--narrow .bm-cap-new { min-height: 46px; }
.bm--narrow .bm-cap-in { min-height: 46px; padding-left: 10px; padding-right: 10px; letter-spacing: .18em; }
.bm--narrow .bm-consent { margin: 2px 0 6px; }
.bm--narrow textarea { height: 44px; min-height: 44px; resize: none; }
.bm--narrow input[type="text"].bm-date, .bm--narrow select { padding-left: 12px; padding-right: 8px; }
.bm textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Phone + narrow sidebar: Mobile number and Email share a row (Name stays full width). */
@media (max-width: 640px) {
  .bm-grid > .bm-f:has([name="mobile"]), .bm-grid > .bm-f:has([name="email"]) { grid-column: auto; }
  .bm input[name="mobile"], .bm input[name="email"] { padding-left: 11px; padding-right: 8px; font-size: 15px !important; }
}
.bm--narrow .bm-grid > .bm-f:has([name="mobile"]), .bm--narrow .bm-grid > .bm-f:has([name="email"]) { grid-column: auto; }
.bm--narrow input[name="mobile"], .bm--narrow input[name="email"] { padding-left: 11px; padding-right: 8px; font-size: 14px !important; }
@media (max-width: 640px) { .bm input[name="mobile"], .bm input[name="email"] { font-size: 14px !important; padding-left: 10px; padding-right: 6px; } }
