/*
 * Esplori Booking. Every colour, radius and font comes from the tokens below,
 * so matching a client's theme means changing only these.
 * Style: white cards on a soft grey panel, near-black primary, small dense type, day tiles and time slots.
 */
.esb, .esb-fleet-wrap {
	--esb-primary: #0b1220;
	--esb-primary-text: #ffffff;
	--esb-text: #111827;
	--esb-muted: #6b7280;
	--esb-faint: #9ca3af;
	--esb-border: #e5e7eb;
	--esb-surface: #ffffff;
	--esb-panel: #f4f4f6;
	--esb-fill: #f3f4f6;
	--esb-icon: #4f63d9;
	--esb-required: #e5484d;
	--esb-ok: #22a06b;
	--esb-radius-card: 18px;
	--esb-radius: 10px;
	--esb-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
	--esb-font: inherit;
	color: var(--esb-text);
	font-family: var(--esb-font);
	font-size: 14px;
	line-height: 1.45;
	box-sizing: border-box;
}
.esb *, .esb-fleet-wrap * { box-sizing: inherit; }
.esb [hidden], .esb-fleet-wrap [hidden] { display: none !important; }

/* ============================================================ fleet */
.esb-fleet-wrap {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	padding: 16px;
	background: var(--esb-panel);
	border-radius: 24px;
}
@media (min-width: 768px) {
	.esb-fleet-wrap { grid-template-columns: 220px 1fr; gap: 20px; padding: 20px; }
}

.esb-filter__box {
	padding: 16px 18px;
	background: var(--esb-surface);
	border-radius: var(--esb-radius-card);
	box-shadow: var(--esb-shadow);
}
@media (min-width: 768px) {
	.esb-filter { position: sticky; top: 24px; align-self: start; }
}
.esb-filter__title { font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.esb-filter__title::-webkit-details-marker { display: none; }
.esb-filter__title::after { content: "+"; float: right; color: var(--esb-muted); font-weight: 400; }
.esb-filter__box[open] .esb-filter__title::after { content: "−"; }
.esb-filter__group { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--esb-border); }
.esb-filter__legend { margin: 0 0 6px; font-size: 12px; font-weight: 600; }
.esb-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--esb-text); cursor: pointer; }
.esb-check em { font-style: normal; color: var(--esb-faint); }
.esb-check input, .esb-field--check input {
	appearance: none;
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	border: 1.5px solid #cbd0d8;
	border-radius: 4px;
	background: var(--esb-surface) center / 10px no-repeat;
	cursor: pointer;
}
.esb-check input:checked, .esb-field--check input:checked {
	background-color: var(--esb-icon);
	border-color: var(--esb-icon);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.esb-check input:focus-visible, .esb-field--check input:focus-visible { outline: 2px solid var(--esb-icon); outline-offset: 2px; }

.esb-fleet {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 16px;
	align-content: start;
}
.esb-car {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	color: var(--esb-text);
	text-decoration: none;
	background: var(--esb-surface);
	border-radius: var(--esb-radius-card);
	box-shadow: var(--esb-shadow);
	transition: transform .15s ease, box-shadow .15s ease;
}
.esb-car:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 24, 40, .05), 0 14px 32px rgba(16, 24, 40, .10); color: var(--esb-text); }
.esb-car:focus-visible { outline: 2px solid var(--esb-primary); outline-offset: 3px; }
.esb-car__name { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.3; }
.esb-car__cat { margin: 2px 0 0; font-size: 12px; color: var(--esb-muted); }
.esb-car__media { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.esb-car__media img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.esb-car__foot { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--esb-muted); }
.esb-car__spec { display: inline-flex; align-items: center; gap: 5px; }
.esb-car__spec svg { width: 14px; height: 14px; fill: var(--esb-icon); color: var(--esb-icon); }
.esb-car__price { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--esb-text); white-space: nowrap; }
.esb-car__price small { font-size: 11px; font-weight: 500; color: var(--esb-muted); }
.esb-fleet__none { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--esb-muted); }

/* ============================================================ form */
.esb {
	max-width: 640px;
	margin: 0 auto;
	padding: 24px 20px;
	background: var(--esb-surface);
	border-radius: 22px;
	box-shadow: var(--esb-shadow);
	scroll-margin-top: 120px;
}
@media (min-width: 560px) { .esb { padding: 28px 32px; } }

.esb-progress { display: flex; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 12px; font-weight: 500; color: var(--esb-faint); }
.esb-progress li { flex: 1; display: flex; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 2px solid var(--esb-border); }
.esb-progress span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--esb-fill); font-size: 11px; font-weight: 700; }
.esb-progress .is-current, .esb-progress .is-done { color: var(--esb-text); border-color: var(--esb-primary); }
.esb-progress .is-current span, .esb-progress .is-done span { background: var(--esb-primary); color: var(--esb-primary-text); }

.esb-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.esb-title { float: left; width: 100%; font-size: 20px; font-weight: 700; margin: 0 0 20px; padding: 0; letter-spacing: -.01em; }
.esb-step > .esb-title + * { clear: both; }
.esb-subtitle { font-size: 14px; font-weight: 600; margin: 24px 0 10px; }

.esb-row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .esb-row { grid-template-columns: 1fr 1fr; } }

.esb-field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.esb-field > label, .esb-label { margin: 0; font-size: 14px; font-weight: 600; }
.esb-field:has([required]) > label::after, .esb-field:has([required]) > .esb-label::after { content: "*"; color: var(--esb-required); }
.esb-field small { font-weight: 400; color: var(--esb-faint); }
.esb-field input:not([type=checkbox]):not([type=radio]), .esb-field select, .esb-field textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	font: inherit;
	font-size: 16px; /* 16px keeps iOS from zooming in */
	color: var(--esb-text);
	background: var(--esb-fill);
	border: 1px solid transparent;
	border-radius: var(--esb-radius);
	transition: border-color .15s, background .15s;
}
@media (min-width: 560px) {
	.esb-field input:not([type=checkbox]):not([type=radio]), .esb-field select, .esb-field textarea { font-size: 14px; }
}
.esb-field input::placeholder, .esb-field textarea::placeholder { color: var(--esb-faint); }
.esb-field input:not([type=checkbox]):not([type=radio]):focus, .esb-field select:focus, .esb-field textarea:focus { outline: none; background: var(--esb-surface); border-color: var(--esb-primary); }
.esb-field .is-invalid { border-color: var(--esb-required) !important; }
.esb-field__error, .esb-error { color: var(--esb-required); font-size: 13px; margin: 0; }
.esb-field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; }
.esb-field--check label::after { content: none !important; }
.esb-field--check input { margin-top: 2px; }
.esb-field--check a { color: var(--esb-text); }

/* ---- car card in the form */
.esb-carpreview { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 22px; padding: 12px; border: 1px solid var(--esb-border); border-radius: 14px; }
.esb-carpreview img { width: 104px; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 8px; }
.esb-carpreview > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--esb-muted); }
.esb-carpreview strong { font-size: 15px; color: var(--esb-text); }
.esb-link { flex-basis: 100%; text-align: right; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--esb-text); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.esb-car__note { font-style: italic; }

/* ---- day strip + time slots */
.esb-when { padding-bottom: 18px; border-bottom: 1px solid var(--esb-border); }
.esb-when__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.esb .esb-when__month {
	width: auto !important;
	min-height: 34px !important;
	padding: 4px 30px 4px 12px !important;
	font-size: 13px !important;
	font-weight: 500;
	background: var(--esb-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23111827' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 10px center / 12px no-repeat !important;
	border: 1px solid var(--esb-border) !important;
	appearance: none;
}
.esb-when__arrows { display: flex; gap: 6px; }
.esb-icon-btn {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	font-size: 18px;
	line-height: 1;
	color: var(--esb-text);
	background: var(--esb-surface);
	border: 1px solid var(--esb-border);
	border-radius: 50%;
	cursor: pointer;
}
.esb-icon-btn:disabled { color: var(--esb-faint); cursor: default; }

.esb-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.esb-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 10px 0;
	font: inherit;
	color: var(--esb-text);
	background: var(--esb-surface);
	border: 1px solid var(--esb-border);
	border-radius: 12px;
	cursor: pointer;
	transition: border-color .12s, background .12s;
}
.esb-day span { font-size: 11px; }
.esb-day strong { font-size: 17px; font-weight: 700; }
@media (min-width: 560px) { .esb-day span { font-size: 13px; } .esb-day strong { font-size: 19px; } .esb-day { padding: 12px 0; } }
.esb-day:hover:not(:disabled) { border-color: var(--esb-primary); }
.esb-day:disabled { color: var(--esb-faint); background: var(--esb-fill); border-color: var(--esb-fill); cursor: default; }
.esb-day.is-selected { color: var(--esb-primary-text); background: var(--esb-primary); border-color: var(--esb-primary); }

.esb-tz { margin: 2px 0 0; font-size: 12px; color: var(--esb-muted); }

.esb-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 172px; overflow-y: auto; padding: 1px; }
@media (min-width: 560px) { .esb-slots { grid-template-columns: repeat(4, 1fr); } }
.esb-slot {
	padding: 7px 0;
	font: inherit;
	font-size: 13px;
	color: var(--esb-text);
	background: var(--esb-surface);
	border: 1px solid var(--esb-border);
	border-radius: 8px;
	cursor: pointer;
}
.esb-slot:hover:not(:disabled) { border-color: var(--esb-primary); }
.esb-slot:disabled { color: #c9ccd3; text-decoration: line-through; cursor: default; }
.esb-slot.is-selected { color: var(--esb-primary-text); background: var(--esb-primary); border-color: var(--esb-primary); }

/* ---- pill toggle (office / hotel) */
.esb-seg { display: inline-flex; align-self: flex-start; gap: 4px; margin-top: 4px; padding: 3px; background: var(--esb-fill); border-radius: 999px; }
.esb-seg label { position: relative; cursor: pointer; }
.esb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.esb-seg span { display: block; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--esb-muted); border-radius: 999px; transition: background .12s, color .12s; }
.esb-seg input:checked + span { color: var(--esb-text); background: var(--esb-surface); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.esb-seg input:focus-visible + span { outline: 2px solid var(--esb-primary); }
.esb-place { margin: 0; font-size: 12px; color: var(--esb-muted); }
.esb-when:has(input[value="hotel"]:checked) .esb-place--office,
.esb-when:has(input[value="office"]:checked) .esb-place--hotel { display: none; }

/* ---- price, summary */
.esb-price { min-height: 22px; margin: 4px 0 8px; font-size: 14px; color: var(--esb-muted); }
.esb-price strong { font-size: 20px; color: var(--esb-text); }

.esb-summary { display: grid; gap: 14px; padding: 18px; background: var(--esb-fill); border-radius: 14px; }
.esb-summary__img { width: 100%; max-width: 220px; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 10px; }
.esb-summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.esb-summary dt { color: var(--esb-muted); }
.esb-summary dd { margin: 0; font-weight: 500; }
.esb-summary__total { margin: 0; padding-top: 12px; border-top: 1px solid var(--esb-border); font-size: 14px; color: var(--esb-muted); }
.esb-summary__total strong { font-size: 22px; color: var(--esb-text); }

.esb-inclusions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.esb-inclusions li { padding: 5px 10px; font-size: 12px; border: 1px solid var(--esb-border); border-radius: 8px; }
.esb-inclusions li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; background: var(--esb-ok); border-radius: 50%; }

.esb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- actions */
.esb-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--esb-border); }
.esb-nav [data-back] { margin-right: auto; }
@media (max-width: 559px) {
	.esb-nav--submit { flex-direction: column-reverse; }
	.esb-nav--submit .esb-btn { width: 100%; }
}
.esb-hint { font-size: 12px; color: var(--esb-muted); margin: 12px 0 0; }

.esb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 20px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: var(--esb-primary-text);
	background: var(--esb-primary);
	border: 1px solid var(--esb-primary);
	border-radius: var(--esb-radius);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
	cursor: pointer;
	transition: filter .12s;
}
.esb-btn:hover { filter: brightness(1.25); color: var(--esb-primary-text); }
.esb-btn--ghost { color: var(--esb-text); background: var(--esb-surface); border-color: var(--esb-border); box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.esb-btn--ghost:hover { filter: none; color: var(--esb-text); background: var(--esb-fill); }
.esb-btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }

.esb-done, .esb-result { padding: 40px 24px; text-align: center; }
.esb-done .esb-title, .esb-result .esb-title { float: none; }
.esb-id { display: inline-block; margin-top: 4px; padding: 4px 10px; font-family: ui-monospace, Menlo, monospace; font-size: 16px; letter-spacing: .04em; background: var(--esb-fill); border-radius: 8px; }

/* ============================================================ search ([esplori_search]) */
.esb-search {
	--esb-primary: #0b1220;
	--esb-primary-text: #ffffff;
	--esb-text: #111827;
	--esb-muted: #6b7280;
	--esb-border: #e5e7eb;
	--esb-surface: #ffffff;
	--esb-fill: #f3f4f6;
	--esb-radius: 10px;
	--esb-font: inherit;
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 12px;
	background: var(--esb-surface);
	border-radius: 20px;
	color: var(--esb-text);
	font-family: var(--esb-font);
	font-size: 14px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 16px 40px rgba(16, 24, 40, .16);
	box-sizing: border-box;
}
.esb-search * { box-sizing: border-box; }
.esb-search__group { display: grid; grid-template-columns: 1fr 104px; gap: 8px; }
.esb-search__field { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; background: var(--esb-fill); border-radius: var(--esb-radius); min-width: 0; }
.esb-search__field span { font-size: 12px; font-weight: 600; color: var(--esb-muted); }
.esb-search__field input, .esb-search__field select {
	width: 100%;
	min-width: 0;
	padding: 0;
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming into the field */
	font-weight: 600;
	color: var(--esb-text);
	background: transparent;
	border: 0;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.esb-search__field:focus-within { outline: 2px solid var(--esb-primary); outline-offset: -2px; }
.esb-search__submit { min-height: 56px; }
.esb-search__error { grid-column: 1 / -1; margin: 0; color: #e5484d; font-size: 13px; }
@media (min-width: 900px) {
	.esb-search { grid-template-columns: 1fr 1fr auto; align-items: stretch; }
	.esb-search__submit { padding-left: 28px; padding-right: 28px; }
}

/* fleet with dates: total for the rental instead of "from" */
.esb-fleet__dates { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font-size: 13px; color: var(--esb-muted); }
.esb-fleet__dates strong { color: var(--esb-text); }
.esb-fleet__dates a { color: var(--esb-text); font-weight: 600; }
.esb-car__price em { display: block; font-style: normal; font-size: 11px; font-weight: 500; color: var(--esb-muted); text-align: right; }
