body.quote-modal-open {
	position: fixed;
	left: 0;
	width: 100%;
	overflow: hidden;
}

.quote-modal[hidden] {
	display: none;
}

.quote-modal {
	position: fixed;
	z-index: 10000;
	inset: 0;
	display: grid;
	place-items: center;
	padding: var(--space-4);
	opacity: 0;
	transition: opacity 180ms ease;
}

.quote-modal.is-open {
	opacity: 1;
}

.quote-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 32, 28, 0.82);
	backdrop-filter: blur(3px);
}

.quote-modal__panel {
	position: relative;
	z-index: 1;
	display: grid;
	width: min(1040px, 100%);
	max-height: 90dvh;
	grid-template-rows: auto minmax(0, 1fr);
	background: var(--white);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
	overflow: hidden;
	transform: translateY(14px) scale(0.99);
	transition: transform 180ms ease;
}

.quote-modal.is-open .quote-modal__panel {
	transform: translateY(0) scale(1);
}

.quote-modal__panel:focus {
	outline: 0;
}

.quote-modal__header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--space-4);
	align-items: start;
	padding: var(--space-4) var(--space-5);
	background: var(--forest-dark);
	color: var(--white);
}

.quote-modal__eyebrow {
	margin-bottom: var(--space-1);
	color: var(--orange);
	font-size: var(--font-size-label);
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: var(--line-height-ui);
	text-transform: uppercase;
}

.quote-modal__header h2 {
	margin-bottom: var(--space-1);
	font-size: clamp(28px, 3vw, 36px);
	color: var(--white);
}

.quote-modal__header p:last-child {
	max-width: 680px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
	line-height: var(--line-height-ui);
}

.quote-modal__close {
	display: inline-grid;
	width: var(--control-height);
	height: var(--control-height);
	place-items: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.6);
	background: transparent;
	color: var(--white);
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.quote-modal__close:hover {
	border-color: var(--orange);
	background: var(--orange);
	color: var(--forest-dark);
}

.quote-modal__close:focus-visible {
	border-color: var(--orange);
	box-shadow: 0 0 0 3px rgba(240, 122, 36, 0.34);
	outline: 0;
}

.quote-modal__close .icon {
	width: var(--icon-3);
	height: var(--icon-3);
}

.quote-form--modal {
	display: grid;
	min-height: 0;
	grid-template-rows: minmax(0, 1fr) auto;
	overflow: hidden;
}

.quote-form--modal[hidden] {
	display: none;
}

.quote-form--modal .quote-form__scroll {
	padding: var(--space-4) var(--space-5);
	background: var(--cream);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: rgba(22, 61, 55, 0.45) transparent;
	scrollbar-width: thin;
}

.quote-form--modal .quote-form__technical {
	grid-template-columns: 1.45fr repeat(4, minmax(118px, 1fr));
	gap: var(--space-2);
}

.quote-form--modal .quote-form__secondary {
	grid-template-columns: 1.15fr 1fr;
	gap: var(--space-3);
	align-items: start;
	justify-items: start;
	margin-top: var(--space-3);
}

.quote-form--modal .quote-form__secondary > .field {
	width: 100%;
	align-self: start;
	justify-self: start;
}

.quote-form--modal .quote-form__contacts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3);
	align-items: start;
	margin-top: var(--space-3);
}

.quote-form--modal .field label {
	margin-bottom: 6px;
	color: var(--forest-dark);
	font-size: var(--font-size-label);
	line-height: var(--line-height-ui);
}

.quote-form--modal .field input:not([type="checkbox"], [type="file"]),
.quote-form--modal .field textarea,
.quote-form--modal .field select,
.quote-form--modal .file-control,
.quote-form--modal .custom-select__trigger {
	min-height: var(--control-height);
	border-color: #aebbb6;
	background: var(--white);
	color: var(--graphite);
	font-size: var(--font-size-body);
}

.quote-form--modal .field input:not([type="checkbox"], [type="file"]):focus,
.quote-form--modal .field textarea:focus,
.quote-form--modal .file-control:focus-within,
.quote-form--modal .custom-select__trigger:focus,
.quote-form--modal .custom-select__trigger:focus-visible,
.quote-form--modal .custom-select.is-open .custom-select__trigger {
	border-color: var(--forest);
	box-shadow: 0 0 0 3px rgba(240, 122, 36, 0.24);
	outline: 0;
}

.quote-form--modal .field small,
.quote-form--modal .field__error {
	font-size: var(--font-size-label);
	line-height: var(--line-height-ui);
}

.quote-form--modal .file-control {
	padding: 8px var(--space-2);
	background: var(--white);
}

.quote-form--modal .file-control input {
	font-size: var(--font-size-label);
}

.quote-form--modal .file-control input::file-selector-button {
	min-height: 32px;
	margin-right: var(--space-2);
	padding: 5px var(--space-2);
	border: 1px solid var(--forest);
	background: var(--white);
	color: var(--forest);
	font-weight: 750;
	cursor: pointer;
}

.quote-form--modal .field--consent {
	margin-top: var(--space-3);
}

.quote-form--modal .field--consent label {
	min-height: var(--control-height-compact);
	color: var(--graphite);
	font-size: var(--font-size-ui);
	text-transform: none;
}

.quote-form--modal .field--consent input {
	width: var(--icon-3);
	height: var(--icon-3);
	flex: 0 0 var(--icon-3);
}

.quote-form--modal .form-status {
	margin-top: var(--space-2);
	font-size: var(--font-size-ui);
}

.quote-modal__actions {
	display: flex;
	justify-content: flex-end;
	padding: var(--space-3) var(--space-5);
	border-top: 1px solid var(--line);
	background: var(--white);
	box-shadow: 0 -10px 24px rgba(12, 49, 44, 0.07);
}

.quote-modal__actions .quote-form__submit {
	min-width: 300px;
	min-height: 52px;
	margin: 0;
	font-size: var(--font-size-ui);
}

.quote-modal__success {
	display: grid;
	min-height: 390px;
	place-items: center;
	align-content: center;
	gap: var(--space-3);
	padding: var(--space-6);
	background: var(--cream);
	text-align: center;
}

.quote-modal__success[hidden] {
	display: none;
}

.quote-modal__success:focus {
	outline: 0;
}

.quote-modal__success > .icon {
	width: 64px;
	height: 64px;
	color: var(--forest);
}

.quote-modal__success h2 {
	margin: 0;
	color: var(--forest-dark);
}

.quote-modal__success p {
	max-width: 580px;
	margin: 0;
	font-size: var(--font-size-body);
}

.quote-modal__success .button {
	margin-top: var(--space-2);
}

.quote-modal__portal {
	position: fixed;
	z-index: 2;
	inset: 0;
	pointer-events: none;
}

.quote-modal__portal .custom-select__menu {
	pointer-events: auto;
}

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

	.quote-form--modal .quote-form__technical .field--cargo {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.quote-modal {
		place-items: stretch;
		padding: 0;
	}

	.quote-modal__panel {
		width: 100vw;
		height: 100dvh;
		max-height: none;
		grid-template-rows: auto minmax(0, 1fr);
		transform: translateY(12px);
	}

	.quote-modal__header {
		gap: var(--space-3);
		padding: max(var(--space-3), env(safe-area-inset-top)) var(--space-3) var(--space-3);
	}

	.quote-modal__eyebrow {
		margin-bottom: 4px;
		font-size: var(--font-size-legal);
	}

	.quote-modal__header h2 {
		margin-bottom: 0;
		font-size: 26px;
	}

	.quote-modal__header p:last-child {
		display: none;
	}

	.quote-modal__close {
		width: var(--control-height);
		height: var(--control-height);
	}

	.quote-form--modal .quote-form__scroll {
		padding: var(--space-3);
	}

	.quote-form--modal .quote-form__technical,
	.quote-form--modal .quote-form__secondary,
	.quote-form--modal .quote-form__contacts {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-3);
	}

	.quote-form--modal .quote-form__technical .field--cargo {
		grid-column: auto;
	}

	.quote-form--modal .quote-form__secondary,
	.quote-form--modal .quote-form__contacts,
	.quote-form--modal .field--consent {
		margin-top: var(--space-4);
	}

	.quote-modal__actions {
		padding: var(--space-2) var(--space-3) max(var(--space-2), env(safe-area-inset-bottom));
	}

	.quote-modal__actions .quote-form__submit {
		width: 100%;
		min-width: 0;
		min-height: 52px;
		font-size: var(--font-size-ui);
	}

	.quote-modal__success {
		min-height: 0;
		padding: var(--space-4);
	}
}

@media (max-width: 360px) {
	.quote-modal__header h2 {
		font-size: 23px;
	}

	.quote-modal__header {
		padding-inline: var(--space-2);
	}

	.quote-form--modal .quote-form__scroll,
	.quote-modal__actions {
		padding-inline: var(--space-2);
	}
}
