/**
 * Smooth Scroll Gallery - Frontend
 */

.ssg-gallery {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: var(--ssg-gap, 16px);
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	color: inherit;
	contain: layout paint;
}

.ssg-gallery *,
.ssg-gallery *::before,
.ssg-gallery *::after {
	box-sizing: border-box;
}

.ssg-gallery .ssg-viewport {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	overscroll-behavior-inline: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}

.ssg-gallery .ssg-viewport::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.ssg-gallery[data-swipe="false"] .ssg-viewport {
	touch-action: pan-x pan-y;
}

.ssg-gallery[data-drag="false"] .ssg-viewport {
	cursor: auto;
}

.ssg-gallery .ssg-track {
	display: flex;
	align-items: stretch;
	gap: var(--ssg-gap, 16px);
	width: max-content;
	max-width: none;
	min-width: 100%;
	margin: 0;
	padding: 0;
	transition: none;
}

.ssg-gallery .ssg-item {
	flex: 0 0 auto;
	height: var(--ssg-height, 300px);
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: var(--ssg-radius, 18px);
	background: transparent;
	cursor: zoom-in;
}

.ssg-gallery .ssg-item img {
	display: block;
	width: auto;
	height: 100%;
	max-width: none;
	min-width: 0;
	border-radius: var(--ssg-radius, 18px);
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	cursor: zoom-in;
}

.ssg-gallery[data-mode="cover"] .ssg-item img {
	object-fit: cover;
}

.ssg-gallery .ssg-arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(30, 30, 30, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	color: #1f2933;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	font: inherit;
	font-size: 28px;
	line-height: 1;
	text-align: center;
	appearance: none;
	transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ssg-gallery .ssg-arrow:hover {
	border-color: rgba(30, 30, 30, 0.32);
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ssg-gallery .ssg-arrow:focus {
	outline: none;
}

.ssg-gallery .ssg-arrow:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 3px;
}

.ssg-gallery .ssg-arrow:active {
	transform: scale(0.96);
}

.ssg-gallery.ssg-is-dragging,
.ssg-gallery.ssg-is-dragging .ssg-viewport {
	cursor: grabbing;
	user-select: none;
}

.ssg-notice {
	margin: 12px 0;
	color: #646970;
	font-size: 14px;
}

.ssg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0);
	cursor: zoom-out;
	opacity: 0;
	transition: opacity 180ms ease, background-color 180ms ease;
}

.ssg-lightbox-open {
	background: rgba(0, 0, 0, 0.9);
	opacity: 1;
}

.ssg-lightbox-frame {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	transform: scale(0.96);
	transition: transform 180ms ease;
}

.ssg-lightbox-open .ssg-lightbox-frame {
	transform: scale(1);
}

.ssg-lightbox img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ssg-lightbox-close {
	position: fixed;
	top: 18px;
	right: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 32px;
	line-height: 1;
}

.ssg-lightbox-close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

@media (max-width: 1024px) {
	.ssg-gallery .ssg-item {
		height: var(--ssg-tablet-height, 230px);
	}
}

@media (max-width: 767px) {
	.ssg-gallery {
		gap: min(var(--ssg-gap, 16px), 12px);
		width: 100%;
		max-width: 100%;
	}

	.ssg-gallery .ssg-item {
		height: var(--ssg-mobile-height, 170px);
	}

	.ssg-gallery .ssg-arrow {
		width: 34px;
		height: 34px;
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ssg-gallery .ssg-track {
		animation: none !important;
		transition: none !important;
	}

	.ssg-gallery .ssg-arrow {
		transition: none !important;
	}

	.ssg-lightbox,
	.ssg-lightbox-frame {
		transition: none !important;
	}
}
