[data-vn-modal][hidden],
[data-vn-modal-content][hidden] {
	display: none !important;
}

html.vn-modal-locked {
	overflow: hidden;
	scrollbar-gutter: stable;
	overscroll-behavior: none;
	scroll-behavior: auto !important;
}

.vn-modal-shell[open] {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 24px 64px;
	border: 0;
	background: transparent;
	color: #111;
	overflow: hidden;
}

.vn-modal-shell::backdrop { background: transparent; }
.vn-modal-shell__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 50%);
	backdrop-filter: blur(15px);
}

.vn-modal-shell__panel {
	--vn-modal-width: 820px;
	position: relative;
	width: min(100%, var(--vn-modal-width));
	max-height: 100%;
	min-height: 0;
	outline: none;
}

.vn-modal-shell[data-kind="roulette"] .vn-modal-shell__panel { --vn-modal-width: 1050px; }
.vn-modal-shell[data-kind="campaign"] .vn-modal-shell__panel { --vn-modal-width: 780px; }
.vn-modal-shell[data-kind="gallery"] .vn-modal-shell__panel { --vn-modal-width: 100%; }

.vn-modal-shell__body {
	max-height: calc(100dvh - 48px);
	background: #fff;
	border-radius: 16px;
	overflow: auto;
	overscroll-behavior: contain;
}

.vn-modal-shell__close {
	position: absolute;
	z-index: 1;
	top: 16px;
	left: 100%;
	display: grid;
	place-items: center;
	width: 42px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 0 6px 6px 0;
	background: #ff5c00;
	color: #111;
	cursor: pointer;
}

.vn-modal-shell__close:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.vn-modal-shell__handle { display: none; }

.vn-modal-shell .vn-modal-content {
	position: static;
	display: block;
	padding: 0;
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transition: none;
}

.vn-modal-shell .vn-modal-content > :is(
	.welcome-offer__overlay, .roulette-modal__backdrop, .site-dialog__backdrop, .product-lightbox__backdrop
),
.vn-modal-shell .vn-modal-content :is(
	.welcome-offer__close, .roulette-modal__close, .site-dialog__close, .product-lightbox__close
) { display: none; }

.vn-modal-shell .vn-modal-content > .vn-modal-content__panel {
	width: 100%;
	max-width: none;
	margin: 0;
	opacity: 1;
	transform: none;
	transition: none;
}

.vn-modal-shell[data-kind="gallery"] .vn-modal-content__panel {
	height: calc(100dvh - 48px);
}

@media (max-width: 767px) {
	.vn-modal-shell[open] { align-items: end; padding: 0; }
	.vn-modal-shell__panel { width: 100%; background: #fff; border-radius: 16px 16px 0 0; }
	.vn-modal-shell__backdrop { backdrop-filter: none; }
	.vn-modal-shell__body {
		max-height: calc(100dvh - 64px);
		padding-bottom: env(safe-area-inset-bottom, 0px);
		border-radius: 0;
	}
	.vn-modal-shell__close {
		position: relative;
		inset: auto;
		width: 100%;
		height: 44px;
		border-radius: 16px 16px 0 0;
		background: transparent;
		touch-action: none;
	}
	.vn-modal-shell__close svg { display: none; }
	.vn-modal-shell__handle { display: block; width: 40px; height: 4px; border-radius: 999px; background: #b3b3b3; }
	.vn-modal-shell[data-kind="gallery"] .vn-modal-content__panel { height: calc(100dvh - 72px); }
}
