/* Asoka Album Gallery 1.0.0
 * New SCF Album only. Legacy Album is intentionally excluded.
 * Enhanced layout is enabled only after JS adds .aag-ready.
 */

.album-gallery-grid[data-asoka-gallery="1"] {
	display: block;
	width: 100%;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-set {
	margin: 0 0 36px;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-set:last-child {
	margin-bottom: 0;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-set > .photog_txt {
	margin: 0 0 12px;
	line-height: 1.8;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-items {
	display: block;
	width: 100%;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-row {
	display: flex;
	width: 100%;
	align-items: stretch;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item {
	display: block;
	position: relative;
	flex: 0 0 auto;
	overflow: hidden;
	margin: 0;
	padding: 0;
	border-radius: 6px;
	background: #eee;
	cursor: zoom-in;
	outline: none;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item > img {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
	transition: transform 180ms ease;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item > a {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item > a > img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
	transition: transform 180ms ease;
}

@media (hover: hover) {
	.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item:hover > img,
	.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item:hover > a > img {
		transform: scale(1.015);
	}
}

.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
	z-index: 2;
}

/* Lightbox */
body.asoka-album-gallery-lightbox-open {
	overflow: hidden;
}

.asoka-album-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	background: rgba(0, 0, 0, 0.94);
	transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.asoka-album-gallery-lightbox.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transition: opacity 200ms ease, visibility 0s linear 0s;
}

.asoka-album-gallery-lightbox__stage {
	position: absolute;
	inset: 56px 72px 50px;
	overflow: hidden;
	touch-action: pan-y;
	cursor: zoom-out;
}

.asoka-album-gallery-lightbox__track {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -100%;
	display: flex;
	width: 300%;
	height: 100%;
	transform: translate3d(0, 0, 0);
	will-change: transform;
}

.asoka-album-gallery-lightbox__track.is-animating {
	transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.asoka-album-gallery-lightbox__slide {
	position: relative;
	display: flex;
	flex: 0 0 33.333333%;
	width: 33.333333%;
	height: 100%;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.asoka-album-gallery-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 5px;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	cursor: default;
	opacity: 0;
	transform: scale(0.985);
	transition: opacity 180ms ease, transform 220ms ease;
}

.asoka-album-gallery-lightbox__image.is-ready {
	opacity: 1;
	transform: scale(1);
}

.asoka-album-gallery-lightbox:not(.is-open) .asoka-album-gallery-lightbox__image {
	opacity: 0;
	transform: scale(0.985);
}

.asoka-album-gallery-lightbox__close,
.asoka-album-gallery-lightbox__prev,
.asoka-album-gallery-lightbox__next {
	position: absolute;
	z-index: 3;
	border: 0;
	background: rgba(0, 0, 0, 0.28);
	color: #fff;
	cursor: pointer;
	font: inherit;
}

.asoka-album-gallery-lightbox__close {
	top: 10px;
	right: 14px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 32px;
	line-height: 1;
}

.asoka-album-gallery-lightbox__prev,
.asoka-album-gallery-lightbox__next {
	top: 50%;
	width: 52px;
	height: 72px;
	margin-top: -36px;
	border-radius: 5px;
	font-size: 48px;
	line-height: 60px;
}

.asoka-album-gallery-lightbox__prev {
	left: 10px;
}

.asoka-album-gallery-lightbox__next {
	right: 10px;
}

.asoka-album-gallery-lightbox__prev[hidden],
.asoka-album-gallery-lightbox__next[hidden] {
	display: none !important;
}

.asoka-album-gallery-lightbox__counter {
	position: absolute;
	left: 50%;
	bottom: 13px;
	z-index: 3;
	transform: translateX(-50%);
	color: #fff;
	font-size: 14px;
	letter-spacing: 0.05em;
	pointer-events: none;
}

@media (max-width: 719px) {
	.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-set {
		margin-bottom: 28px;
	}

	.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-set > .photog_txt {
		margin-bottom: 8px;
	}

	.asoka-album-gallery-lightbox__stage {
		inset: 48px 8px 42px;
	}

	.asoka-album-gallery-lightbox__prev,
	.asoka-album-gallery-lightbox__next {
		width: 42px;
		height: 62px;
		margin-top: -31px;
		font-size: 40px;
		background: rgba(0, 0, 0, 0.16);
	}

	.asoka-album-gallery-lightbox__prev {
		left: 2px;
	}

	.asoka-album-gallery-lightbox__next {
		right: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item > img,
	.album-gallery-grid[data-asoka-gallery="1"].aag-ready .album-gallery-item > a > img,
	.asoka-album-gallery-lightbox,
	.asoka-album-gallery-lightbox__track,
	.asoka-album-gallery-lightbox__image {
		transition: none !important;
	}

	.asoka-album-gallery-lightbox__image,
	.asoka-album-gallery-lightbox__image.is-ready {
		transform: none !important;
	}
}
