/**
 * DIA Express Booking — front-end styles.
 *
 * Brand tokens (--dxb-primary etc.) are injected inline from the settings
 * screen; the fallbacks below are the values read off diaexpressmd.com.
 *
 * Layout is driven by CONTAINER queries, not viewport queries, because the
 * compact widget sits in a half-width column on a wide desktop — a viewport
 * query would wrongly hand it the full-width layout.
 */

.dxb {
	--dxb-primary: #F29407;
	--dxb-primary-soft: rgba(242, 148, 7, .10);
	--dxb-primary-ring: rgba(242, 148, 7, .22);
	--dxb-dark: #131E45;
	--dxb-accent: #D7B65D;

	--dxb-ink: #192026;
	--dxb-body: #4F4F4F;
	--dxb-muted: #8B8B8B;
	--dxb-line: #E4E8E8;
	--dxb-surface: #F3F6F6;
	--dxb-white: #FFFFFF;

	--dxb-radius: 12px;
	--dxb-radius-sm: 8px;
	--dxb-font-head: 'Taviraj', Georgia, 'Times New Roman', serif;
	--dxb-font-body: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

	container-type: inline-size;
	container-name: dxb;

	font-family: var(--dxb-font-body);
	color: var(--dxb-body);
	line-height: 1.55;
	font-size: 16px;
	max-width: 720px;
	margin-inline: auto;
}

.dxb--compact { max-width: 480px; }

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

/* The theme puts margins on everything; reset inside our card. */
.dxb p,
.dxb h2,
.dxb h3,
.dxb ol,
.dxb ul { margin: 0; }

/* ---- Card ---------------------------------------------------------------- */

.dxb-card {
	background: var(--dxb-white);
	border: 1px solid var(--dxb-line);
	border-radius: var(--dxb-radius);
	padding: 28px;
	box-shadow: 0 2px 4px rgba(19, 30, 69, .03), 0 12px 32px rgba(19, 30, 69, .06);
}

@container dxb (max-width: 420px) {
	.dxb-card { padding: 20px 18px; }
}

.dxb-h {
	font-family: var(--dxb-font-head);
	font-weight: 500;
	font-size: 30px;
	line-height: 1.2;
	color: var(--dxb-dark);
	margin: 0 0 6px;
}

.dxb--compact .dxb-h { font-size: 26px; }

.dxb-sub {
	font-size: 15px;
	color: var(--dxb-muted);
	margin: 0 0 22px;
}

.dxb-noscript {
	background: #FFF4E5;
	border: 1px solid var(--dxb-primary);
	border-radius: var(--dxb-radius-sm);
	padding: 14px 16px;
	margin-bottom: 16px;
	color: var(--dxb-ink);
	font-weight: 600;
}

/* ---- Step rail ----------------------------------------------------------- */

.dxb-steps {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0 0 26px;
	gap: 6px;
}

.dxb-steps li {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--dxb-muted);
	position: relative;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--dxb-line);
	transition: color .2s ease, border-color .2s ease;
}

.dxb-steps li span {
	width: 26px;
	height: 26px;
	flex: none;
	border-radius: 50%;
	background: var(--dxb-surface);
	color: var(--dxb-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	transition: background .2s ease, color .2s ease;
}

.dxb-steps li em { font-style: normal; }

.dxb-steps li.is-active { color: var(--dxb-ink); border-bottom-color: var(--dxb-primary); }
.dxb-steps li.is-active span { background: var(--dxb-primary); color: #fff; }
.dxb-steps li.is-done { color: var(--dxb-ink); border-bottom-color: var(--dxb-dark); }
.dxb-steps li.is-done span { background: var(--dxb-dark); color: #fff; }

/* Labels crowd out at narrow container widths; keep the numbered pips. */
@container dxb (max-width: 380px) {
	.dxb-steps li em { display: none; }
	.dxb-steps li { justify-content: center; }
}

/* ---- Panels -------------------------------------------------------------- */

.dxb-panel[hidden] { display: none; }
.dxb-panel.is-active { animation: dxb-fade .22s ease both; }

@keyframes dxb-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.dxb-panel.is-active { animation: none; }
	.dxb * { transition: none !important; }
}

/* ---- Fields -------------------------------------------------------------- */

.dxb-field { margin: 0 0 18px; }

.dxb-field label,
.dxb-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--dxb-ink);
	margin-bottom: 7px;
	letter-spacing: .2px;
}

.dxb-field input[type="text"],
.dxb-field input[type="email"],
.dxb-field input[type="tel"],
.dxb-field input[type="date"],
.dxb-field input[type="number"],
.dxb-field select,
.dxb-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--dxb-line);
	border-radius: var(--dxb-radius-sm);
	font-size: 15px;
	font-family: var(--dxb-font-body);
	color: var(--dxb-ink);
	background: var(--dxb-white);
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.dxb-field textarea { resize: vertical; min-height: 84px; }

.dxb-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%238B8B8B' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 11px;
	padding-right: 38px;
}

.dxb-field input:focus,
.dxb-field select:focus,
.dxb-field textarea:focus {
	outline: none;
	border-color: var(--dxb-primary);
	box-shadow: 0 0 0 3px var(--dxb-primary-ring);
}

.dxb-field input::placeholder,
.dxb-field textarea::placeholder { color: #B4B4B4; }

.dxb-field.has-error input,
.dxb-field.has-error select,
.dxb-field.has-error textarea { border-color: #D14343; }

.dxb-hint { font-size: 12.5px; color: var(--dxb-muted); margin-top: 6px; }

.dxb-err {
	font-size: 13px;
	color: #D14343;
	margin-top: 6px;
	font-weight: 600;
	display: none;
}
.dxb-err.is-shown { display: block; }

.dxb-formerr {
	display: none;
	background: #FDECEC;
	border: 1px solid #F3C0C0;
	color: #A32C2C;
	border-radius: var(--dxb-radius-sm);
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 16px;
}
.dxb-formerr.is-shown { display: block; }

.dxb-grid2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }

@container dxb (min-width: 440px) {
	.dxb-grid2 { grid-template-columns: 1fr 1fr; }
}

/* Container queries are broadly supported; this keeps older engines usable. */
@supports not (container-type: inline-size) {
	@media (min-width: 700px) {
		.dxb-grid2 { grid-template-columns: 1fr 1fr; }
	}
}

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.dxb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---- Address autocomplete ------------------------------------------------ */

.dxb-ac { position: relative; }
.dxb-ac-wrap { position: relative; }

.dxb-ac-wrap input { padding-left: 38px; }

.dxb-ac-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 10px;
	color: var(--dxb-primary);
	pointer-events: none;
	line-height: 1;
}

.dxb-ac-busy {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 15px;
	border: 2px solid var(--dxb-line);
	border-top-color: var(--dxb-primary);
	border-radius: 50%;
	display: none;
}
.dxb-ac.is-busy .dxb-ac-busy { display: block; animation: dxb-spin .7s linear infinite; }

@keyframes dxb-spin { to { transform: translateY(-50%) rotate(360deg); } }

.dxb-ac-list {
	position: absolute;
	z-index: 40;
	left: 0;
	right: 0;
	top: calc(100% - 16px);
	background: var(--dxb-white);
	border: 1px solid var(--dxb-line);
	border-radius: var(--dxb-radius-sm);
	box-shadow: 0 12px 28px rgba(19, 30, 69, .14);
	list-style: none;
	margin: 4px 0 0;
	padding: 5px;
	max-height: 264px;
	overflow-y: auto;
}
.dxb-ac-list[hidden] { display: none; }

.dxb-ac-list li {
	padding: 10px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14.5px;
	color: var(--dxb-ink);
	line-height: 1.35;
}
.dxb-ac-list li small { display: block; color: var(--dxb-muted); font-size: 12.5px; margin-top: 1px; }
.dxb-ac-list li.is-active,
.dxb-ac-list li:hover { background: var(--dxb-primary-soft); }
.dxb-ac-list li.is-empty { color: var(--dxb-muted); cursor: default; font-size: 13.5px; }
.dxb-ac-list li.is-empty:hover { background: transparent; }

/* ---- Calendar ------------------------------------------------------------ */

.dxb-cal {
	border: 1px solid var(--dxb-line);
	border-radius: var(--dxb-radius);
	padding: 16px;
	background: var(--dxb-white);
	box-shadow: 0 1px 2px rgba(19, 30, 69, .03);
}

@container dxb (max-width: 360px) {
	.dxb-cal { padding: 12px 10px; }
}

.dxb-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 14px;
}

.dxb-cal-title {
	font-family: var(--dxb-font-head);
	font-weight: 500;
	font-size: 18px;
	color: var(--dxb-dark);
	/* Room to grow: swapping "May" for "September" shouldn't reflow the nav. */
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dxb-cal-nav-group {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: none;
}

/* The theme skins every <button>; neutralise it for the calendar controls. */
.dxb .dxb-cal-nav {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	width: 36px;
	height: 36px;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--dxb-dark) !important;
	transition: background .15s ease, color .15s ease, transform .1s ease;
}
.dxb .dxb-cal-nav:hover:not(:disabled) { background: var(--dxb-primary-soft) !important; color: var(--dxb-primary) !important; }
.dxb .dxb-cal-nav:active:not(:disabled) { transform: scale(.92); }
.dxb .dxb-cal-nav:disabled { opacity: .25; cursor: default; }

.dxb .dxb-cal-today {
	border: 1px solid var(--dxb-line) !important;
	background: var(--dxb-white) !important;
	box-shadow: none !important;
	min-width: 0 !important;
	height: 32px;
	padding: 0 12px !important;
	margin: 0 2px !important;
	border-radius: 999px !important;
	font-family: var(--dxb-font-body);
	font-size: 12.5px;
	font-weight: 700;
	color: var(--dxb-dark) !important;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.dxb .dxb-cal-today:hover:not(:disabled) { background: var(--dxb-primary) !important; border-color: var(--dxb-primary) !important; color: #fff !important; }
.dxb .dxb-cal-today:disabled { opacity: .4; cursor: default; }

.dxb-cal-dow {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 2px;
}

.dxb-dow {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--dxb-muted);
	padding: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: .6px;
}

.dxb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	transition: opacity .12s ease;
}
.dxb-cal-grid > * { min-width: 0; }
.dxb-cal-grid.is-turning { opacity: 0; }

@container dxb (max-width: 360px) {
	.dxb-cal-grid { gap: 2px; }
}

.dxb .dxb-day {
	position: relative;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	aspect-ratio: 1 / 1;
	height: auto;
	min-width: 0 !important;
	min-height: 38px;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 10px;
	cursor: pointer;
	font-family: var(--dxb-font-body);
	font-size: 14px;
	font-weight: 600;
	color: var(--dxb-ink) !important;
	transition: background .13s ease, color .13s ease, transform .1s ease;
}
.dxb .dxb-day:hover:not(:disabled) { background: var(--dxb-primary-soft) !important; }
.dxb .dxb-day:active:not(:disabled) { transform: scale(.93); }

.dxb .dxb-day:focus-visible {
	outline: 2px solid var(--dxb-dark);
	outline-offset: 2px;
}

/* Disabled = not bookable (already past, or beyond the lead-time cutoff).
   Faint and inert rather than hidden, so the grid keeps its shape. */
.dxb .dxb-day:disabled {
	color: #D6D6D6 !important;
	cursor: default;
	font-weight: 400;
}

/* Today gets a dot beneath the number — visible whether or not it's
   selectable, so "where am I" never depends on scrolling to a legend. */
.dxb .dxb-day.is-today::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 15%;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--dxb-accent);
	transform: translateX(-50%);
}
.dxb .dxb-day.is-today.is-selected::after { background: #fff; }
.dxb .dxb-day.is-today:disabled::after { background: #D6D6D6; }

.dxb .dxb-day.is-selected {
	background: var(--dxb-primary) !important;
	color: #fff !important;
	font-weight: 700;
	box-shadow: 0 3px 10px var(--dxb-primary-ring) !important;
}
.dxb .dxb-day.is-empty { pointer-events: none; }

/* ---- Checkboxes ---------------------------------------------------------- */

.dxb-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14.5px;
	color: var(--dxb-body);
	cursor: pointer;
	margin: 0 0 18px;
	line-height: 1.5;
}

.dxb-check input[type="checkbox"] {
	width: 19px;
	height: 19px;
	flex: none;
	margin: 1px 0 0;
	accent-color: var(--dxb-primary);
	cursor: pointer;
}

.dxb-check--terms {
	background: var(--dxb-surface);
	border-radius: var(--dxb-radius-sm);
	padding: 14px 16px;
	font-size: 13.5px;
	color: var(--dxb-body);
}

.dxb-return {
	background: var(--dxb-surface);
	border-radius: var(--dxb-radius-sm);
	padding: 16px 16px 0;
	margin: 0 0 18px;
}
.dxb-return[hidden] { display: none; }

/* ---- Stepper ------------------------------------------------------------- */

.dxb-stepper {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--dxb-line);
	border-radius: var(--dxb-radius-sm);
	overflow: hidden;
	background: var(--dxb-white);
}

.dxb-stepper:focus-within {
	border-color: var(--dxb-primary);
	box-shadow: 0 0 0 3px var(--dxb-primary-ring);
}

.dxb .dxb-step-btn {
	border: none !important;
	background: var(--dxb-surface) !important;
	box-shadow: none !important;
	width: 46px;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 0 !important;
	font-size: 19px;
	line-height: 1;
	color: var(--dxb-dark) !important;
	cursor: pointer;
	transition: background .13s ease, color .13s ease;
}
.dxb .dxb-step-btn:hover:not(:disabled) { background: var(--dxb-primary) !important; color: #fff !important; }
.dxb .dxb-step-btn:disabled { opacity: .35; cursor: default; }

.dxb-stepper input[type="number"] {
	border: none !important;
	border-radius: 0 !important;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	box-shadow: none !important;
	-moz-appearance: textfield;
}
.dxb-stepper input[type="number"]:focus { box-shadow: none !important; }
.dxb-stepper input[type="number"]::-webkit-outer-spin-button,
.dxb-stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Review summary ------------------------------------------------------ */

.dxb-summary {
	border: 1px solid var(--dxb-line);
	border-radius: var(--dxb-radius);
	overflow: hidden;
	margin-bottom: 18px;
}

.dxb-sum-row {
	display: flex;
	gap: 14px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--dxb-line);
	font-size: 14.5px;
}
.dxb-sum-row:last-child { border-bottom: none; }
.dxb-sum-row:nth-child(odd) { background: #FBFCFC; }

.dxb-sum-k {
	flex: 0 0 36%;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--dxb-muted);
	padding-top: 2px;
}
.dxb-sum-v { flex: 1; color: var(--dxb-ink); font-weight: 600; word-break: break-word; }

.dxb-nofare {
	background: var(--dxb-primary-soft);
	border-left: 3px solid var(--dxb-primary);
	border-radius: var(--dxb-radius-sm);
	padding: 13px 16px;
	font-size: 14px;
	color: var(--dxb-ink);
	margin-bottom: 18px;
}
.dxb-nofare strong { display: block; color: var(--dxb-dark); }

/* ---- Buttons ------------------------------------------------------------- */

.dxb-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 22px;
}
.dxb-actions [data-dxb-next-step],
.dxb-actions [data-dxb-submit] { margin-left: auto; }

.dxb .dxb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--dxb-font-body);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	padding: 14px 26px !important;
	border-radius: var(--dxb-radius-sm) !important;
	border: 1px solid transparent !important;
	cursor: pointer;
	text-decoration: none;
	min-width: 0 !important;
	box-shadow: none !important;
	transition: background .15s ease, color .15s ease, transform .12s ease, opacity .15s ease;
}

.dxb .dxb-btn--primary {
	background: var(--dxb-primary) !important;
	color: #fff !important;
}
.dxb .dxb-btn--primary:hover:not(:disabled) { background: var(--dxb-dark) !important; color: #fff !important; }

.dxb .dxb-btn--ghost {
	background: transparent !important;
	color: var(--dxb-dark) !important;
	border-color: var(--dxb-line) !important;
}
.dxb .dxb-btn--ghost:hover:not(:disabled) { background: var(--dxb-surface) !important; }

.dxb .dxb-btn--block { width: 100%; margin-top: 4px; }

.dxb .dxb-btn:active:not(:disabled) { transform: translateY(1px); }
.dxb .dxb-btn:disabled { opacity: .6; cursor: default; }

.dxb .dxb-btn:focus-visible {
	outline: 2px solid var(--dxb-dark);
	outline-offset: 2px;
}

.dxb-arrow { font-size: 16px; line-height: 1; }

.dxb-spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: dxb-spin2 .7s linear infinite;
}
@keyframes dxb-spin2 { to { transform: rotate(360deg); } }

.dxb .dxb-btn.is-loading .dxb-spinner { display: block; }

.dxb-fineprint {
	font-size: 12.5px;
	color: var(--dxb-muted);
	text-align: center;
	margin-top: 12px;
}

/* ---- Success ------------------------------------------------------------- */

.dxb-done { text-align: center; padding: 12px 0 4px; }
.dxb-done[hidden] { display: none; }

.dxb-done-mark { color: var(--dxb-primary); margin-bottom: 14px; }

.dxb-done-h {
	font-family: var(--dxb-font-head);
	font-weight: 500;
	font-size: 26px;
	color: var(--dxb-dark);
	margin: 0 0 14px;
	line-height: 1.25;
}

.dxb-done-ref {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	background: var(--dxb-surface);
	border-radius: var(--dxb-radius-sm);
	padding: 12px 26px;
	margin: 0 0 18px;
}
.dxb-done-ref span {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .8px;
	color: var(--dxb-muted);
}
.dxb-done-ref strong {
	font-size: 22px;
	letter-spacing: 1.5px;
	color: var(--dxb-dark);
}

.dxb-done-note {
	font-size: 14.5px;
	color: var(--dxb-body);
	max-width: 420px;
	margin: 0 auto 20px;
}
