/* RMH listing page: the booking card in two steps (card-steps.js). Brand tokens from rmh-brand (web design system §3), px only
   (rem = 10 px here). :not(#_) lifts these over sheet-contact.css and the theme. Nothing here touches the sent state. */
:root {
	--rmh-cs-ink: var(--rmh-ink, #231F20);
	--rmh-cs-paper: var(--rmh-white, #FFFFFF);
	--rmh-cs-accent: var(--rmh-taupe-deep, #80655A);
	--rmh-cs-sans: var(--rmh-sans, "DM Sans", "Helvetica Neue", Arial, sans-serif);
	--rmh-cs-tap: 48px;
	--rmh-cs-wait: #5E5759; /* the ink, softened: white on it is 7:1 */
	--rmh-cs-focus: 0 0 0 2px var(--rmh-cs-paper), 0 0 0 4px var(--rmh-cs-ink);
}

/* ---------- Before card-steps.js has run: no contact fields (sheet-contact.js builds the block a beat earlier, which
   painted it whole for a frame, then shrank it; Jules 11-24). card-steps.js sets html.rmh-steps-ready once it has run. ---------- */
/* The step-1 button + WhatsApp line arrive with the scripts: their room is held from the first paint so the open card (condos,
   villas) doesn't grow under the guest's eyes (242 → 347 px on a laptop, 11-24). Haciendas land collapsed (.rmh-lst-card). */
:root { --rmh-cs-step1-room: 90px; } /* measured: step-1 card 347 px, before the scripts 257 px */
html:not(.rmh-steps-ready) #boostly_remove_on_mobile:not(.rmh-lst-card) .boostly_notification:not(#_)::after { content: ''; display: block; height: var(--rmh-cs-step1-room); }
html:not(.rmh-steps-ready) .rmh-shc:not(.rmh-shc--sent) :is(.rmh-shc__fields, .rmh-shc__promise, .rmh-shc__send, .rmh-shc__anyway, .rmh-shc-engine):not(#_):not(#_) { display: none !important; }

/* ---------- Step 1: dates · guests · price · one button ---------- */
.rmh-shc--step1:not(.rmh-shc--sent) :is(.rmh-shc__fields, .rmh-shc__promise, .rmh-shc__send, .rmh-shc__anyway, .rmh-shc-engine):not(#_):not(#_) { display: none !important; }
.rmh-shc--step1 .rmh-shc__change:not(#_) { display: none; }
/* the card's fields already show the dates and guests: its "Your dates" line waits for step 2 */
#boostly_remove_on_mobile .rmh-shc--step1 .rmh-shc__stay:not(.is-missing):not(#_):not(#_) { display: none; }

.rmh-shc .rmh-shc__next:not(#_):not(#_) {
	display: flex; align-items: center; justify-content: center; width: 100%; height: var(--rmh-cs-tap); margin: 12px 0 0; padding: 0 24px;
	border: 0; border-radius: 0; background: var(--rmh-cs-ink); color: var(--rmh-cs-paper);
	font: 600 14px/1 var(--rmh-cs-sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
	transition: transform .12s ease, background-color .12s ease;
}
.rmh-shc .rmh-shc__next:hover:not(#_):not(#_) { background: #3A3436; }
.rmh-shc .rmh-shc__next:active:not(#_):not(#_) { transform: scale(.985); }
.rmh-shc .rmh-shc__next:focus-visible:not(#_):not(#_) { outline: none; box-shadow: var(--rmh-cs-focus); }
/* waiting for the quote (card-steps.js quoteWaiting): the button is off and says so, in a softer ink; three dots breathe
   after the words (opacity only), still under reduced motion */
.rmh-shc .rmh-shc__next:disabled:not(#_):not(#_) { background: var(--rmh-cs-wait); cursor: progress; transform: none; }
.rmh-shc .rmh-shc__next--wait:not(#_):not(#_)::after {
	content: ''; flex: none; width: 4px; height: 4px; margin-left: 10px; border-radius: 50%; background: currentColor;
	box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor; margin-right: 16px;
}

/* ---------- Step 2: the stay in one line, the price, the contact fields ---------- */
.rmh-shc--step2 .rmh-shc__next:not(#_):not(#_) { display: none; }
/* desktop card: the date and guest fields fold into the block's stay line ("Your dates: … · Change") */
#boostly_remove_on_mobile.rmh-steps-2 :is(#single-listing-date-range, .search-date-range, .single-guests-js, .rmh-lst-occ, .notify):not(#_):not(#_) { display: none !important; }
#boostly_remove_on_mobile .rmh-shc--step2 .rmh-shc__stay:not(#_):not(#_) { display: inline; margin: 0; }
.rmh-shc--step2 .rmh-shc__change:not(#_):not(#_) {
	display: inline-flex; align-items: center; min-height: 32px; margin: 0 0 8px 8px; padding: 0 2px; border: 0; background: none;
	font: 600 14px/1 var(--rmh-cs-sans); color: var(--rmh-cs-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rmh-shc--step2 .rmh-shc__change:focus-visible:not(#_):not(#_) { outline: none; box-shadow: var(--rmh-cs-focus); border-radius: 4px; }
#boostly_remove_on_mobile .rmh-shc--step2 .rmh-shc__fields:not(#_) { margin-top: 4px; }

/* while the quote loads, the card's header price steps out (its room stays: nothing moves) */
#clbooking.rmh-cs-waiting .sidebar-booking-module-header .item-price:not(#_) { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
	.rmh-shc .rmh-shc__next--wait:not(#_):not(#_)::after { animation: rmh-cs-wait 1.1s ease-in-out infinite; }
	@keyframes rmh-cs-wait { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
	.rmh-shc--step2 .rmh-shc__fields:not(#_) { animation: rmh-cs-in .2s ease-out both; }
	@keyframes rmh-cs-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
	.rmh-shc .rmh-shc__next:not(#_):not(#_) { transition: none; }
}

/* ---------- Book mode (card-steps.js, 11-25): "Reserve these dates" → /book/; the request is one line below ---------- */
/* the checkout's own "Book online" link above the dates goes: the card's button is that door now */
html.rmh-cs-book #boostly_remove_on_mobile .rmh-co-booklink:not(#_):not(#_),
html.rmh-cs-book #overlay-booking-module .rmh-co-booklink:not(#_):not(#_) { display: none !important; }
.rmh-shc .rmh-cs-booknote:not(#_) { margin: 8px 0 0; font: 400 13px/1.45 var(--rmh-cs-sans); color: #625A55; text-align: center; }
.rmh-shc .rmh-cs-ask:not(#_):not(#_) {
	display: block; width: 100%; min-height: 44px; margin: 4px 0 0; padding: 0; border: 0; background: none; cursor: pointer;
	font: 500 14px/1.4 var(--rmh-cs-sans); color: var(--rmh-cs-accent); text-decoration: underline; text-underline-offset: 3px;
}
.rmh-shc .rmh-cs-ask:focus-visible:not(#_):not(#_) { outline: none; box-shadow: var(--rmh-cs-focus); border-radius: 4px; }
.rmh-shc--step2 :is(.rmh-cs-booknote, .rmh-cs-ask):not(#_):not(#_) { display: none; }
/* the request's "Choose your dates above … No dates yet? You can still send it." line: not about the reserve button */
html.rmh-cs-book .rmh-shc--step1 .rmh-shc__stay:not(#_):not(#_) { display: none; }
