/* RMH offer sheet (mu-plugins/rmh-offer-sheet.php). Scoped to .rmh-offer (#rmh-offer where Elementor kit rules on img,
   button and input, 0,1,1 to 0,3,1, would otherwise win); tokens = specs/07-templates "The system".
   A <dialog>: bottom sheet on phones, centred modal from 768 px. Motion: one rise on open, none under reduced motion. */
.rmh-offer {
	--ro-ink: #231f20;
	--ro-ink-soft: #625a55;      /* 7.0:1 on white */
	--ro-action: #80655a;        /* 5.35:1: links + the date line */
	--ro-sand: #ded5cc;
	--ro-gutter: 16px;
	--ro-serif: "RMH Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--ro-sans: "Lato", "Helvetica Neue", Arial, sans-serif;
	--ro-arch: 50% 50% 0 0 / 22% 22% 0 0;
	--ro-arch-tall: 50% 50% 0 0 / 34% 34% 0 0;
	--ro-focus: 0 0 0 3px #fff, 0 0 0 5px #80655a;
	box-sizing: border-box;
	width: 100%; max-width: 760px; max-height: 92vh; max-height: 92dvh;
	margin: auto auto 0; padding: 0; border: 0; border-radius: 16px 16px 0 0;
	background: #fff; color: var(--ro-ink); font: 400 16px/1.6 var(--ro-sans); text-align: left;
	overflow: auto; overscroll-behavior: contain;
}
.rmh-offer *, .rmh-offer *::before, .rmh-offer *::after { box-sizing: border-box; }
.rmh-offer::backdrop { background: rgba(35, 31, 32, .5); }
.rmh-offer[open] { display: block; }

.rmh-offer__grid { display: grid; grid-template-columns: 1fr; }
.rmh-offer__photo { margin: 0; padding: 20px var(--ro-gutter) 0; }
#rmh-offer .rmh-offer__photo img { display: block; width: 100%; height: 168px; max-width: none; object-fit: cover; border-radius: var(--ro-arch); }
.rmh-offer__body { padding: 20px var(--ro-gutter) 24px; }

.rmh-offer .rmh-offer__title {
	margin: 0 0 6px; padding: 0; font: 600 30px/1.08 var(--ro-serif); letter-spacing: 0; text-transform: none;
	color: var(--ro-ink); text-wrap: balance;
}
.rmh-offer .rmh-offer__title:focus { outline: none; }
.rmh-offer__when { margin: 0 0 14px; font: 700 15px/1.4 var(--ro-sans); color: var(--ro-action); }
.rmh-offer__when span { white-space: nowrap; }
.rmh-offer__lede { margin: 0 0 20px; color: var(--ro-ink-soft); font-size: 16px; line-height: 1.6; max-width: 34em; }
.rmh-offer__actions { display: grid; gap: 12px; }
.rmh-offer__note { margin: 14px 0 0; font-size: 14px; line-height: 1.4; color: var(--ro-ink-soft); }

/* Buttons: one ink pill + one hairline (the system's two). Own class names so the theme's .btn rules never reach them. */
.rmh-offer .rmh-offer__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px;
	padding: 0 20px; border: 1px solid transparent; border-radius: 24px; font: 700 16px/1.2 var(--ro-sans);
	letter-spacing: 0; text-transform: none; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rmh-offer .rmh-offer__btn--primary { background: var(--ro-ink); color: #fff; }
.rmh-offer .rmh-offer__btn--primary:hover { background: #000; color: #fff; }
.rmh-offer .rmh-offer__btn--ghost { background: #fff; color: var(--ro-ink); border-color: var(--ro-ink); }
.rmh-offer .rmh-offer__btn--ghost:hover { color: var(--ro-action); border-color: var(--ro-action); }
.rmh-offer .rmh-offer__btn:active { transform: scale(.98); }
.rmh-offer .rmh-offer__btn svg { width: 20px; height: 20px; }
.rmh-offer button:focus-visible, .rmh-offer a:focus-visible { outline: none; box-shadow: var(--ro-focus); }

#rmh-offer .rmh-offer__close {
	position: absolute; top: 30px; right: calc(var(--ro-gutter) + 12px); display: grid; place-items: center;
	width: 44px; height: 44px; padding: 0; border: 1px solid var(--ro-sand); border-radius: 50%;
	background: rgba(255, 255, 255, .94); color: var(--ro-ink); cursor: pointer;
}
#rmh-offer .rmh-offer__close:hover { border-color: var(--ro-ink); }

/* Step 2: the inquiry form inside the sheet */
.rmh-offer__step--form { padding: 20px var(--ro-gutter) 28px; }
.rmh-offer__step--form .rmh-offer__title--form { font-size: 26px; margin: 0 56px 16px 0; }
.rmh-offer__back { margin: 0 56px 4px 0; }
#rmh-offer .rmh-offer__back button {
	min-height: 44px; padding: 0; border: 0; background: none; color: var(--ro-action); font: 400 15px/1.3 var(--ro-sans);
	text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rmh-offer .rmh-iform { max-width: none; margin: 0; }
.rmh-offer .rmh-iform__submit { width: 100%; background: var(--ro-ink); }
.rmh-offer .rmh-iform__submit:hover { background: #000; }
#rmh-offer [data-step="form"]:not([hidden]) ~ .rmh-offer__close { top: 16px; }

@media (prefers-reduced-motion: no-preference) {
	.rmh-offer[open] { animation: rmh-offer-rise .28s ease-out; }
	@keyframes rmh-offer-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (min-width: 768px) {
	.rmh-offer { --ro-gutter: 32px; width: 760px; margin: auto; border-radius: 16px; }
	.rmh-offer__grid { grid-template-columns: 300px 1fr; align-items: stretch; }
	.rmh-offer__photo { padding: 28px 0 28px 28px; }
	#rmh-offer .rmh-offer__photo img { height: 100%; min-height: 380px; border-radius: var(--ro-arch-tall); }
	.rmh-offer__body { padding: 44px 40px 36px; }
	.rmh-offer .rmh-offer__title { font-size: 38px; margin-right: 40px; }
	#rmh-offer .rmh-offer__close { top: 16px; right: 16px; }
	.rmh-offer__step--form { padding: 28px 40px 36px; }
}
