/* Melbourne Taxi Service — booking form & confirmation.
   Design tokens from the handoff. Single breakpoint at 900px; mobile-first. */

.mts-wrap {
	--ink: #17150F;
	--cream: #FBF6EE;
	--amber: #F2A600;
	--sand: #F3ECDF;
	--line: #E7DFD2;
	--line-strong: #DFD5C2;
	--divider: #F0E9DC;
	--muted: #6E675C;
	--faint: #8A7F6B;
	--dark-card: #221F17;
	--dark-border: #3A352A;
	--error: #B4451F;
	--success: #1F6E5A;
	--success-bg: #DCEFE5;

	max-width: 1000px;
	margin: 0 auto;
	padding: 24px 20px 48px;
	box-sizing: border-box;
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--ink);
	line-height: 1.5;
}

/* Block themes cap constrained content to --wp--style--global--content-size
   (often ~620px), which would override the width above and cramp the desktop
   two-column layout. This higher-specificity selector reclaims the intended
   width; margin:auto still centres it within the wider content area. */
body .is-layout-constrained > .mts-wrap {
	max-width: 1000px;
}

.mts-wrap *,
.mts-wrap *::before,
.mts-wrap *::after { box-sizing: border-box; }

/* The form carries its own branded masthead, so hide the theme's page-title
   heading ("Book Taxi"). Scoped safely: form.css only loads on pages that
   contain the [mts_booking_form] shortcode. `body` prefix out-specifies the
   theme's own `.wp-block-post-title` rule without needing !important. */
body .wp-block-post-title { display: none; }

/* The page template inserts a tall spacer block above the content; with the
   title gone and the form carrying its own masthead, collapse it so the form
   sits at the top of the page. Scoped: form.css only loads on shortcode
   pages, and footer spacers live outside <main>, so they are unaffected. */
body main .wp-block-spacer { display: none; }

/* Hide the theme site header (site title + nav) on the booking page — the form
   provides its own masthead. `header.…` targets only the header template part;
   the footer (<footer>) shares the class but is left intact. */
body header.wp-block-template-part { display: none; }

/* Masthead — branded header above the form */
.mts-masthead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 20px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--divider);
}
.mts-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mts-brand-badge {
	flex: none;
	width: 48px; height: 48px;
	border-radius: 14px;
	background: var(--amber);
	display: flex; align-items: center; justify-content: center;
	font-size: 26px; line-height: 1;
}
.mts-brand-name {
	font-family: "Instrument Serif", Georgia, serif;
	font-weight: 400;
	font-size: 23px;
	line-height: 1.1;
	color: var(--ink);
	overflow-wrap: anywhere;
}
.mts-callnow {
	flex: none;
	background: var(--ink);
	color: var(--cream);
	font-weight: 800;
	font-size: 15px;
	padding: 12px 22px;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
}
.mts-callnow:hover { color: var(--cream); opacity: 0.9; }
.mts-callnow:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* Layout */
.mts-grid { display: block; }
.mts-main { display: flex; flex-direction: column; gap: 18px; }
.mts-intro { margin-bottom: 2px; }
.mts-title {
	font-family: "Instrument Serif", Georgia, serif;
	font-weight: 400;
	font-size: 34px;
	line-height: 1.05;
	margin: 0 0 6px;
}
.mts-lead { margin: 0; font-size: 15px; color: var(--muted); }

.mts-card { display: flex; flex-direction: column; gap: 16px; }

.mts-group-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	color: var(--faint);
	margin: 0;
}

.mts-field { display: flex; flex-direction: column; gap: 7px; }
.mts-label { font-size: 14px; font-weight: 700; }
.mts-req { color: var(--error); }

.mts-input {
	width: 100%;
	border: 1.5px solid var(--line-strong);
	background: #FFF;
	border-radius: 12px;
	padding: 14px 15px;
	font-size: 16px; /* never below 16 — iOS zoom */
	min-height: 52px;
	font-family: inherit;
	color: var(--ink);
}
textarea.mts-input { min-height: auto; resize: vertical; }
.mts-input:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--ink); }
.mts-input--error { border-color: var(--error); }

.mts-help { margin: 0; font-size: 13px; color: var(--faint); }

.mts-error {
	font-size: 13px;
	font-weight: 600;
	color: var(--error);
}
.mts-error--summary {
	background: #FDF3EF;
	border: 1px solid #EDD6CC;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 6px;
	font-weight: 700;
}

.mts-row { display: flex; flex-direction: column; gap: 16px; }

/* Passenger stepper */
.mts-passengers { gap: 9px; }
.mts-stepper {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #FFF;
	border: 1.5px solid var(--line-strong);
	border-radius: 14px;
	padding: 8px 12px;
	max-width: 260px;
}
.mts-step {
	width: 48px; height: 48px; flex: none;
	border: 0; border-radius: 12px;
	background: var(--sand);
	font-size: 24px; font-weight: 700; line-height: 1;
	cursor: pointer; color: var(--ink);
}
.mts-step:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.mts-pax-input {
	flex: 1; min-width: 0;
	border: 0; background: transparent;
	text-align: center;
	font-size: 22px; font-weight: 800;
	font-family: inherit; color: var(--ink);
	-moz-appearance: textfield;
}
.mts-pax-input::-webkit-outer-spin-button,
.mts-pax-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mts-pax-input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

/* Vehicles */
.mts-vehicles-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.mts-vehicles-fieldset > legend { float: left; width: 100%; }
.mts-vehicles-fieldset::after { content: ""; display: table; clear: both; }

.mts-vehicle {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 13px;
	border-radius: 16px;
	padding: 17px;
	cursor: pointer;
}
.mts-vehicle--eligible { background: #FFF; border: 1.5px solid var(--line-strong); }
.mts-vehicle--ineligible {
	background: var(--sand);
	border: 1.5px dashed #D8CFBE;
	opacity: 0.7;
	cursor: not-allowed;
}
.mts-vehicle-ring {
	position: absolute; inset: 0;
	border: 3px solid var(--ink);
	border-radius: 16px;
	pointer-events: none;
	opacity: 0;
}
.mts-vehicle.is-selected .mts-vehicle-ring { opacity: 1; }

.mts-vehicle-radio { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--ink); }
.mts-vehicle-radio:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.mts-vehicle-icon { font-size: 28px; line-height: 1; }
.mts-vehicle-photo { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.mts-vehicle--ineligible .mts-vehicle-icon { filter: grayscale(1); }
.mts-vehicle-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mts-vehicle-name { font-size: 17px; font-weight: 800; }
.mts-vehicle--ineligible .mts-vehicle-name { color: var(--muted); }
.mts-vehicle-capacity { font-size: 13px; line-height: 1.45; color: var(--muted); }
.mts-vehicle--ineligible .mts-vehicle-capacity { color: var(--faint); }
.mts-vehicle-wheelchair { font-size: 13px; font-weight: 700; color: var(--success); }
.mts-vehicle-reason { font-size: 13px; font-weight: 700; color: var(--error); }
/* Hidden on the cards (no prices in the booking options), but kept in the DOM
   so the trip-summary sidebar can still read the fare via JS. */
.mts-vehicle-fare { display: none; }
.mts-vehicle-fare-value { display: block; font-size: 16px; font-weight: 800; }
.mts-vehicle-fare-note { display: block; font-size: 11px; color: var(--faint); }

/* Buttons */
.mts-btn {
	display: inline-block;
	text-align: center;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 17px;
	font-weight: 800;
	padding: 17px 22px;
	border-radius: 14px;
}
.mts-btn--block { display: block; width: 100%; }
.mts-btn--primary { background: var(--amber); color: var(--ink); }
.mts-btn--outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); font-size: 15px; font-weight: 700; padding: 15px 22px; }
.mts-btn--ghost { background: transparent; border: 1.5px solid var(--cream); color: var(--cream); font-weight: 700; font-size: 15px; padding: 14px 22px; }
.mts-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.mts-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mts-actions--mobile { margin-top: 24px; }

/* Honeypot — visually removed but not display:none */
.mts-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* Trip summary (desktop only) */
.mts-summary { display: none; }
.mts-summary-inner {
	position: sticky; top: 24px;
	background: var(--ink); color: var(--cream);
	border-radius: 18px; padding: 26px;
	display: flex; flex-direction: column; gap: 14px;
}
.mts-summary-title { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 24px; margin: 0; color: var(--cream); }
.mts-summary-rows { margin: 0; display: flex; flex-direction: column; }
.mts-summary-row { padding: 10px 0; border-bottom: 1px solid var(--dark-border); }
.mts-summary-row dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 3px; }
.mts-summary-row dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--cream); }
.mts-summary-fare { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.mts-summary-fare-label { font-size: 13px; color: #A79E8C; font-weight: 700; }
.mts-summary-fare-value { font-size: 22px; font-weight: 800; color: var(--amber); }

/* Confirmation */
.mts-confirm { padding: 0 0 48px; }
.mts-confirm-band {
	background: var(--ink); color: var(--cream);
	padding: 32px 24px 30px;
	border-radius: 0 0 20px 20px;
	display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.mts-confirm-tick {
	width: 52px; height: 52px; border-radius: 999px;
	background: var(--amber); color: var(--ink);
	font-size: 27px; font-weight: 800;
	display: flex; align-items: center; justify-content: center;
}
.mts-confirm-heading { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 36px; line-height: 1.05; margin: 0; color: var(--cream); }
.mts-confirm-sub { margin: 0; font-size: 15px; color: #C8C0B0; }
.mts-confirm-ref { margin-top: 6px; width: 100%; background: var(--cream); color: var(--ink); border-radius: 14px; padding: 14px 18px; }
.mts-confirm-ref-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--faint); }
.mts-confirm-ref-value { font-family: "Instrument Serif", Georgia, serif; font-size: 36px; }
.mts-confirm-body { padding: 20px 0 0; display: flex; flex-direction: column; gap: 20px; }
.mts-confirm-details { background: #FFF; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mts-confirm-detail { padding: 14px 16px; border-bottom: 1px solid var(--divider); display: flex; flex-direction: column; gap: 3px; }
.mts-confirm-detail-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--faint); }
.mts-confirm-detail-value { font-size: 15px; font-weight: 600; line-height: 1.45; }
.mts-confirm-detail--status { flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 0; }

.mts-pill { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 999px; }
.mts-pill--confirmed { background: var(--success-bg); color: var(--success); }

.mts-notfound { text-align: left; }

/* Desktop */
@media (min-width: 900px) {
	.mts-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
	.mts-brand-name { font-size: 28px; }
	.mts-card { background: #FFF; border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
	.mts-input { background: var(--cream); }
	.mts-row { flex-direction: row; }
	.mts-row .mts-field { flex: 1; }
	.mts-actions--mobile { display: none; }
	.mts-summary { display: block; }
	.mts-title { font-size: 40px; }

	.mts-confirm-band { border-radius: 20px; padding: 48px; }
	.mts-confirm-heading { font-size: 54px; }
	.mts-confirm-ref-value { font-size: 56px; }
	.mts-confirm-details { display: grid; grid-template-columns: 1fr 1fr; }
	.mts-confirm-detail--status { grid-column: 1 / -1; }
}

/* Payment method — segmented radio options (Task 7). */
.mts-pay-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.mts-pay-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border: 1.5px solid var(--line-strong);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	font-weight: 600;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.mts-pay-option:hover {
	border-color: var(--amber);
}

.mts-pay-option.is-selected {
	border-color: var(--amber);
	background: var(--cream);
}

.mts-pay-radio {
	width: 18px;
	height: 18px;
	accent-color: var(--amber);
	margin: 0;
}

.mts-pay-label {
	color: var(--ink);
}

@media (min-width: 900px) {
	.mts-pay-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
