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

body.gallery-popup-ready #modal01 {
	display: none !important;
}

.professional-gallery-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) 84px;
	align-items: center;
	visibility: hidden;
	padding: 28px;
	background: rgba(12, 5, 25, .96);
	backdrop-filter: blur(10px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease, visibility .22s ease;
}

.professional-gallery-popup.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.gallery-popup-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	margin: 0;
}

.gallery-popup-image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 160px;
}

.gallery-popup-image-wrap::before {
	position: absolute;
	z-index: 0;
	width: 42px;
	height: 42px;
	border: 3px solid rgba(255, 255, 255, .2);
	border-top-color: #ccd220;
	border-radius: 50%;
	content: "";
	opacity: 0;
	animation: gallery-popup-spin .8s linear infinite;
}

.professional-gallery-popup.is-loading .gallery-popup-image-wrap::before {
	opacity: 1;
}

.gallery-popup-image {
	position: relative;
	z-index: 1;
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 115px);
	border-radius: 8px;
	object-fit: contain;
	box-shadow: 0 22px 70px rgba(0, 0, 0, .52);
	opacity: 1;
	transition: opacity .18s ease;
	user-select: none;
}

.professional-gallery-popup.is-loading .gallery-popup-image {
	opacity: .18;
}

.gallery-popup-caption {
	position: absolute;
	right: 0;
	bottom: 2px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 36px;
	margin: 0;
	color: rgba(255, 255, 255, .82);
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}

.gallery-popup-counter {
	flex: 0 0 auto;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .11);
	color: #ccd220;
	font-weight: 800;
	letter-spacing: .5px;
}

.gallery-popup-button {
	display: grid;
	width: 52px;
	height: 52px;
	place-items: center;
	justify-self: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 50%;
	background: rgba(255, 255, 255, .09);
	color: #fff;
	cursor: pointer;
	font-family: Arial, sans-serif;
	font-size: 25px;
	line-height: 1;
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.gallery-popup-button:hover,
.gallery-popup-button:focus-visible {
	border-color: #ccd220;
	background: #2e0775;
	outline: none;
	transform: scale(1.06);
}

.gallery-popup-close {
	position: absolute;
	top: 20px;
	right: 22px;
	z-index: 3;
	width: 46px;
	height: 46px;
	font-size: 29px;
}

.gallery-popup-prev { grid-column: 1; }
.gallery-popup-stage { grid-column: 2; }
.gallery-popup-next { grid-column: 3; }

.event-photo-item,
.filter-layout .w3-hover-opacity {
	cursor: zoom-in;
}

.filter-layout .w3-hover-opacity:focus-visible {
	outline: 3px solid #ccd220;
	outline-offset: 3px;
}

@keyframes gallery-popup-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.professional-gallery-popup {
		grid-template-columns: 54px minmax(0, 1fr) 54px;
		padding: 18px 5px 66px;
	}

	.gallery-popup-button {
		width: 43px;
		height: 43px;
		font-size: 21px;
	}

	.gallery-popup-close {
		top: 12px;
		right: 12px;
		width: 42px;
		height: 42px;
	}

	.gallery-popup-image {
		max-height: calc(100vh - 145px);
		border-radius: 5px;
	}

	.gallery-popup-caption {
		bottom: -48px;
		padding: 0 52px;
	}
}

@media (max-width: 480px) {
	.professional-gallery-popup {
		grid-template-columns: 1fr;
	}

	.gallery-popup-stage {
		grid-column: 1;
	}

	.gallery-popup-prev,
	.gallery-popup-next {
		position: absolute;
		bottom: 14px;
		z-index: 3;
	}

	.gallery-popup-prev { left: 16px; }
	.gallery-popup-next { right: 16px; }

	.gallery-popup-caption {
		bottom: -50px;
		padding: 0 58px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.professional-gallery-popup,
	.gallery-popup-image,
	.gallery-popup-button {
		transition: none;
	}
}
