.rwd-pilot-popup:not([open]) {
	display: none;
}

.rwd-pilot-popup {
	position: fixed;
	inset: 0;
	width: min(850px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	overflow: auto;
	border: 0;
	border-radius: 16px;
	background: #181517;
	box-shadow: 0 18px 70px rgb(0 0 0 / 45%);
}

.rwd-pilot-popup::backdrop {
	background: rgb(16 12 14 / 70%);
}

:root:has(.rwd-pilot-popup[open]) {
	overflow: hidden;
}

.rwd-pilot-popup__panel {
	position: relative;
}

.rwd-pilot-popup__link,
.rwd-pilot-popup__link picture {
	display: block;
}

.rwd-pilot-popup__link img {
	display: block;
	width: 100%;
	height: auto;
}

.rwd-pilot-popup .rwd-pilot-popup__close {
	position: absolute;
	z-index: 1;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 0 3px;
	border: 1px solid #f8f2e9;
	border-radius: 50%;
	background: #181517;
	color: #fff;
	font: 400 34px/1 system-ui, sans-serif;
	cursor: pointer;
}

.rwd-pilot-popup__close:focus-visible,
.rwd-pilot-popup__link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -5px;
}

@media (max-width: 600px) {
	.rwd-pilot-popup {
		width: min(400px, calc(100% - 32px), calc((100dvh - 32px) * .8));
	}
}

@media (forced-colors: active) {
	.rwd-pilot-popup {
		border: 1px solid CanvasText;
	}
}
