/*
 * mishadort-blocks shared lightbox popup gallery and overlay styles.
 * Shared between mishadort-blocks/carousel, portfolio, and gallery.
 * 0 !important declarations.
 */

/* ------------------------------------------------------------- popup gallery */
.mdb-popup-gallery {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	background: rgba(0, 0, 0, 0.9);
	box-sizing: border-box;
}

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

.mdb-popup-gallery__content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	max-width: 90vw;
	max-height: 85vh;
	box-sizing: border-box;
}

.mdb-popup-gallery__img {
	display: block;
	max-width: 100%;
	max-height: 75vh;
	width: auto;
	height: auto;
	margin: 0 auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
	object-fit: contain;
}

.mdb-popup-gallery__title {
	margin-top: 14px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: #ffffff;
	text-align: center;
}

.mdb-popup-gallery__counter {
	margin-top: 6px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	text-align: center;
}

.mdb-popup-gallery__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	cursor: pointer;
	z-index: 10;
}

.mdb-popup-gallery__close::before,
.mdb-popup-gallery__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2px;
	margin-top: -1px;
	margin-left: -10px;
	background: #ffffff;
}

.mdb-popup-gallery__close::before { transform: rotate(45deg); }
.mdb-popup-gallery__close::after  { transform: rotate(-45deg); }

.mdb-popup-gallery__prev,
.mdb-popup-gallery__next {
	position: absolute;
	top: 50%;
	width: 50px;
	height: 50px;
	margin-top: -25px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	cursor: pointer;
	z-index: 10;
	transition: background 0.2s ease;
}

.mdb-popup-gallery__prev:hover,
.mdb-popup-gallery__next:hover {
	background: rgba(255, 255, 255, 0.4);
}

.mdb-popup-gallery__prev { left: 20px; }
.mdb-popup-gallery__next { right: 20px; }

.mdb-popup-gallery__prev::before,
.mdb-popup-gallery__next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	border-top: 2px solid #ffffff;
	border-right: 2px solid #ffffff;
}

.mdb-popup-gallery__prev::before {
	margin-top: -6px;
	margin-left: -3px;
	transform: rotate(-135deg);
}

.mdb-popup-gallery__next::before {
	margin-top: -6px;
	margin-left: -9px;
	transform: rotate(45deg);
}

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

/* ------------------------------------------------------------- gallery overlay */
.mdb-gallery-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	background: rgba(0, 0, 0, 0.85);
	box-sizing: border-box;
}

.mdb-gallery-overlay__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	margin: 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mdb-gallery-overlay__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	cursor: pointer;
}

.mdb-gallery-overlay__close::before,
.mdb-gallery-overlay__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2px;
	margin-top: -1px;
	margin-left: -10px;
	background: #ffffff;
}

.mdb-gallery-overlay__close::before { transform: rotate(45deg); }
.mdb-gallery-overlay__close::after  { transform: rotate(-45deg); }

/* Stop the page scrolling behind the overlay. */
body.mdb-gallery-overlay-open {
	overflow: hidden;
}
