/* OneAndOnly Gallery */

.oaog-gallery {
	--oaog-columns: 4;
	--oaog-gap: 10px;
	--oaog-aspect: 3 / 2;
	width: 100%;
}

.oaog-gallery--empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 160px;
	color: #a4afb7;
	border: 1px dashed #d5d8dc;
}

.oaog-gallery--empty .eicon-gallery-grid {
	font-size: 40px;
}

.oaog-gallery__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 180px;
	padding: 32px 20px;
	box-sizing: border-box;
	text-align: center;
	color: #a4afb7;
}

.oaog-gallery__empty[hidden] {
	display: none !important;
}

.oaog-gallery__empty-icon {
	display: flex;
	color: inherit;
}

.oaog-gallery__empty-text {
	margin: 0;
	font-size: 1rem;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: inherit;
}

.oaog-gallery.is-empty-filter .oaog-gallery__container {
	min-height: 0;
}

.oaog-gallery__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 16px;
}

.oaog-gallery__filters--main {
	margin-bottom: 12px;
}

.oaog-gallery__filters--sub {
	margin-top: 0;
	margin-bottom: 28px;
	gap: 14px;
}

.oaog-gallery__filters--sub[hidden] {
	display: none !important;
}

/* Scrollable filter rows */
.oaog-gallery.is-filters-scrollable.oaog-gallery--filters-scroll-both .oaog-gallery__filters,
.oaog-gallery.is-filters-scrollable.oaog-gallery--filters-scroll-main .oaog-gallery__filters--main,
.oaog-gallery.is-filters-scrollable.oaog-gallery--filters-scroll-sub .oaog-gallery__filters--sub,
.oaog-gallery--filters-scroll.oaog-gallery--filters-scroll-both .oaog-gallery__filters,
.oaog-gallery--filters-scroll.oaog-gallery--filters-scroll-main .oaog-gallery__filters--main,
.oaog-gallery--filters-scroll.oaog-gallery--filters-scroll-sub .oaog-gallery__filters--sub {
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	overscroll-behavior-x: contain;
	box-sizing: border-box;
	/* Avoid clipping first/last chips against the edges. */
	padding-left: 16px;
	padding-right: 16px;
	scroll-padding-inline: 16px;
}

/*
 * Center/right justify-content on a scrollable flex row clips the start items
 * and makes scrollLeft stuck — you cannot scroll back to the first filter.
 * When overflowing, always pin to the start.
 */
.oaog-gallery__filters.is-overflowing {
	justify-content: flex-start !important;
}

.oaog-gallery.is-filters-scrollable.oaog-gallery--filters-scroll-both .oaog-gallery__filter,
.oaog-gallery.is-filters-scrollable.oaog-gallery--filters-scroll-main .oaog-gallery__filters--main .oaog-gallery__filter,
.oaog-gallery.is-filters-scrollable.oaog-gallery--filters-scroll-sub .oaog-gallery__filters--sub .oaog-gallery__filter,
.oaog-gallery--filters-scroll.oaog-gallery--filters-scroll-both .oaog-gallery__filter,
.oaog-gallery--filters-scroll.oaog-gallery--filters-scroll-main .oaog-gallery__filters--main .oaog-gallery__filter,
.oaog-gallery--filters-scroll.oaog-gallery--filters-scroll-sub .oaog-gallery__filters--sub .oaog-gallery__filter {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* Visible thin scrollbar (only when hide is off) */
.oaog-gallery.is-filters-scrollable:not(.oaog-gallery--filters-hide-scrollbar) .oaog-gallery__filters,
.oaog-gallery--filters-scroll:not(.oaog-gallery--filters-hide-scrollbar) .oaog-gallery__filters {
	scrollbar-width: thin;
}

/* Hide scrollbar — high specificity so it wins over scroll rules */
.oaog-gallery.oaog-gallery--filters-hide-scrollbar.is-filters-scrollable .oaog-gallery__filters,
.oaog-gallery.oaog-gallery--filters-hide-scrollbar.oaog-gallery--filters-scroll .oaog-gallery__filters,
.oaog-gallery.oaog-gallery--filters-hide-scrollbar .oaog-gallery__filters--main,
.oaog-gallery.oaog-gallery--filters-hide-scrollbar .oaog-gallery__filters--sub {
	scrollbar-width: none !important;
	-ms-overflow-style: none !important;
}

.oaog-gallery.oaog-gallery--filters-hide-scrollbar.is-filters-scrollable .oaog-gallery__filters::-webkit-scrollbar,
.oaog-gallery.oaog-gallery--filters-hide-scrollbar.oaog-gallery--filters-scroll .oaog-gallery__filters::-webkit-scrollbar,
.oaog-gallery.oaog-gallery--filters-hide-scrollbar .oaog-gallery__filters--main::-webkit-scrollbar,
.oaog-gallery.oaog-gallery--filters-hide-scrollbar .oaog-gallery__filters--sub::-webkit-scrollbar {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	background: transparent !important;
}

.oaog-gallery__filter {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	font: inherit;
	color: inherit;
	position: relative;
	line-height: 1.4;
	opacity: 1;
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: 5px;
	transition: opacity 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.oaog-gallery__filter--sub {
	font-size: 0.92em;
}

.oaog-gallery__filter:hover,
.oaog-gallery__filter.is-active {
	opacity: 1;
}

.oaog-gallery__filter.is-active {
	font-weight: 600;
}

.oaog-gallery__filter-label {
	display: block;
	line-height: 1.3;
}

.oaog-gallery__filter-underline {
	display: block;
	width: 100%;
	height: 2px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 1px;
	background-color: currentColor;
	opacity: 0;
	transform: scaleX(0.35);
	transform-origin: center;
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
	flex: 0 0 auto;
}

.oaog-gallery__filter.is-active .oaog-gallery__filter-underline {
	opacity: 1;
	transform: scaleX(1);
}

.oaog-gallery--hide-main-underline .oaog-gallery__filters--main .oaog-gallery__filter-underline,
.oaog-gallery--hide-sub-underline .oaog-gallery__filter--sub .oaog-gallery__filter-underline {
	display: none !important;
}

.oaog-gallery__container {
	display: grid;
	grid-template-columns: repeat(var(--oaog-columns), minmax(0, 1fr));
	gap: var(--oaog-gap);
	box-sizing: border-box;
}

.oaog-gallery--layout-masonry .oaog-gallery__container {
	display: block;
	column-count: var(--oaog-columns);
	column-gap: var(--oaog-gap);
}

.oaog-gallery--layout-masonry .oaog-gallery__item {
	break-inside: avoid;
	margin-bottom: var(--oaog-gap);
	display: block;
}

.oaog-gallery--layout-justified .oaog-gallery__container {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: var(--oaog-gap);
}

.oaog-gallery--layout-justified .oaog-gallery__item {
	flex: 0 0 auto;
	height: var(--oaog-row-height, 200px);
	width: auto;
	/* JS sets exact widths; don't cap or rows won't flush to the edges. */
	max-width: none;
}

.oaog-gallery--layout-justified .oaog-gallery__image {
	height: 100%;
	aspect-ratio: auto;
}

.oaog-gallery--layout-justified .oaog-gallery__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.oaog-gallery--layout-justified .oaog-gallery__load-more-tile {
	height: var(--oaog-row-height, 200px);
	width: var(--oaog-row-height, 200px);
	max-width: none;
	flex: 0 0 auto;
	aspect-ratio: auto;
}

.oaog-gallery__item {
	position: relative;
	display: block;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	isolation: isolate;
}

.oaog-gallery__item.is-filter-hidden,
.oaog-gallery__item.is-page-hidden {
	display: none !important;
}

.oaog-gallery__image {
	width: 100%;
	overflow: hidden;
	background: #111;
}

.oaog-gallery__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s ease;
}

.oaog-gallery--layout-grid .oaog-gallery__image {
	aspect-ratio: var(--oaog-aspect);
}

.oaog-gallery--layout-masonry .oaog-gallery__image {
	aspect-ratio: auto;
	height: auto;
}

.oaog-gallery--layout-masonry .oaog-gallery__image img {
	height: auto;
	object-fit: contain;
}

.oaog-gallery__item--hover-zoom-in:hover .oaog-gallery__image img {
	transform: scale(1.08);
}

.oaog-gallery__item--hover-zoom-out .oaog-gallery__image img {
	transform: scale(1.08);
}

.oaog-gallery__item--hover-zoom-out:hover .oaog-gallery__image img {
	transform: scale(1);
}

.oaog-gallery__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
	z-index: 1;
}

.oaog-gallery__item:hover .oaog-gallery__overlay {
	opacity: 1;
}

.oaog-gallery__content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px;
	text-align: center;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.35s ease, transform 0.35s ease;
	z-index: 2;
	pointer-events: none;
	color: #fff;
}

.oaog-gallery__item:hover .oaog-gallery__content {
	opacity: 1;
	transform: translateY(0);
}

.oaog-gallery__title {
	font-weight: 600;
	line-height: 1.3;
}

.oaog-gallery__description {
	font-size: 0.9em;
	line-height: 1.4;
	opacity: 0.9;
}

.oaog-gallery__pagination {
	display: flex;
	justify-content: center;
	margin-top: 30px;
}

.oaog-gallery__pagination[hidden] {
	display: none !important;
}

.oaog-gallery__load-more {
	appearance: none;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	cursor: pointer;
	padding: 12px 28px;
	font: inherit;
	line-height: 1;
	transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.oaog-gallery__load-more:hover {
	opacity: 0.85;
}

.oaog-gallery__load-more:disabled {
	opacity: 0.4;
	cursor: default;
}

/* In-grid load more tile */
.oaog-gallery__load-more-tile {
	--oaog-lm-avatar: 42px;
	appearance: none;
	border: 0;
	margin: 0;
	padding: 0;
	width: auto;
	max-width: 100%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #e3c578;
	color: #1a1a1a;
	text-align: center;
	font: inherit;
	isolation: auto;
	overflow: hidden;
	box-sizing: border-box;
}

.oaog-gallery__load-more-tile[hidden] {
	display: none !important;
}

.oaog-gallery--layout-grid .oaog-gallery__load-more-tile {
	width: 100%;
	aspect-ratio: var(--oaog-aspect);
}

.oaog-gallery--layout-masonry .oaog-gallery__load-more-tile {
	width: 100%;
	min-height: 180px;
	aspect-ratio: 3 / 2;
}

.oaog-gallery__load-more-tile-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 16px;
}

.oaog-gallery__load-more-tile-label {
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

.oaog-gallery__load-more-tile-avatars {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-left: calc(var(--oaog-lm-avatar) * 0.35);
}

.oaog-gallery__load-more-tile-avatar {
	width: var(--oaog-lm-avatar);
	height: var(--oaog-lm-avatar);
	border-radius: 50%;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	border: 2px solid #e3c578;
	margin-left: calc(var(--oaog-lm-avatar) * -0.35);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
	flex: 0 0 auto;
}

.oaog-gallery__load-more-tile:hover {
	filter: brightness(0.97);
}

.oaog-gallery__load-more-tile:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (max-width: 1024px) {
	.oaog-gallery {
		--oaog-columns: 2;
	}

	.oaog-gallery__load-more-tile {
		--oaog-lm-avatar: 36px;
	}

	.oaog-gallery__load-more-tile-inner {
		gap: 12px;
		padding: 14px 12px;
	}

	.oaog-gallery__load-more-tile-label {
		font-size: 0.95em;
		padding: 0 4px;
		overflow-wrap: anywhere;
		word-break: break-word;
	}
}

@media (max-width: 767px) {
	.oaog-gallery {
		--oaog-columns: 1;
	}

	.oaog-gallery__load-more-tile {
		--oaog-lm-avatar: 32px;
	}

	.oaog-gallery__load-more-tile-inner {
		gap: 10px;
		padding: 12px 10px;
	}

	.oaog-gallery__load-more-tile-label {
		font-size: 0.9em;
		padding: 0 2px;
	}
}
