/* ==========================================================================
   MGMT Vehicle Hire — Booking flow stylesheet
   Loaded only on /book/* URLs. Inherits tokens from the theme's main.css.
   ========================================================================== */

.booking-flow {
	background: var(--page-bg, #fafafa);
	min-height: calc(100vh - 200px);
	padding: 64px 0 96px;
}

.booking-flow__inner {
	max-width: 780px;
}

.booking-flow__title {
	color: var(--navy, #164475);
	font-size: 40px;
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.005em;
	margin: 0 0 16px;
}

.booking-flow__lead {
	color: var(--text-secondary, #595959);
	font-size: 18px;
	line-height: 1.55;
	margin: 0 0 40px;
	max-width: 60ch;
}

/* ---------- Stepper ---------- */
.booking-stepper {
	margin: 0 0 40px;
}
.booking-stepper ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	counter-reset: step;
}
.booking-stepper__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--text-secondary, #595959);
	opacity: 0.55;
}
.booking-stepper__item--done,
.booking-stepper__item--current {
	opacity: 1;
}
.booking-stepper__item--current .booking-stepper__num {
	background: var(--navy, #164475);
	color: #fff;
	border-color: var(--navy, #164475);
}
.booking-stepper__item--done .booking-stepper__num {
	background: transparent;
	color: var(--navy, #164475);
	border-color: var(--navy, #164475);
}
.booking-stepper__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 999px;
	border: 1px solid var(--bg-grey, #dfdfdf);
	background: #fff;
	font-size: 13px;
	font-weight: 500;
}
.booking-stepper__item:not(:last-child)::after {
	content: '';
	width: 24px;
	height: 1px;
	background: var(--bg-grey, #dfdfdf);
	margin-left: 4px;
}

/* Clickable steps (completed steps, only while the booking is still editable) */
.booking-stepper__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	transition: opacity 150ms ease-out, transform 150ms ease-out;
}
.booking-stepper__link:hover {
	opacity: 1;
	color: var(--navy, #164475);
}
.booking-stepper__item--done .booking-stepper__link:hover .booking-stepper__num {
	background: var(--navy, #164475);
	color: #fff;
}

/* Member capture fields — tighter top margin so they read as part of the radio group */
.member-captures {
	margin: 12px 0 4px 30px;
	padding: 16px 18px;
	background: var(--page-bg, #fafafa);
	border-left: 2px solid var(--navy, #164475);
	border-radius: 2px;
}
.member-captures[hidden] { display: none; }
.member-captures .field { margin-bottom: 12px; }
.member-captures .field:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
	.member-captures { margin-left: 0; }
}

/* ---------- Flash messages ---------- */
.booking-flash {
	padding: 16px 20px;
	border-radius: 2px;
	margin-bottom: 32px;
	font-size: 15px;
	line-height: 1.5;
}
.booking-flash--error {
	background: rgba(139, 31, 36, 0.08);
	border-left: 3px solid var(--status-booked, #8b1f24);
	color: var(--status-booked, #8b1f24);
}
.booking-flash--success {
	background: rgba(47, 122, 79, 0.08);
	border-left: 3px solid var(--status-available, #2f7a4f);
	color: var(--status-available, #2f7a4f);
}
.booking-flash ul {
	margin: 0;
	padding: 0 0 0 18px;
}

/* ---------- Form shell ---------- */
.booking-form {
	background: #fff;
	border: 1px solid var(--bg-grey, #dfdfdf);
	border-radius: 2px;
	padding: 32px;
}
.booking-form .field { display: flex; flex-direction: column; margin-bottom: 20px; }
.booking-form .field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 24px;
	margin-bottom: 8px;
}
.booking-form__section {
	padding-top: 32px;
	margin-top: 32px;
	border-top: 1px solid var(--bg-grey, #dfdfdf);
}
.booking-form__section-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 16px;
	color: var(--text-primary, #1a1a1a);
	letter-spacing: 0.02em;
}
.booking-form__section--notice {
	background: rgba(22, 68, 117, 0.04);
	border-left: 3px solid var(--navy, #164475);
	padding: 16px 20px;
	border-top: 0;
	margin-top: 24px;
	border-radius: 2px;
}

/* Dates-step duration line — sits between the date grid and Location section */
.booking-form__duration {
	margin: -8px 0 24px;
	padding: 0;
	font-size: 14px;
	color: var(--text-secondary, #595959);
	line-height: 1.5;
	min-height: 21px;
}
.booking-form__duration:empty { display: none; }
.booking-form__duration strong {
	color: var(--navy, #164475);
	font-weight: 600;
}
.booking-form__duration--warning { color: var(--status-buffer, #8a6a1e); }
.booking-form__duration--warning strong { color: var(--status-buffer, #8a6a1e); }
.booking-form__section--notice strong { display: block; margin-bottom: 4px; }
.booking-form__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--bg-grey, #dfdfdf);
	flex-wrap: wrap;
}
.booking-form__actions .btn {
	min-width: 140px;
}

@media (max-width: 640px) {
	.booking-form { padding: 20px; }
	.booking-form .field-grid { grid-template-columns: 1fr; }
	.booking-flow__title { font-size: 32px; }
}

/* ---------- Summary ---------- */
.booking-summary {
	background: #fff;
	border: 1px solid var(--bg-grey, #dfdfdf);
	border-radius: 2px;
	padding: 24px 32px;
	margin-bottom: 24px;
}
.booking-summary--pricing {
	background: var(--page-bg, #fafafa);
}
.booking-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 8px 0;
	font-size: 15px;
	border-bottom: 1px solid rgba(223, 223, 223, 0.6);
}
.booking-summary__row:last-child { border-bottom: 0; }
.booking-summary__label { color: var(--text-secondary, #595959); }
.booking-summary__value { font-weight: 500; color: var(--text-primary, #1a1a1a); }
.booking-summary__row--discount .booking-summary__value { color: var(--status-available, #2f7a4f); }
.booking-summary__row--total { font-size: 18px; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--bg-grey, #dfdfdf); border-bottom: 0; }
.booking-summary__row--total .booking-summary__label,
.booking-summary__row--total .booking-summary__value { color: var(--navy, #164475); font-weight: 600; }
.booking-summary__row--deposit .booking-summary__value {
	font-size: 22px;
	font-weight: 500;
	color: var(--navy, #164475);
}

/* ---------- Stripe payment step ---------- */
.stripe-payment-wrap {
	padding: 4px 0 8px;
}
#mgmt-payment-element {
	margin-bottom: 12px;
}
.stripe-errors {
	min-height: 20px;
	font-size: 14px;
	color: var(--status-booked, #8b1f24);
	line-height: 1.5;
	margin-top: 8px;
}
#mgmt-payment-submit .mgmt-payment-submit__processing {
	display: none;
}
#mgmt-payment-submit[aria-busy="true"] .mgmt-payment-submit__label {
	display: none;
}
#mgmt-payment-submit[aria-busy="true"] .mgmt-payment-submit__processing {
	display: inline;
}

/* ---------- Resume banner (JS) ---------- */
.booking-resume-banner {
	background: var(--navy, #164475);
	color: #fff;
	padding: 12px 20px;
	border-radius: 2px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
	font-size: 14px;
}
.booking-resume-banner button {
	background: #fff;
	color: var(--navy, #164475);
	border: 0;
	padding: 8px 14px;
	border-radius: 2px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
}
