.mgh-cf {
	--mgh-accent: var(--ast-global-color-0, #b3953f);
	--mgh-ink: #1f2329;
	--mgh-muted: #6b7280;
	--mgh-line: #e7e4dd;
	--mgh-field: #bababa;
	--mgh-soft: #f7f5f0;
	--mgh-error: #c0392b;
	color: var(--mgh-ink);
}

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

.mgh-cf [hidden] {
	display: none !important;
}

.mgh-cf__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Journey type */

.mgh-cf__tabs {
	display: inline-flex;
	gap: 4px;
	margin-bottom: 24px;
	padding: 4px;
	border: 1px solid var(--mgh-line);
	border-radius: 999px;
	background: #fff;
}

.mgh-cf__tab {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.mgh-cf__tab input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mgh-cf__tab span {
	display: block;
	padding: 9px 20px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	color: var(--mgh-muted);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mgh-cf__tab.is-active span,
.mgh-cf__tab input:checked + span {
	background: var(--mgh-ink);
	color: #fff;
}

.mgh-cf__tab input:focus-visible + span {
	outline: 2px solid var(--mgh-accent);
	outline-offset: 2px;
}

/* Sections and fields */

.mgh-cf__section {
	margin: 0 0 30px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.mgh-cf__section legend,
.mgh-cf__title {
	width: 100%;
	margin: 0 0 20px;
	padding: 0 0 12px;
	border-bottom: 1px solid var(--mgh-line);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--mgh-ink);
}

.mgh-cf__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.mgh-cf__grid--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mgh-cf__grid--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mgh-cf__field {
	min-width: 0;
}

.mgh-cf__field--wide,
.mgh-cf__field--full {
	grid-column: 1 / -1;
}

.mgh-cf label {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mgh-ink);
}

.mgh-cf label small {
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--mgh-muted);
}

.mgh-cf label span[aria-hidden] {
	color: var(--mgh-error);
}

body .mgh-cf input[type="text"],
body .mgh-cf input[type="email"],
body .mgh-cf input[type="tel"],
body .mgh-cf input[type="number"],
body .mgh-cf input[type="date"],
body .mgh-cf input[type="time"],
body .mgh-cf select,
body .mgh-cf textarea {
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--mgh-field);
	border-radius: 10px;
	background-color: #fff;
	font: inherit;
	font-size: 16px;
	color: var(--mgh-ink);
	box-shadow: none;
}

body .mgh-cf textarea {
	height: auto;
	min-height: 84px;
	padding: 12px 14px;
	resize: vertical;
}

body .mgh-cf select {
	padding-right: 36px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 16px;
}

body .mgh-cf input:focus,
body .mgh-cf select:focus,
body .mgh-cf textarea:focus {
	outline: none;
	border-style: solid;
	border-width: 1px;
	border-color: var(--mgh-accent);
	box-shadow: none;
}

body .mgh-cf .has-error input,
body .mgh-cf .has-error select,
body .mgh-cf .has-error textarea {
	border-color: var(--mgh-error);
}

.mgh-cf__error {
	margin: 6px 0 0;
	font-size: 0.85rem;
	color: var(--mgh-error);
}

.mgh-cf__hint {
	margin: 14px 0 0;
	font-size: 0.875rem;
	color: var(--mgh-muted);
}

/* Searchable dropdowns */

.mgh-cf__combo {
	position: relative;
}

.mgh-cf__combo > svg {
	position: absolute;
	left: 14px;
	top: 50%;
	width: 18px;
	height: 18px;
	transform: translateY(-50%);
	fill: var(--mgh-accent);
	pointer-events: none;
}

body .mgh-cf .mgh-cf__combo .mgh-cf__combo-input {
	padding-left: 42px;
	text-overflow: ellipsis;
}

.mgh-cf__list {
	position: absolute;
	z-index: 60;
	top: calc(100% + 6px);
	left: 0;
	width: 100%;
	min-width: 300px;
	max-height: 340px;
	overflow-y: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--mgh-line);
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(31, 35, 41, 0.14);
	text-align: left;
}

.mgh-cf__option {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
	line-height: 1.35;
}

.mgh-cf__option.is-active {
	background: color-mix(in srgb, var(--mgh-accent) 14%, #fff);
}

.mgh-cf__option b {
	font-weight: 700;
}

.mgh-cf__option > span:not(.mgh-flag):not(.mgh-cf__code) {
	color: var(--mgh-muted);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.mgh-cf__code {
	margin-left: auto;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--mgh-muted);
}

.mgh-cf__none,
.mgh-cf__powered {
	margin: 0;
	padding: 10px;
	color: var(--mgh-muted);
}

.mgh-cf__powered {
	padding: 6px 10px 2px;
	font-size: 11px;
	text-align: right;
}

.mgh-cf__phone {
	display: flex;
	gap: 8px;
}

.mgh-cf__combo--dial {
	flex: 0 0 116px;
}

.mgh-cf__flag {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

body .mgh-cf .mgh-cf__combo--dial .mgh-cf__combo-input {
	padding-left: 42px;
	padding-right: 8px;
}

.mgh-cf__phone > input {
	flex: 1;
	min-width: 0;
}

/* Status and journey summary */

.mgh-cf__status {
	margin: -10px 0 24px;
	padding: 12px 16px;
	border-radius: 10px;
	background: var(--mgh-soft);
	color: var(--mgh-ink);
}

.mgh-cf__status.is-error {
	border: 1px solid #f1c4bd;
	background: #fdf0ee;
	color: #9b2c1f;
}

.mgh-cf__status a,
.mgh-cf__alert a,
.mgh-cf__group a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
}

.mgh-cf__summary {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 30px;
	padding: 20px 26px;
	border: 1px solid var(--mgh-ink);
	border-radius: 14px;
	background: #fff;
}

.mgh-cf__summary span {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #4b5563;
}

.mgh-cf__summary strong {
	display: block;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--mgh-ink);
}

.mgh-cf__summary-place {
	min-width: 0;
}

.mgh-cf__summary-place[data-summary-to-wrap] {
	flex: 1;
}

.mgh-cf__summary-arrow {
	flex: none;
	width: 40px;
	height: 40px;
	display: grid !important;
	place-items: center;
	margin: 0 !important;
	border-radius: 50%;
	background: #f3f4f6;
}

.mgh-cf__summary-arrow[hidden] {
	display: none !important;
}

.mgh-cf__summary-arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--mgh-ink);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mgh-cf__summary-distance {
	flex: none;
	margin-left: auto;
	text-align: right;
}

body .mgh-cf .mgh-cf__summary-distance strong {
	color: var(--mgh-accent);
}

/* Vehicles */

.mgh-cf__placeholder {
	margin: 0;
	padding: 28px;
	border: 1px dashed var(--mgh-field);
	border-radius: 14px;
	text-align: center;
	color: var(--mgh-muted);
}

.mgh-cf__fleet {
	overflow: hidden;
	border: 1px solid var(--mgh-ink);
	border-radius: 14px;
	background: #f6f7fb;
}

.mgh-cf__vehicles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
	padding: 22px;
}

.mgh-cf__card {
	display: flex;
	flex-direction: column;
	padding: 22px 18px 20px;
	border: 1px solid #e3e5ec;
	border-radius: 12px;
	background: #fff;
	text-align: center;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mgh-cf__card.is-selected {
	border-color: var(--mgh-ink);
	box-shadow: 0 0 0 1px var(--mgh-ink);
}

.mgh-cf__card.is-disabled .mgh-cf__media,
.mgh-cf__card.is-disabled .mgh-cf__price {
	opacity: 0.45;
}

.mgh-cf__media {
	height: 110px;
	display: grid;
	place-items: center;
	margin-bottom: 18px;
}

.mgh-cf__media img {
	max-width: 100%;
	max-height: 110px;
	object-fit: contain;
}

.mgh-cf__car {
	width: 84px;
	height: 84px;
	fill: #c9c6bf;
}

body .mgh-cf .mgh-cf__name {
	margin: 0 0 8px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--mgh-ink);
}

body .mgh-cf .mgh-cf__model {
	margin: 0 0 16px;
	font-size: 16px;
	color: var(--mgh-muted);
}

body .mgh-cf .mgh-cf__card > *:last-child,
body .mgh-cf .mgh-cf__card-foot > *:last-child {
	margin-bottom: 0;
}

.mgh-cf__specs {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-bottom: 18px;
	font-size: 17px;
	color: var(--mgh-ink);
}

.mgh-cf__spec {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mgh-cf__spec svg {
	width: 20px;
	height: 20px;
	fill: #6b6f76;
}

.mgh-cf__card-foot {
	margin-top: auto;
	padding-top: 18px;
	border-top: 1px solid #e3e5ec;
}

body .mgh-cf .mgh-cf__price {
	margin: 0 0 16px;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--mgh-ink);
}

body .mgh-cf .mgh-cf__card-note {
	margin: 0 0 16px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	text-align: left;
	background: #f3f4f6;
	color: var(--mgh-muted);
}

body .mgh-cf .mgh-cf__card-note.is-warning {
	background: #fdf3e3;
	color: #8a520f;
}

body .mgh-cf .mgh-cf__card-note.is-info {
	background: #eef3fb;
	color: #2d4a73;
}

body .mgh-cf .mgh-cf__select {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #d5d8e0;
	border-radius: 8px;
	background: #fff;
	color: var(--mgh-ink);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(31, 35, 41, 0.06);
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body .mgh-cf .mgh-cf__select:hover:not(:disabled),
body .mgh-cf .mgh-cf__select:focus-visible {
	border-color: var(--mgh-ink);
	background: #fff;
	color: var(--mgh-ink);
	outline: none;
}

body .mgh-cf .mgh-cf__card.is-selected .mgh-cf__select {
	border-color: var(--mgh-ink);
	background: var(--mgh-ink);
	color: #fff;
}

body .mgh-cf .mgh-cf__select:disabled {
	cursor: not-allowed;
	background: #f3f4f6;
	color: #8a8f98;
	box-shadow: none;
}

.mgh-cf__subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 26px;
	border-top: 1px solid #e3e5ec;
	background: #f9fafc;
}

.mgh-cf__subtotal span {
	font-size: 16px;
	font-weight: 600;
	color: var(--mgh-ink);
}

.mgh-cf__subtotal strong {
	font-size: 17px;
	font-weight: 700;
	color: var(--mgh-ink);
}

.mgh-cf__group {
	margin: 16px 0 0;
	padding: 12px 16px;
	border: 1px solid #f1c4bd;
	border-radius: 10px;
	background: #fdf0ee;
	color: #9b2c1f;
}

/* Footer */

.mgh-cf__footer {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--mgh-line);
}

.mgh-cf__total span {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mgh-muted);
}

.mgh-cf__total strong {
	display: block;
	margin-top: 4px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--mgh-ink);
}

.mgh-cf__submit {
	max-width: 380px;
	text-align: right;
}

body .mgh-cf .mgh-cf__btn {
	height: 52px;
	margin: 0;
	padding: 0 30px;
	border: 0;
	border-radius: 10px;
	background: var(--mgh-ink);
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: 16px;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

body .mgh-cf .mgh-cf__btn:hover,
body .mgh-cf .mgh-cf__btn:focus-visible {
	background: var(--mgh-accent);
	color: #fff;
	outline: none;
}

body .mgh-cf .mgh-cf__btn:disabled {
	opacity: 0.7;
	cursor: wait;
}

.mgh-cf__note {
	margin: 10px 0 0;
	font-size: 0.85rem;
	color: var(--mgh-muted);
}

.mgh-cf__alert {
	margin: 0 0 12px;
	padding: 10px 14px;
	border: 1px solid #f1c4bd;
	border-radius: 10px;
	background: #fdf0ee;
	color: #9b2c1f;
	text-align: left;
}

.mgh-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Success */

.mgh-cf__success {
	padding: 48px 24px;
	text-align: center;
	outline: none;
}

.mgh-cf__tick {
	width: 64px;
	height: 64px;
	margin: 0 auto 18px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: color-mix(in srgb, var(--mgh-accent) 14%, #fff);
}

.mgh-cf__tick svg {
	width: 30px;
	height: 30px;
	fill: none;
	stroke: var(--mgh-accent);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mgh-cf__success h2 {
	margin: 0 0 8px;
	font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.mgh-cf__success p {
	max-width: 52ch;
	margin: 0 auto;
	color: var(--mgh-muted);
}

@media (max-width: 900px) {
	.mgh-cf__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mgh-cf__grid--three [data-field="email"] {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.mgh-cf label {
		font-size: 11px;
	}

	.mgh-cf__tabs {
		display: flex;
	}

	.mgh-cf__tab {
		flex: 1;
		text-align: center;
	}

	.mgh-cf__tab span {
		padding: 9px 8px;
	}

	.mgh-cf__grid {
		gap: 16px 12px;
	}

	.mgh-cf__grid--two,
	.mgh-cf__grid--three {
		grid-template-columns: 1fr;
	}

	.mgh-cf__summary {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 18px;
	}

	.mgh-cf__summary-arrow {
		width: 32px;
		height: 32px;
		transform: rotate(90deg);
	}

	.mgh-cf__summary-place,
	.mgh-cf__summary-place[data-summary-to-wrap] {
		flex: none;
	}

	.mgh-cf__summary strong {
		font-size: 16px;
	}

	.mgh-cf__summary-distance {
		margin-left: 0;
		padding-top: 12px;
		border-top: 1px solid var(--mgh-line);
		text-align: left;
	}

	.mgh-cf__vehicles {
		padding: 14px;
		gap: 14px;
	}

	.mgh-cf__subtotal {
		padding: 16px 18px;
	}

	.mgh-cf__footer {
		flex-direction: column;
		align-items: stretch;
	}

	.mgh-cf__submit {
		max-width: none;
		text-align: left;
	}

	body .mgh-cf .mgh-cf__btn {
		width: 100%;
	}

	.mgh-cf__list {
		min-width: 0;
	}

	.mgh-cf__combo--dial .mgh-cf__list {
		min-width: calc(100vw - 48px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mgh-cf * {
		transition: none !important;
	}
}
