.hejdi-lite-popup.hejdi-lite-popup--configurator {
	position: fixed;
	inset: 0;
	z-index: 1000;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--hejdi-lite--popup-overlay);
	align-items: flex-end;
	justify-content: center;
	font-family: var(--hejdi-lite--font-family);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--hejdi-lite--color-ink);
}

.hejdi-lite-popup[open] {
	display: flex;
}

.hejdi-lite-popup::backdrop {
	background: transparent;
}

.hejdi-lite-popup--configurator > .hejdi-lite-popup__panel {
	position: relative;
	inset: auto;
	z-index: 1;
	width: 100%;
	max-width: none;
	font-size: 1.125rem;
	line-height: 1.5;
	height: auto;
	min-height: 40vh;
	/* stylelint-disable-next-line unit-no-unknown */
	min-height: 40dvh;
	/* stylelint-disable-next-line unit-no-unknown */
	max-height: calc(100dvh - 24px);
	overflow-x: hidden;
	overflow-y: auto;
	padding: 0;
	border-radius: var(--hejdi-lite--radius) var(--hejdi-lite--radius) 0 0;
	background: var(--hejdi-lite--color-paper);
	box-shadow: var(--hejdi-lite--popup-shadow-bottom);
	overscroll-behavior: contain;
	transform: none;
}

.hejdi-lite-popup__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hejdi-lite--space-lg);
	padding: var(--hejdi-lite--space-lg) calc(var(--hejdi-lite--space-lg) + var(--hejdi-lite--space-sm)) var(--hejdi-lite--space-sm);
	border-bottom: 1px solid var(--hejdi-lite--color-border);
	background: var(--hejdi-lite--color-paper);
}

.hejdi-lite-popup__title {
	min-width: 0;
	margin: 0;
	color: var(--hejdi-lite--color-heading);
	font-size: var(--wp--preset--font-size--l, 1.25rem);
	font-weight: 600;
	line-height: 1.5;
}

.hejdi-lite-popup__title--loading {
	width: min(55%, 240px);
	height: 20px;
	border-radius: 4px;
	background: var(--hejdi-lite--color-brand-soft);
	color: transparent;
	overflow: hidden;
	white-space: nowrap;
}

.hejdi-lite-popup__close {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: calc(var(--hejdi-lite--space-lg) * 2);
	height: calc(var(--hejdi-lite--space-lg) * 2);
	margin-left: auto;
	padding: 0;
	border: 2px solid var(--hejdi-lite--color-paper);
	border-radius: var(--hejdi-lite--radius-pill);
	background: var(--hejdi-lite--color-surface);
	color: var(--hejdi-lite--color-muted);
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
	appearance: none;
}

.hejdi-lite-popup__close:hover {
	background: var(--hejdi-lite--color-brand-soft);
	color: var(--hejdi-lite--color-brand-hover);
}

.hejdi-lite-popup__close:focus-visible {
	outline: 2px solid var(--hejdi-lite--color-brand);
	outline-offset: 2px;
}

.hejdi-lite-popup__close img {
	display: block;
	width: 21px;
	height: 20px;
	pointer-events: none;
}

.hejdi-lite-popup__content > :first-child {
	margin-top: 0;
}

.hejdi-lite-popup__content-heading {
	margin-top: 0;
}

.hejdi-lite-popup__content {
	width: 100%;
	box-sizing: border-box;
	padding: 0 24px calc(16px + env(safe-area-inset-bottom));
}

.hejdi-lite-popup__content > :last-child {
	margin-bottom: 0;
}

.hejdi-lite-popup__loading {
	flex: 1;
	display: block;
	min-height: 100%;
	padding-top: 16px;
	width: 100%;
}

.hejdi-lite-popup__loading.is-error {
	min-height: 0;
}

.hejdi-lite-popup__loading .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.hejdi-lite-popup__skeleton {
	display: grid;
	gap: 16px;
	width: 100%;
	height: 100%;
}

.hejdi-lite-popup__skeleton-block {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	border-radius: var(--hejdi-lite--radius);
	background: var(--hejdi-lite--color-surface-strong);
}

.hejdi-lite-popup[data-hejdi-lite-popup-loading] .hejdi-lite-popup__panel {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.hejdi-lite-popup[data-hejdi-lite-popup-loading] .hejdi-lite-popup__content {
	flex: 1;
	display: flex;
	min-height: 0;
}

.hejdi-lite-popup[data-hejdi-lite-popup-loading] .hejdi-lite-popup__panel::after {
	position: absolute;
	inset: 0;
	z-index: 3;
	background: linear-gradient(100deg, transparent 35%, var(--hejdi-lite--color-shimmer-soft) 50%, transparent 65%);
	content: "";
	pointer-events: none;
	transform: translateX(-100%);
	animation: hejdi-lite-popup-sweep 1.4s ease-in-out infinite;
}

.hejdi-lite-popup.has-load-error .hejdi-lite-popup__panel::after {
	display: none;
}

.hejdi-lite-popup[data-hejdi-lite-popup-loading] .hejdi-lite-popup__close {
	z-index: 4;
}

@keyframes hejdi-lite-popup-sweep {

	to {
		transform: translateX(100%);
	}
}

body.has-hejdi-lite-popup-open {
	overflow: hidden;
}

@media (max-width: 1023px) {

	.hejdi-lite-popup__content {
		padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
	}

	.hejdi-lite-popup__loading {
		padding-top: 0;
	}

	.hejdi-lite-popup[data-hejdi-lite-popup-loading] .hejdi-lite-popup__panel {
		height: 40vh;
		/* stylelint-disable-next-line unit-no-unknown */
		height: 40dvh;
		min-height: 40vh;
		/* stylelint-disable-next-line unit-no-unknown */
		min-height: 40dvh;
		max-height: 40vh;
		/* stylelint-disable-next-line unit-no-unknown */
		max-height: 40dvh;
	}

}

@media (min-width: 1024px) {

	.hejdi-lite-popup.hejdi-lite-popup--configurator {
		align-items: stretch;
		justify-content: flex-end;
		padding: 0;
	}

	.hejdi-lite-popup--configurator > .hejdi-lite-popup__panel {
		width: var(--hejdi-lite--popup-width);
		max-width: none;
		/* stylelint-disable-next-line unit-no-unknown */
		height: 100dvh;
		min-height: 100vh;
		/* stylelint-disable-next-line unit-no-unknown */
		min-height: 100dvh;
		/* stylelint-disable-next-line unit-no-unknown */
		max-height: 100dvh;
		border-radius: 0;
		box-shadow: var(--hejdi-lite--popup-shadow-side);
	}

	.hejdi-lite-popup__header {
		position: sticky;
		top: 0;
		z-index: 2;
		padding: var(--hejdi-lite--space-lg) calc(var(--hejdi-lite--space-lg) + var(--hejdi-lite--space-sm));
	}

	.hejdi-lite-popup__content {
		padding: 16px 24px 24px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.hejdi-lite-popup[data-hejdi-lite-popup-loading] .hejdi-lite-popup__panel::after {
		animation: none;
	}
}
