/* Order popup — Figma 125:2509 (desktop) / 125:2580 (mobile). Sized to content, no scrollbars. */

.order-modal {
	position: fixed;
	inset: 0;
	z-index: 400;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	overflow: hidden;
	box-sizing: border-box;
}

.order-modal[hidden] {
	display: none !important;
}

.order-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(3, 21, 55, 0.45);
	cursor: pointer;
}

.order-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(678px, 100%);
	max-width: 678px;
	height: auto;
	max-height: none;
	overflow: hidden; /* clip stroke; size to content — no scrollbars */
	background: #f1f4f6;
	box-shadow: 0 16px 48px rgba(3, 21, 55, 0.18);
	box-sizing: border-box;
}

.order-modal__close {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.order-modal__close img {
	width: 17px;
	height: 17px;
	display: block;
}

.order-modal__stroke {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden; /* keep decoration inside dialog bounds */
}

.order-modal__stroke img {
	position: absolute;
	right: -40px;
	top: 80px;
	width: 599px;
	height: 585px;
	max-width: none;
	object-fit: contain;
	opacity: 0.9;
}

.order-modal__body {
	position: relative;
	z-index: 1;
	padding: 40px;
}

.order-modal__view[hidden] {
	display: none !important;
}

.order-modal__intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 0;
}

.order-modal__title {
	margin: 0;
	font-family: var(--font-main);
	font-weight: 600;
	font-size: 32px;
	line-height: 42px;
	color: #031537;
	max-width: 598px;
	padding-right: 28px;
}

.order-modal__desc {
	margin: 0;
	font-family: var(--font-main);
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #1d1d1d;
	max-width: 598px;
}

.order-modal__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 16px;
	max-width: 598px;
}

.order-modal__input {
	width: 100%;
	height: 54px;
	padding: 16px;
	border: 0;
	background: #fff;
	font-family: var(--font-main);
	font-size: 16px;
	line-height: 24px;
	color: #031537;
	border-radius: 0;
	outline: none;
}

.order-modal__input::placeholder {
	color: #031537;
	opacity: 0.6;
}

.order-modal__input:focus {
	box-shadow: inset 0 0 0 2px rgba(27, 178, 230, 0.45);
}

.order-modal__submit {
	width: 100%;
	min-width: 0;
	height: 54px;
	padding: 18px 70px;
}

.order-modal__privacy {
	margin: 0;
	font-size: 13px;
	line-height: 18px;
	color: rgba(3, 21, 55, 0.65);
}

.order-modal__privacy a {
	color: var(--primary);
	text-decoration: underline;
}

.order-modal__error {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	color: #c0392b;
}

.order-modal__error[hidden] {
	display: none !important;
}

.order-modal__messengers {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: 28px;
	max-width: 598px;
}

.order-modal__messengers-label {
	margin: 0;
	font-family: var(--font-main);
	font-size: 16px;
	line-height: 24px;
	color: #031537;
	text-align: center;
	white-space: nowrap;
}

.order-modal__messenger-btns {
	display: flex;
	gap: 14px;
	width: 100%;
}

.order-modal__msg-btn {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	height: 54px;
	padding: 18px 20px;
	font-size: 16px;
}

.order-modal__msg-btn--tg {
	background: #49a2f5;
}

.order-modal__msg-btn--tg:hover:not(:disabled):not(.btn--disabled) {
	background: #348fe6;
}

.order-modal__msg-btn--max {
	background: #0f0f0f;
}

.order-modal__msg-btn--max:hover:not(:disabled):not(.btn--disabled) {
	background: #2a2a2a;
}

.order-modal__messenger-btns--with-max {
	flex-wrap: wrap;
}

.order-modal__messenger-btns--with-max .order-modal__msg-btn {
	flex: 1 1 calc(50% - 7px);
}

.order-modal__messenger-btns--with-max .order-modal__msg-btn--max {
	flex: 1 1 100%;
}

.order-modal__success {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 24px 0 8px;
	min-height: 220px;
	justify-content: center;
}

.order-modal__success-title {
	margin: 0;
	font-family: var(--font-main);
	font-weight: 600;
	font-size: 32px;
	line-height: 42px;
	color: #031537;
}

.order-modal__success-text {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	color: #1d1d1d;
}

.order-modal__success-close {
	margin-top: 8px;
	min-width: 200px;
}

body.order-modal-open {
	overflow: hidden;
	touch-action: none;
}

body.order-modal-open.menu-open {
	/* modal sits above mobile menu */
}

.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Short viewports: tighten spacing instead of scrolling the dialog */
@media (max-height: 780px) {
	.order-modal {
		padding: 16px;
	}

	.order-modal__body {
		padding: 28px 32px;
	}

	.order-modal__title {
		font-size: 28px;
		line-height: 36px;
	}

	.order-modal__messengers {
		margin-top: 20px;
		gap: 10px;
	}
}

@media (max-height: 640px) {
	.order-modal__body {
		padding: 20px 24px;
	}

	.order-modal__title {
		font-size: 24px;
		line-height: 32px;
	}

	.order-modal__intro {
		gap: 10px;
	}

	.order-modal__form {
		gap: 10px;
		margin-top: 12px;
	}

	.order-modal__input,
	.order-modal__submit,
	.order-modal__msg-btn {
		height: 48px;
	}

	.order-modal__messengers {
		margin-top: 14px;
		gap: 8px;
	}
}

@media (max-width: 900px) {
	.order-modal {
		padding: 16px;
		align-items: flex-end;
	}

	.order-modal__dialog {
		max-width: 330px;
		width: 100%;
		max-height: none;
		overflow: hidden;
	}

	.order-modal__close {
		top: 16px;
		right: 16px;
	}

	.order-modal__stroke img {
		right: -120px;
		top: 40px;
		width: 480px;
		height: 470px;
		transform: rotate(12deg);
	}

	.order-modal__body {
		padding: 20px;
	}

	.order-modal__title {
		font-size: 24px;
		line-height: 34px;
		padding-right: 24px;
	}

	.order-modal__desc {
		font-size: 14px;
		line-height: 22px;
	}

	.order-modal__intro {
		gap: 14px;
	}

	.order-modal__form {
		gap: 10px;
		margin-top: 14px;
	}

	.order-modal__input {
		height: 46px;
		padding: 14px;
		font-size: 14px;
		line-height: 22px;
	}

	.order-modal__submit {
		height: 46px;
		padding: 16px 50px;
		font-size: 14px;
	}

	.order-modal__privacy {
		font-size: 12px;
		line-height: 16px;
	}

	.order-modal__messengers {
		gap: 12px;
		margin-top: 20px;
	}

	.order-modal__messengers-label {
		font-size: 16px;
		white-space: normal;
		text-align: center;
	}

	.order-modal__messenger-btns,
	.order-modal__messenger-btns--with-max {
		flex-direction: column;
		gap: 10px;
	}

	.order-modal__msg-btn,
	.order-modal__messenger-btns--with-max .order-modal__msg-btn,
	.order-modal__messenger-btns--with-max .order-modal__msg-btn--max {
		flex: none;
		width: 100%;
		height: 46px;
		padding: 16px 20px;
		font-size: 14px;
	}

	.order-modal__msg-btn .btn__icon {
		width: 20px;
		height: 20px;
		flex: 0 0 20px;
	}

	.order-modal__success-title {
		font-size: 24px;
		line-height: 34px;
	}

	.order-modal__success-text {
		font-size: 14px;
		line-height: 22px;
	}

	.order-modal__success-close {
		width: 100%;
		min-width: 0;
		height: 46px;
		font-size: 14px;
	}
}
