/**
 * MFX Landing Pages — Booking Form styles.
 *
 * HVLR brand: navy #0f1a2e, gold #c9a84c, cream #faf8f2, cream-deep #f0ece2,
 * slate #5a6578, text #2d3243.
 */

.mfx-bf {
	--mfx-navy: #0f1a2e;
	--mfx-gold: #c9a84c;
	--mfx-gold-deep: #b3933e;
	--mfx-cream: #faf8f2;
	--mfx-cream-deep: #f0ece2;
	--mfx-slate: #5a6578;
	--mfx-text: #2d3243;
	--mfx-error: #b32d2e;
	--mfx-success: #2c6e3f;

	font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var( --mfx-text );
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px;
	background: var( --mfx-cream );
	border-radius: 16px;
	box-shadow: 0 4px 40px rgba( 15, 26, 46, 0.08 ), 0 1px 3px rgba( 15, 26, 46, 0.04 );
}

.mfx-bf--empty {
	text-align: center;
	color: var( --mfx-slate );
}

.mfx-bf__step-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 28px;
	font-weight: 500;
	color: var( --mfx-navy );
	margin: 0 0 16px;
	letter-spacing: 0.01em;
}

.mfx-bf__step-title::after {
	content: '';
	display: block;
	width: 60px;
	height: 1px;
	background: var( --mfx-gold );
	margin-top: 12px;
}

/* Property picker */

.mfx-bf__property-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}

@media ( min-width: 640px ) {
	.mfx-bf__property-grid {
		grid-template-columns: repeat( auto-fit, minmax( 240px, 1fr ) );
	}
}

.mfx-bf__property-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px;
	background: #fff;
	border: 2px solid var( --mfx-cream-deep );
	border-radius: 12px;
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.2s ease;
	font-family: inherit;
	color: inherit;
	text-align: left;
}

.mfx-bf__property-card:hover {
	border-color: var( --mfx-gold );
	transform: translateY( -2px );
}

.mfx-bf__property-card.is-selected {
	border-color: var( --mfx-gold );
	background: var( --mfx-cream );
}

.mfx-bf__property-name {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 20px;
	font-weight: 500;
	color: var( --mfx-navy );
}

.mfx-bf__property-meta {
	font-size: 13px;
	color: var( --mfx-slate );
}

.mfx-bf__property-price {
	margin-top: 8px;
	font-size: 14px;
	color: var( --mfx-text );
	font-weight: 500;
}

/* Booking step */

.mfx-bf__booking-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 16px;
}

.mfx-bf__change-property {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	padding: 8px 16px;
	background: var( --mfx-navy );
	color: #fff;
	cursor: pointer;
	font-family: 'Outfit', sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	border-radius: 4px;
	transition: background 0.2s ease, color 0.2s ease;
}

.mfx-bf__change-property:hover,
.mfx-bf__change-property:focus {
	background: var( --mfx-gold );
	color: var( --mfx-navy );
	outline: none;
}

.mfx-bf__change-property:focus-visible {
	box-shadow: 0 0 0 3px rgba( 201, 168, 76, 0.4 );
}

.mfx-bf__booking-header {
	align-items: center;
}

.mfx-bf__columns {
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr;
}

/* Mobile-first: price column (with property context + summary) above form. */
.mfx-bf__form-col  { order: 2; }
.mfx-bf__price-col { order: 1; }

@media ( min-width: 900px ) {
	.mfx-bf__columns {
		grid-template-columns: minmax( 0, 1fr ) 320px;
	}

	.mfx-bf__form-col  { order: 1; }
	.mfx-bf__price-col { order: 2; }
}

.mfx-bf__row {
	display: grid;
	gap: 16px;
	margin-bottom: 16px;
	grid-template-columns: 1fr;
}

@media ( min-width: 640px ) {
	.mfx-bf__row--dates,
	.mfx-bf__row--contact {
		grid-template-columns: 1fr 1fr;
	}

	.mfx-bf__row--guests {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.mfx-bf__field {
	display: flex;
	flex-direction: column;
}

.mfx-bf__field label,
.mfx-bf__field-label {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var( --mfx-slate );
	margin-bottom: 6px;
}

.mfx-bf__input {
	padding: 12px 14px;
	border: 1px solid var( --mfx-cream-deep );
	border-radius: 4px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
	color: var( --mfx-text );
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mfx-bf__input:focus {
	outline: none;
	border-color: var( --mfx-gold );
	box-shadow: 0 0 0 3px rgba( 201, 168, 76, 0.18 );
}

.mfx-bf__input--date {
	cursor: pointer;
	background-image: url( "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235a6578' viewBox='0 0 16 16'><path d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1H2zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5z'/></svg>" );
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.mfx-bf__amenities {
	display: block;
}

.mfx-bf__amenities-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mfx-bf__amenity {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var( --mfx-text );
	cursor: pointer;
}

/* Consent */

.mfx-bf__consent {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: #fff;
	border-radius: 8px;
	margin-bottom: 16px;
}

.mfx-bf__consent-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var( --mfx-slate );
	cursor: pointer;
}

.mfx-bf__consent-row input[type="checkbox"] {
	flex-shrink: 0;
	margin-top: 3px;
	width: 16px;
	height: 16px;
	accent-color: var( --mfx-gold );
}

.mfx-bf__consent-row a {
	color: var( --mfx-gold-deep );
	text-decoration: underline;
}

/* Submit */

.mfx-bf__submit-wrap {
	margin-top: 8px;
}

.mfx-bf__submit {
	width: 100%;
	padding: 16px 24px;
	background: var( --mfx-navy );
	color: var( --mfx-cream );
	border: 0;
	border-radius: 4px;
	font-family: 'Outfit', sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.mfx-bf__submit:hover:not(:disabled) {
	background: #1a2842;
}

.mfx-bf__submit:active:not(:disabled) {
	transform: translateY( 1px );
}

.mfx-bf__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Messages */

.mfx-bf__messages {
	margin-top: 16px;
}

.mfx-bf__error,
.mfx-bf__success {
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
}

.mfx-bf__error {
	background: #fef0f0;
	color: var( --mfx-error );
	border: 1px solid #f3c1c2;
}

.mfx-bf__success {
	background: #ecf5ee;
	color: var( --mfx-success );
	border: 1px solid #b7d8be;
}

/* Price column */

.mfx-bf__price-col {
	align-self: start;
}

.mfx-bf__price-card {
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba( 15, 26, 46, 0.04 );
}

@media ( min-width: 900px ) {
	.mfx-bf__price-col {
		position: sticky;
		top: 16px;
	}
}

/* Property context block (above the price summary in the price column). */

.mfx-bf__property-context {
	background: #fff;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 16px;
	box-shadow: 0 1px 3px rgba( 15, 26, 46, 0.04 );
}

.mfx-bf__property-context-image-wrap {
	margin: -16px -16px 12px;
	overflow: hidden;
	border-radius: 12px 12px 0 0;
}

.mfx-bf__property-context-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.mfx-bf__property-context-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 20px;
	font-weight: 500;
	color: var( --mfx-navy );
	margin: 0 0 4px;
	line-height: 1.2;
}

.mfx-bf__property-context-location {
	font-family: 'Outfit', sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: var( --mfx-slate );
	margin: 0 0 10px;
}

.mfx-bf__property-context-stats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 13px;
	color: var( --mfx-text );
}

.mfx-bf__property-context-stats li {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.mfx-bf__property-context-stats li + li::before {
	content: '·';
	color: var( --mfx-slate );
	margin-right: 8px;
}

.mfx-bf__property-context-stats strong {
	font-weight: 500;
}

.mfx-bf__property-context-divider {
	width: 60px;
	height: 1px;
	background: var( --mfx-gold );
	border: 0;
	margin: 16px 0 0;
}

.mfx-bf__price-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 22px;
	font-weight: 500;
	color: var( --mfx-navy );
	margin: 0 0 12px;
}

.mfx-bf__price-empty {
	color: var( --mfx-slate );
	font-size: 14px;
	margin: 0;
}

.mfx-bf__price-list {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 12px;
	margin: 0 0 16px;
	padding: 0;
	font-size: 14px;
}

.mfx-bf__price-list dt {
	color: var( --mfx-text );
	font-weight: 400;
}

.mfx-bf__price-list dd {
	margin: 0;
	font-variant-numeric: tabular-nums;
	color: var( --mfx-text );
}

.mfx-bf__price-list dt.is-subtotal,
.mfx-bf__price-list dd.is-subtotal {
	font-weight: 500;
	border-top: 1px solid var( --mfx-cream-deep );
	padding-top: 8px;
	margin-top: 4px;
}

.mfx-bf__price-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding-top: 12px;
	border-top: 2px solid var( --mfx-navy );
	font-family: 'Cormorant Garamond', Georgia, serif;
}

.mfx-bf__price-total-label {
	font-size: 18px;
	color: var( --mfx-navy );
}

.mfx-bf__price-total-value {
	font-size: 22px;
	font-weight: 500;
	color: var( --mfx-navy );
}

/* Flatpickr theme overrides */

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
	background: var( --mfx-gold );
	border-color: var( --mfx-gold );
	color: #fff;
}

.flatpickr-day:hover {
	background: var( --mfx-cream-deep );
	border-color: var( --mfx-cream-deep );
}

.flatpickr-day.today {
	border-color: var( --mfx-gold );
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
	background: transparent;
	color: rgba( 90, 101, 120, 0.4 );
	text-decoration: line-through;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
	color: var( --mfx-navy );
	font-weight: 500;
}

.flatpickr-weekday {
	color: var( --mfx-slate );
}

/* Animation */

@keyframes mfxLpFadeIn {
	from { opacity: 0; transform: translateY( 8px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

.mfx-bf__step--booking:not([hidden]) {
	animation: mfxLpFadeIn 0.4s ease both;
}

.mfx-bf--unavailable {
	padding: 24px;
	text-align: center;
	color: var( --mfx-slate, #5a6578 );
	background: var( --mfx-cream, #faf8f2 );
	border-radius: 12px;
}

/* Action row injected under each .prop-card / .pcard on landing pages.
   The button styling comes from the static page's own .prop-btn / .pc-btn
   class (preserved through migration); we only own the row layout. */

.mfx-bf-card-actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.mfx-bf-card-actions > .mfx-bf-card-action {
	flex: 1;
	margin-top: 0;
	margin-bottom: 0;
	text-align: center;
}

@media ( max-width: 480px ) {
	.mfx-bf-card-actions {
		flex-direction: column;
		gap: 8px;
	}
}

.prop-card,
.pcard {
	cursor: pointer;
}

@media ( prefers-reduced-motion: reduce ) {
	.mfx-bf__step--booking,
	.mfx-bf__property-card {
		animation: none !important;
		transition: none !important;
	}
}

/* ==========================================================================
   Modal overlay
   --------------------------------------------------------------------------
   When the booking-form JS initializes, it moves the form into the modal
   overlay below and adds `body.mfx-bf-modal-ready`. Without JS, none of
   this engages — the form stays inline inside <section id="book"> and the
   `href="#book"` triggers behave as plain anchor scrolls.
   ========================================================================== */

.mfx-bf-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 16px;
	background: rgba( 15, 26, 46, 0.7 );
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.mfx-bf-modal-overlay[hidden] {
	display: none;
}

.mfx-bf-modal-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.mfx-bf-modal-content {
	position: relative;
	width: 100%;
	max-width: 960px;
	max-height: 90vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #faf8f2;
	border-top: 3px solid #c9a84c;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 8px 60px rgba( 15, 26, 46, 0.3 );
	transform: translateY( 20px );
	transition: transform 0.3s ease;
}

.mfx-bf-modal-overlay.is-open .mfx-bf-modal-content {
	transform: translateY( 0 );
}

.mfx-bf-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #0f1a2e;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	z-index: 1;
}

.mfx-bf-modal-close:hover,
.mfx-bf-modal-close:focus {
	background: #f0ece2;
	color: #c9a84c;
	outline: none;
}

.mfx-bf-modal-close:focus-visible {
	box-shadow: 0 0 0 3px rgba( 201, 168, 76, 0.4 );
}

/* When JS owns the form, the inline section is redundant — hide it. */
body.mfx-bf-modal-ready section#book {
	display: none;
}

/* When the modal is open, the form inside resets brand padding/shadow:
   the modal card already provides them. */
body.mfx-bf-modal-ready .mfx-bf-modal-content > .mfx-bf {
	background: transparent;
	box-shadow: none;
	padding: 0;
	margin: 0;
	max-width: none;
	border-radius: 0;
}

/* Mobile full-screen */
@media ( max-width: 640px ) {

	.mfx-bf-modal-overlay {
		padding: 0;
		align-items: stretch;
	}

	.mfx-bf-modal-content {
		max-width: none;
		max-height: none;
		min-height: 100vh;
		border-radius: 0;
		border-top: 0;
		padding: 24px;
		padding-top: 60px;
		transform: translateY( 16px );
	}

	.mfx-bf-modal-close {
		top: 8px;
		right: 8px;
		background: rgba( 250, 248, 242, 0.9 );
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.mfx-bf-modal-overlay,
	.mfx-bf-modal-content {
		transition: none !important;
		transform: none !important;
	}
}
