/* Всплывающий баннер. z-index выше cookie-баннера (99999) и модальных окон */
.popup-banner {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.7);
	opacity: 0;
	transition: opacity 0.25s ease;
	-webkit-tap-highlight-color: transparent;
}

.popup-banner[hidden] {
	display: none;
}

.popup-banner.is-visible {
	opacity: 1;
}

.popup-banner__dialog {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	transform: scale(0.96);
	transition: transform 0.25s ease;
}

.popup-banner.is-visible .popup-banner__dialog {
	transform: scale(1);
}

.popup-banner__image {
	display: block;
	width: auto;
	height: auto;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@supports (height: 100dvh) {
	.popup-banner__image {
		max-height: calc(100dvh - 32px);
	}
}

.popup-banner__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	cursor: pointer;
	transition: background 0.2s ease;
}

.popup-banner__close:hover,
.popup-banner__close:focus {
	background: rgba(0, 0, 0, 0.85);
	outline: none;
}

.popup-banner__close:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.popup-banner__close::before,
.popup-banner__close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	margin: -1px 0 0 -9px;
	background: #fff;
	border-radius: 1px;
}

.popup-banner__close::before {
	transform: rotate(45deg);
}

.popup-banner__close::after {
	transform: rotate(-45deg);
}

body.popup-banner-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.popup-banner,
	.popup-banner__dialog {
		transition: none;
	}
}
