/* RPM Form Drawer — see ../rpm-form-drawer.php. Mirrors the rentals module's drawer (right panel; full-screen on mobile). */
.rpm-fd {
	--fd-navy: #003066; --fd-red: #B5201A; --fd-red-dark: #8f1915; --fd-muted: #696969; --fd-line: #d5d8dd;
	--fd-font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--fd-font-cond: 'Barlow Semi Condensed', 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-family: var(--fd-font);
	scroll-margin-top: 96px;
}
html.rpm-fd-lock { overflow: hidden; }

/* ---- Side tab (slides in once the sentinel element has scrolled away) ---- */
.rpm-fd .rpm-fd__tab {
	position: fixed; top: 50%; right: 0; z-index: 999;
	transform: translateY(-50%) translateX(100%);
	transition: transform 0.35s ease, background-color 0.15s ease, visibility 0s linear 0.35s;
	visibility: hidden;   /* its shadow would otherwise peek in at the page edge while it's off-screen */
	pointer-events: none;
	margin: 0; padding: 26px 16px;
	writing-mode: vertical-rl; text-orientation: mixed;
	border: 0; border-radius: 6px 0 0 6px;
	background: var(--fd-red); color: #fff;
	font: 600 18px/1 var(--fd-font-cond); cursor: pointer;
	box-shadow: -2px 4px 12px rgba(0, 0, 0, 0.25);
}
.rpm-fd .rpm-fd__tab:hover { background: var(--fd-red-dark); }
.rpm-fd .rpm-fd__tab:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.rpm-fd .rpm-fd__tab.is-in { transform: translateY(-50%) translateX(0); pointer-events: auto; visibility: visible; transition-delay: 0s; }

/* ---- Drawer ---- */
.rpm-fd dialog.rpm-fd__drawer {
	position: fixed; top: 0; right: 0; bottom: 0; left: auto;
	margin: 0; padding: 0; border: 0;
	width: 480px; max-width: 100vw; max-height: none;
	height: 100vh; height: 100dvh;
	background: #fff; color: #333;
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
}
.rpm-fd dialog.rpm-fd__drawer[open] { display: flex; flex-direction: column; animation: rpm-fd-slide 0.25s ease-out; }
.rpm-fd dialog.rpm-fd__drawer::backdrop { background: rgba(0, 48, 102, 0.65); }
.rpm-fd dialog.rpm-fd__drawer[open]::backdrop { animation: rpm-fd-fade 0.2s ease-out; }
@keyframes rpm-fd-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes rpm-fd-slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes rpm-fd-up    { from { transform: translateY(100%); } to { transform: none; } }

.rpm-fd .rpm-fd__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 28px 32px 8px; }
.rpm-fd .rpm-fd__title { margin: 0; font: 600 30px/1.1 var(--fd-font-cond); color: var(--fd-navy); letter-spacing: -0.2px; }
.rpm-fd .rpm-fd__x {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; margin: 0 -5px 0 0; padding: 0;
	border: 0; border-radius: 6px; background: transparent; color: var(--fd-navy); cursor: pointer;
}
.rpm-fd .rpm-fd__x:hover { background: rgba(0, 48, 102, 0.08); }
.rpm-fd .rpm-fd__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 32px 28px; }
.rpm-fd .rpm-fd__intro { margin: 0 0 20px; font: 400 16px/1.5 var(--fd-font); color: var(--fd-muted); }
.rpm-fd .rpm-fd__intro a { color: #c20000; }

.rpm-fd .rpm-fd__privacy { position: relative; margin: 14px 0 0; padding-left: 36px; font: 400 13px/1.2rem var(--fd-font); color: var(--fd-muted); }
.rpm-fd .rpm-fd__privacy::before {
	content: ''; position: absolute; left: 0; top: 6px; width: 28px; height: 28px; opacity: 0.8;
	background: url('/wp-content/uploads/2026/04/icon-lock.png') no-repeat center / contain;
}

/* ---- Gravity Form inside the narrow drawer ---- */
.rpm-fd .gform_wrapper { margin: 0; }
.rpm-fd .gform_wrapper .gform_fields { display: grid; grid-template-columns: 1fr; gap: 10px; }   /* single column at drawer width; condensed vertically */
.rpm-fd .gform_wrapper .gfield { grid-column: 1 / -1 !important; margin: 0 !important; width: 100% !important; padding: 0 !important; }
.rpm-fd .gform_wrapper input[type="text"],
.rpm-fd .gform_wrapper input[type="email"],
.rpm-fd .gform_wrapper input[type="tel"],
.rpm-fd .gform_wrapper select,
.rpm-fd .gform_wrapper textarea { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
/* First/Last stay side by side even on phones (Gravity Forms stacks them under ~640px) */
.rpm-fd .ginput_container_name { display: flex !important; gap: 12px; }
.rpm-fd .ginput_container_name { flex-wrap: nowrap !important; }
.rpm-fd .ginput_container_name > .gform-grid-col { flex: 1 1 0 !important; max-width: none !important; min-width: 0; width: auto !important; margin: 0 !important; padding: 0 !important; }
/* Condensed: shorter inputs, tighter label gap, 2-line textarea */
.rpm-fd .gform_wrapper .gfield > .gfield_label,
.rpm-fd .gform_wrapper legend.gfield_label { margin: 0 0 3px !important; padding: 0 !important; font-size: 15px !important; line-height: 19px !important; }
.rpm-fd .gform_wrapper input[type="text"],
.rpm-fd .gform_wrapper input[type="email"],
.rpm-fd .gform_wrapper input[type="tel"],
.rpm-fd .gform_wrapper select { height: 40px !important; min-height: 0 !important; font-size: 16px; }
.rpm-fd .gform_wrapper textarea { height: 64px !important; min-height: 0 !important; padding-top: 8px !important; padding-bottom: 8px !important; line-height: 22px; font-size: 16px; }
.rpm-fd .gform_wrapper .ginput_complex label,
.rpm-fd .gform_wrapper .gform-field-label--type-sub { margin: 0 !important; padding-top: 2px !important; font-size: 13px; line-height: 18px; }
.rpm-fd .gform_wrapper .gfield_description { margin: 0 !important; padding: 0 0 4px !important; font-size: 14px; line-height: 1.35; }
.rpm-fd .rpm-fd__intro { margin-bottom: 14px; font-size: 15px; line-height: 1.45; }
.rpm-fd #gfield_description_15_10 { line-height: 1.4rem; padding-top: 0; margin-top: -4px; }
.rpm-fd #gform_15 .gform_footer { margin-top: 12px; padding: 0; }
.rpm-fd #gform_15 .gform_button {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	width: 100%;
	background-color: var(--fd-red); border: none; border-radius: 6px;
	font: 600 17px/1 var(--fd-font-cond); letter-spacing: 0.3px; color: #fff;
	padding: 14px 36px; transition: background-color 0.15s ease;
}
.rpm-fd #gform_15 .gform_button::before {
	content: '' !important; display: inline-block !important; position: static !important;
	width: 20px !important; height: 20px !important; flex: none;
	background: url('/wp-content/uploads/2026/11/house-condo-icon-white.svg') no-repeat center / contain !important;
}
.rpm-fd #gform_15 .gform_button:hover { background-color: var(--fd-red-dark); }
.rpm-fd .gform_confirmation_message { font: 500 18px/1.5 var(--fd-font); color: var(--fd-navy); padding: 16px 0; }

/* ---- Mobile: full-screen ---- */
@media (max-width: 767px) {
	.rpm-fd dialog.rpm-fd__drawer { width: 100vw; box-shadow: none; }
	.rpm-fd dialog.rpm-fd__drawer[open] { animation-name: rpm-fd-up; }
	.rpm-fd .rpm-fd__head { padding: 24px 24px 8px; }
	.rpm-fd .rpm-fd__title { font-size: 28px; }
	.rpm-fd .rpm-fd__body { padding: 8px 24px calc(28px + env(safe-area-inset-bottom)); }
}
@media (min-width: 768px) and (max-width: 1023px) {
	.rpm-fd dialog.rpm-fd__drawer { width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
	.rpm-fd, .rpm-fd * , .rpm-fd dialog.rpm-fd__drawer[open]::backdrop { animation: none !important; transition: none !important; }
}
