/**
 * RAD Limo Booking wizard.
 * Themeable via CSS custom properties — override on .rlb-wizard from your theme
 * or a Divi/Elementor custom-CSS box.
 */

.rlb-wizard {
	--rlb-accent: #b98a2f;          /* champagne gold */
	--rlb-accent-contrast: #ffffff;
	--rlb-surface: #ffffff;
	--rlb-surface-alt: #f7f5f1;
	--rlb-text: #1c1a17;
	--rlb-muted: #6f6a61;
	--rlb-border: #ddd8cf;
	--rlb-radius: 10px;
	--rlb-error: #b3392f;
	--rlb-success: #2f7d3b;

	max-width: 760px;
	margin: 0 auto;
	color: var(--rlb-text);
	font-size: 16px;
	line-height: 1.5;
}

/* Progress (numbered, clickable) ---------------------------------------- */

.rlb-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	counter-reset: rlb-step;
}

.rlb-progress__item {
	flex: 1 1 auto;
	counter-increment: rlb-step;
	border-bottom: 3px solid var(--rlb-border);
	list-style: none;               /* Themes re-add markers on li directly… */
	margin: 0;
	padding: 0;
}

.rlb-progress__item::marker {
	content: none;                  /* …so kill the marker box explicitly. */
}

.rlb-progress__item.is-current {
	border-bottom-color: var(--rlb-accent);
}

.rlb-progress__item.is-done {
	border-bottom-color: var(--rlb-accent);
}

.rlb-progress__btn {
	font: inherit;
	font-size: 12px;
	width: 100%;
	min-height: 44px;               /* Touch target. */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	background: none;
	border: 0;
	padding: 6px 2px;
	color: var(--rlb-muted);
	cursor: default;
}

.rlb-progress__btn::before {
	content: counter(rlb-step);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--rlb-border);
	font-size: 11px;
	font-weight: 700;
}

.rlb-progress__item.is-current .rlb-progress__btn {
	color: var(--rlb-text);
	font-weight: 600;
}

.rlb-progress__item.is-current .rlb-progress__btn::before {
	border-color: var(--rlb-accent);
	background: var(--rlb-accent);
	color: var(--rlb-accent-contrast);
}

.rlb-progress__item.is-done .rlb-progress__btn {
	color: var(--rlb-accent);
	cursor: pointer;
}

.rlb-progress__item.is-done .rlb-progress__btn::before {
	content: '✓';
	border-color: var(--rlb-accent);
	color: var(--rlb-accent);
}

.rlb-progress__item.is-done .rlb-progress__btn:hover {
	color: var(--rlb-text);
}

.rlb-progress__item.is-done .rlb-progress__btn:hover::before {
	background: var(--rlb-accent);
	color: var(--rlb-accent-contrast);
}

.rlb-progress__label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* Step shell ------------------------------------------------------------ */

.rlb-step__title {
	margin: 0 0 12px;
	font-size: 24px;
}

.rlb-help {
	color: var(--rlb-muted);
	margin: 0 0 16px;
}

.rlb-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
}

.rlb-nav .rlb-btn--primary {
	margin-left: auto;
}

/* Buttons --------------------------------------------------------------- */

.rlb-btn {
	font: inherit;
	border-radius: var(--rlb-radius);
	padding: 12px 28px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: filter 120ms ease;
}

.rlb-btn--primary {
	background: var(--rlb-accent);
	color: var(--rlb-accent-contrast);
}

.rlb-btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.rlb-btn--primary:not(:disabled):hover {
	filter: brightness(1.08);
}

.rlb-btn--ghost {
	background: transparent;
	color: var(--rlb-text);
	border-color: var(--rlb-border);
}

/* Simple choice grid (durations, times) --------------------------------- */

.rlb-choice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
}

.rlb-choice {
	font: inherit;
	padding: 14px 8px;
	background: var(--rlb-surface);
	border: 1px solid var(--rlb-border);
	border-radius: var(--rlb-radius);
	cursor: pointer;
	text-align: center;
	transition: border-color 120ms ease, background 120ms ease;
}

.rlb-choice:hover {
	border-color: var(--rlb-accent);
}

.rlb-choice.is-selected {
	background: var(--rlb-accent);
	border-color: var(--rlb-accent);
	color: var(--rlb-accent-contrast);
	font-weight: 600;
}

/* Image cards (districts, vehicles) ------------------------------------- */

.rlb-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 16px;
}

.rlb-card {
	font: inherit;
	display: flex;
	flex-direction: column;
	text-align: left;
	background: var(--rlb-surface);
	border: 2px solid var(--rlb-border);
	border-radius: var(--rlb-radius);
	overflow: hidden;
	cursor: pointer;
	padding: 0 0 14px;
	transition: border-color 120ms ease, transform 120ms ease;
}

.rlb-card:hover {
	border-color: var(--rlb-accent);
	transform: translateY(-2px);
}

.rlb-card.is-selected {
	border-color: var(--rlb-accent);
	box-shadow: 0 0 0 2px var(--rlb-accent);
}

.rlb-card.is-selected::after {
	content: '✓';
	position: relative;
	align-self: flex-end;
	margin: -2px 12px 0 0;
	color: var(--rlb-accent);
	font-weight: 700;
}

.rlb-card__img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
}

.rlb-card__img--empty {
	background: var(--rlb-surface-alt);
}

.rlb-card__name {
	font-weight: 600;
	padding: 12px 14px 0;
}

.rlb-card__desc {
	color: var(--rlb-muted);
	font-size: 14px;
	padding: 4px 14px 0;
}

.rlb-card__price {
	color: var(--rlb-accent);
	font-weight: 700;
	padding: 8px 14px 0;
}

/* Per-vehicle add-on panels ---------------------------------------------- */

.rlb-vehicle-panel {
	border: 1px solid var(--rlb-border);
	border-radius: var(--rlb-radius);
	padding: 14px 16px 6px;
	margin-bottom: 16px;
}

.rlb-vehicle-panel__name {
	margin: 0 0 10px;
	font-size: 17px;
	color: var(--rlb-accent);
}

.rlb-qty--compact {
	padding: 10px 12px;
	margin-bottom: 8px;
}

/* Quantity rows (add-ons) ------------------------------------------------ */

.rlb-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px;
	background: var(--rlb-surface-alt);
	border-radius: var(--rlb-radius);
	margin-bottom: 12px;
}

.rlb-qty__label {
	font-weight: 600;
	display: block;
}

.rlb-qty__price {
	color: var(--rlb-muted);
	font-size: 14px;
}

.rlb-qty__controls {
	display: flex;
	align-items: center;
	gap: 14px;
}

.rlb-qty__btn {
	font: inherit;
	font-size: 20px;
	line-height: 1;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--rlb-border);
	background: var(--rlb-surface);
	cursor: pointer;
}

.rlb-qty__btn:hover {
	border-color: var(--rlb-accent);
	color: var(--rlb-accent);
}

.rlb-qty__value {
	min-width: 28px;
	text-align: center;
	font-weight: 600;
	font-size: 18px;
}

/* Review ----------------------------------------------------------------- */

.rlb-summary {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px 18px;
	margin: 0 0 20px;
}

.rlb-summary dt {
	color: var(--rlb-muted);
}

.rlb-summary dd {
	margin: 0;
	font-weight: 600;
}

.rlb-lines {
	width: 100%;
	border-collapse: collapse;
}

.rlb-lines td {
	padding: 10px 4px;
	border-bottom: 1px solid var(--rlb-border);
}

.rlb-lines__amount {
	text-align: right;
	white-space: nowrap;
}

.rlb-lines__discount td {
	color: var(--rlb-success);
}

.rlb-lines__total td {
	font-weight: 700;
	font-size: 18px;
	border-bottom: none;
	padding-top: 14px;
}

/* Feedback --------------------------------------------------------------- */

.rlb-notice {
	padding: 14px 16px;
	border-radius: var(--rlb-radius);
	margin: 12px 0;
}

.rlb-notice--error {
	background: #fbeae8;
	color: var(--rlb-error);
}

.rlb-notice--info {
	background: var(--rlb-surface-alt);
	color: var(--rlb-text);
}

.rlb-notice--success {
	background: #eaf5ec;
	color: var(--rlb-success);
}

.rlb-spinner {
	width: 32px;
	height: 32px;
	margin: 32px auto;
	border: 3px solid var(--rlb-border);
	border-top-color: var(--rlb-accent);
	border-radius: 50%;
	animation: rlb-spin 800ms linear infinite;
}

@keyframes rlb-spin {
	to { transform: rotate(360deg); }
}

/* Inputs ------------------------------------------------------------------ */

.rlb-input {
	font: inherit;
	padding: 12px 14px;
	border: 1px solid var(--rlb-border);
	border-radius: var(--rlb-radius);
	background: var(--rlb-surface);
	color: var(--rlb-text);
}

.rlb-input--date {
	font-size: 18px;
}

/* Forms (account / billing) ----------------------------------------------- */

.rlb-field {
	margin: 0 0 10px;
}

.rlb-field .rlb-input {
	width: 100%;
	box-sizing: border-box;
}

.rlb-field--promo {
	display: flex;
	gap: 8px;
}

.rlb-field--promo .rlb-input {
	flex: 1;
}

.rlb-account-form {
	max-width: 420px;
}

.rlb-billing h3 {
	margin: 20px 0 10px;
	font-size: 17px;
}

/* Legal docs (scroll-gate) ------------------------------------------------ */

.rlb-doc {
	margin-bottom: 24px;
}

.rlb-doc h3 {
	margin: 0 0 8px;
	font-size: 17px;
}

.rlb-doc__scroll {
	height: 220px;
	overflow-y: auto;
	border: 1px solid var(--rlb-border);
	border-radius: var(--rlb-radius);
	padding: 14px 16px;
	background: var(--rlb-surface);
	font-size: 14px;
}

.rlb-doc__agree {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	cursor: pointer;
}

.rlb-doc__agree input:disabled + span {
	color: var(--rlb-muted);
}

.rlb-doc__hint {
	color: var(--rlb-muted);
	font-size: 13px;
	font-style: italic;
	margin-left: 8px;
}

/* Confirmation ------------------------------------------------------------ */

.rlb-confirmation {
	text-align: center;
	padding: 40px 16px;
}

.rlb-confirmation__check {
	width: 64px;
	height: 64px;
	line-height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--rlb-success);
	color: #fff;
	font-size: 34px;
}

.rlb-confirmation__ref {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 2px;
	color: var(--rlb-accent);
}

.rlb-btn--pay {
	font-size: 18px;
	padding: 16px 36px;
}

/* ------------------------------------------------------------------------
 * Tablets (≤ 900px)
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
	.rlb-wizard {
		font-size: 17px;        /* Bigger base for touch reading distance. */
	}

	.rlb-card-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}

	.rlb-btn {
		min-height: 48px;       /* Comfortable touch targets everywhere. */
	}

	.rlb-choice {
		min-height: 48px;
	}
}

/* ------------------------------------------------------------------------
 * Phones (≤ 600px)
 * ---------------------------------------------------------------------- */

@media (max-width: 600px) {
	.rlb-wizard {
		padding: 0 2px;
	}

	/* Progress collapses to numbered dots; only the current label shows. */
	.rlb-progress {
		gap: 0;
	}

	.rlb-progress__label {
		display: none;
	}

	.rlb-progress__item.is-current .rlb-progress__label {
		display: block;
		font-size: 11px;
	}

	.rlb-step__title {
		font-size: 21px;
	}

	/* Cards: two-up, tighter. */
	.rlb-card-grid {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.rlb-card__name,
	.rlb-card__desc,
	.rlb-card__price {
		padding-left: 10px;
		padding-right: 10px;
	}

	/* Times/durations: three-up grid keeps them thumb-sized. */
	.rlb-choice-grid,
	.rlb-choice-grid--times {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Nav: full-width, thumb-zone friendly. */
	.rlb-nav {
		flex-wrap: wrap;
	}

	.rlb-nav .rlb-btn--primary {
		flex: 1 1 100%;
		order: -1;              /* Primary action on top. */
		min-height: 52px;
		font-size: 17px;
	}

	.rlb-nav .rlb-btn--ghost {
		flex: 1 1 100%;
	}

	/* Inputs: full width; ≥16px font stops iOS auto-zoom. */
	.rlb-input,
	.rlb-input--date {
		width: 100%;
		box-sizing: border-box;
		font-size: 16px;
	}

	/* Quantity steppers stay big. */
	.rlb-qty__btn {
		width: 48px;
		height: 48px;
	}

	/* Legal docs: viewport-relative so they're readable but scrollable. */
	.rlb-doc__scroll {
		height: 45vh;
		font-size: 15px;
	}

	.rlb-doc__hint {
		display: block;
		margin: 4px 0 0;
	}

	.rlb-summary {
		grid-template-columns: 1fr;
		gap: 0 0;
	}

	.rlb-summary dt {
		margin-top: 8px;
		font-size: 13px;
	}

	.rlb-btn--pay {
		width: 100%;
	}

	.rlb-confirmation__ref {
		font-size: 24px;
	}
}

/* Very narrow phones (≤ 360px): single-column cards. */
@media (max-width: 360px) {
	.rlb-card-grid {
		grid-template-columns: 1fr;
	}

	.rlb-choice-grid,
	.rlb-choice-grid--times {
		grid-template-columns: repeat(2, 1fr);
	}
}
