/* Order window: native <dialog>, card in the language of the order widget. Open state = [open] + .is-open (animation). */
.order-modal {
	box-sizing: border-box;
	width: 100%;
	max-width: 752px;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: #000;
	overflow: visible;
}

/* Figma "lightbox": rgba(60, 60, 67, 0.6), no blur */
.order-modal::backdrop {
	background: rgba(60, 60, 67, 0.6);
	opacity: 0;
}

.order-modal.is-open::backdrop {
	opacity: 1;
}

.order-modal__card {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	border: 1px solid rgba(0, 106, 200, 0.14);
	border-radius: 50px;
	background: var(--color-white);
	box-shadow: 0 16px 48px rgba(0, 106, 200, 0.22), 0 2px 8px rgba(0, 106, 200, 0.1);
	opacity: 0;
	transform: translateY(16px) scale(0.98);
}

.order-modal.is-open .order-modal__card {
	opacity: 1;
	transform: none;
}

/* Animation only when the user allows motion */
@media (prefers-reduced-motion: no-preference) {
	.order-modal::backdrop {
		transition: opacity 0.22s ease;
	}

	.order-modal__card {
		transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.order-modal__card {
		transform: none;
	}
}

html.order-modal-open {
	overflow: hidden;
}

.order-modal__close {
	position: absolute;
	z-index: 3;
	top: 36px;
	right: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #999;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.order-modal__close:focus-visible {
	outline: 3px solid rgba(0, 106, 200, 0.35);
	outline-offset: 1px;
}

@media (hover: hover) {
	.order-modal__close:hover {
		background: var(--color-soft-blue);
		color: var(--color-blue);
	}
}

/* Phones: full-screen sheet */
@media (max-width: 767px) {
	.order-modal {
		width: 100%;
		max-width: none;
		height: 100dvh;
		max-height: none;
		margin: 0;
	}

	.order-modal__card {
		height: 100%;
		max-height: none;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		transform: translateY(24px);
	}

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