/*
 * Order popup (Figma: "LP BF v3 / Order popup", 4257:9971 — desktop 560 /
 * mobile 351). Values scale linearly between the two frames (375 → 1440),
 * like the LP sections in the theme (group--lp-bf.css).
 */
.wlc-lp-order {
	box-sizing: border-box;
	width: min(35rem, 100% - 1.5rem); /* 560; mobile 351 = 375 - 2 × 12 */
	max-width: none;
	max-height: calc(100% - 1.5rem);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 1.75rem; /* radius/modal 28 */
	background: #fff; /* the scrollbar sits inside the white rounded card */
	box-shadow: 0 4px 6px rgb(0 0 0 / 0.05), 0 10px 15px -3px rgb(0 0 0 / 0.05); /* shadow-lg */
	color: #020202;
	font-family: var(--wp--preset--font-family--body, Poppins, sans-serif);
	overflow: auto;
	overscroll-behavior: contain;
}

/* Scrollbar (popup taller than the window): thin, no arrow buttons, the
   track ends before the 28px rounded corners. It takes 6px from the card
   width (the right padding looks 6px narrower while scrolling). Chromium/Safari use the
   ::-webkit-scrollbar rules (they would ignore them if scrollbar-color were
   set), Firefox the standard properties. */
.wlc-lp-order::-webkit-scrollbar {
	width: 0.375rem;
}

.wlc-lp-order::-webkit-scrollbar-button {
	display: none;
}

.wlc-lp-order::-webkit-scrollbar-track {
	margin-block: 1.75rem;
	background: transparent;
}

.wlc-lp-order::-webkit-scrollbar-thumb {
	border-radius: 9999px;
	background: rgb(2 2 2 / 0.25);
}

.wlc-lp-order::-webkit-scrollbar-thumb:hover {
	background: rgb(2 2 2 / 0.4);
}

@supports not selector(::-webkit-scrollbar) {
	.wlc-lp-order {
		scrollbar-width: thin;
		scrollbar-color: rgb(2 2 2 / 0.25) transparent;
	}
}

/* surface/overlay */
.wlc-lp-order::backdrop {
	background: rgb(0 0 0 / 0.5);
}

/* The page under the open popup does not scroll. */
html:has(.wlc-lp-order[open]) {
	overflow: hidden;
}

.wlc-lp-order *,
.wlc-lp-order *::before,
.wlc-lp-order *::after {
	box-sizing: border-box;
}

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

.wlc-lp-order__card {
	display: flex;
	flex-direction: column;
	gap: 1.5rem; /* stack-lg */
	padding: clamp(1.5rem, 0.6197rem + 3.7559vw, 4rem); /* modal-padding 24 → 64 */
}

.wlc-lp-order__card p {
	margin: 0;
}

.wlc-lp-order__header {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

/* heading/h3 20 → 32 */
.wlc-lp-order .wlc-lp-order__title {
	flex: 1;
	min-width: 0;
	margin: 0;
	color: #020202;
	font-family: inherit;
	font-size: clamp(1.25rem, 0.9859rem + 1.1268vw, 2rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}

/* Close: ghost icon button 44 × 44, two 24px bars; hover surface/subtle */
.wlc-lp-order__close {
	position: relative;
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0.25rem;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s;
}

.wlc-lp-order__close::before,
.wlc-lp-order__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.5rem;
	height: 2px;
	background: #020202;
	transform: translate(-50%, -50%) rotate(45deg);
}

.wlc-lp-order__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.wlc-lp-order__close:hover {
	background: #f3f4f6;
}

/* Focus ring 2px border/focus (close, checkbox row, submit) */
.wlc-lp-order__close:focus-visible,
.wlc-lp-order__btn:focus-visible,
.wlc-lp-order__check:has(:focus-visible) {
	outline: 2px solid #000;
	outline-offset: 2px;
}

/* body/base-medium → body/xl-medium, text/body */
.wlc-lp-order__lead {
	color: #374151;
	font-size: clamp(1rem, 0.912rem + 0.3756vw, 1.25rem);
	font-weight: 500;
	line-height: 1.6;
}

.wlc-lp-order__fields {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.wlc-lp-order__field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* body/lg */
.wlc-lp-order__label {
	color: #020202;
	font-size: 1.125rem;
	font-weight: 300;
	line-height: 1.55;
}

/* Input 48px, border/input; focus and error are 2px (drawn with an inset
   shadow on top of the 1px border, so the text does not move). */
.wlc-lp-order .wlc-lp-order__input {
	width: 100%;
	height: 3rem;
	margin: 0;
	padding: 0 1rem;
	border: 1px solid #848a90;
	border-radius: 0;
	background: #fff;
	color: #020202;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.5;
	box-shadow: none;
	outline: none;
	appearance: none;
}

.wlc-lp-order .wlc-lp-order__input::placeholder {
	color: #6b7280;
	opacity: 1;
}

.wlc-lp-order .wlc-lp-order__input:focus {
	border-color: #000;
	box-shadow: inset 0 0 0 1px #000;
}

.wlc-lp-order .wlc-lp-order__input[aria-invalid="true"] {
	border-color: #db002f;
	box-shadow: inset 0 0 0 1px #db002f;
}

/* Error: 16px "!" badge + body/sm, text/error */
.wlc-lp-order__error {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	color: #db002f;
	font-size: 0.875rem;
	font-weight: 300;
	line-height: 1.5;
}

.wlc-lp-order__error-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	margin-top: 0.15625rem; /* centred on the first 21px line */
	border-radius: 9999px;
	background: #db002f;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

/* Checkbox 24px in a 44px clickable row */
.wlc-lp-order__check {
	position: relative;
	display: inline-flex;
	gap: 0.75rem;
	align-items: center;
	align-self: flex-start;
	height: 2.75rem;
	padding: 0 0.25rem;
	border-radius: 0.25rem;
	color: #020202;
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.5;
	cursor: pointer;
}

.wlc-lp-order__check-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.wlc-lp-order__check-box {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border: 1px solid #848a90;
	background: #fff;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1;
}

.wlc-lp-order__check-input:checked + .wlc-lp-order__check-box {
	border-color: #db002f;
	background: #db002f;
}

.wlc-lp-order__check-input:checked + .wlc-lp-order__check-box::before {
	content: "✓";
}

/* body/xs, text/secondary */
.wlc-lp-order__small {
	color: #4b5563;
	font-size: 0.75rem;
	font-weight: 300;
	line-height: 1.5;
}

.wlc-lp-order__small--center {
	text-align: center;
}

.wlc-lp-order__submit {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* btn primary lg: 60px, 16px bold, full width */
.wlc-lp-order__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 3.75rem;
	margin: 0;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 9999px;
	background: #db002f;
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s;
}

.wlc-lp-order__btn:hover {
	background: #a90327;
}

/* form=sending: inactive while redirecting to imoje */
.wlc-lp-order__btn:disabled {
	background: #db002f;
	cursor: progress;
}

/* Honeypot */
.wlc-lp-order__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* body/base-medium on mobile */
@media (max-width: 1023px) {
	.wlc-lp-order__lead {
		line-height: 1.5;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wlc-lp-order__close,
	.wlc-lp-order__btn {
		transition: none;
	}
}
