/* LemonLens Galleries front end styles
   Colours adapt to each gallery's background and accent via CSS variables set
   inline per gallery (--llg-bg, --llg-accent, --llg-fg, --llg-fg-soft,
   --llg-line, --llg-surface, --llg-surface-2, --llg-accent-fg). */

/* ------------------------------------------------------------------ Page */
.llg-page {
	max-width: 1320px;
	margin: 0 auto;
	padding: 40px 20px 72px;
}

.llg-page-header {
	text-align: center;
	margin-bottom: 32px;
}

.llg-page-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.55;
	margin-bottom: 10px;
}

.llg-page-title {
	font-size: clamp(30px, 4.5vw, 50px);
	line-height: 1.05;
	letter-spacing: -0.01em;
	margin: 0 0 12px;
}

.llg-page-intro {
	max-width: 660px;
	margin: 0 auto;
	opacity: 0.75;
	line-height: 1.65;
}

/* --------------------------------------------------- Payment confirmation */
.llg-flash {
	position: relative;
	margin: 0 auto 24px;
	max-width: 720px;
	padding: 14px 44px 14px 18px;
	border-radius: 12px;
	background: #e9f7ef;
	border: 1px solid #b7e1c6;
	color: #14532d;
	font-size: 15px;
	line-height: 1.5;
}

.llg-flash-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: transparent;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
}

.llg-flash-close:hover { opacity: 1; }

/* --------------------------------------------------------------- Wrapper */
.llg-wrap {
	background: var(--llg-bg, #0f0f0f);
	color: var(--llg-fg, #fff);
	border-radius: calc(var(--llg-radius, 6px) + 8px);
	padding: clamp(12px, 2.2vw, 26px);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

/* ------------------------------------------------------------------ Grid */
.llg-grid {
	display: grid;
	grid-template-columns: repeat(var(--llg-cols, 3), 1fr);
	gap: var(--llg-gap, 8px);
}

.llg-item {
	margin: 0;
	overflow: hidden;
	border-radius: var(--llg-radius, 6px);
	cursor: zoom-in;
	position: relative;
	background: var(--llg-surface, rgba(255, 255, 255, 0.05));
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Even grid needs a fixed shape so object-fit: cover crops evenly. */
.llg-layout-grid .llg-item {
	aspect-ratio: var(--llg-aspect, 4 / 5);
}

.llg-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

/* Soft hover lift + zoom, with a subtle glint over the image. */
.llg-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.22), transparent 45%);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.llg-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.llg-item:hover img {
	transform: scale(1.05);
}

.llg-item:hover::after {
	opacity: 1;
}

.llg-cap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 26px 14px 12px;
	font-size: 13px;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

/* Masonry uses CSS columns so the heights stay natural. */
.llg-layout-masonry .llg-grid {
	display: block;
	column-count: var(--llg-cols, 3);
	column-gap: var(--llg-gap, 8px);
}

.llg-layout-masonry .llg-item {
	break-inside: avoid;
	margin-bottom: var(--llg-gap, 8px);
}

.llg-layout-masonry .llg-item img {
	height: auto;
}

/* Justified rows. */
.llg-layout-justified .llg-grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--llg-gap, 8px);
}

.llg-layout-justified .llg-item {
	flex: 1 1 240px;
	height: 260px;
}

@media (max-width: 900px) {
	.llg-grid { grid-template-columns: repeat(2, 1fr); }
	.llg-layout-masonry .llg-grid { column-count: 2; }
}

@media (max-width: 560px) {
	.llg-grid { grid-template-columns: 1fr; }
	.llg-layout-masonry .llg-grid { column-count: 1; }
}

/* ----------------------------------------------------------- Access gate */
.llg-gate-wrap {
	display: flex;
	justify-content: center;
	padding: clamp(36px, 7vw, 80px) 20px;
}

.llg-gate {
	width: 100%;
	max-width: 440px;
	text-align: center;
	background: var(--llg-surface, rgba(255, 255, 255, 0.05));
	border: 1px solid var(--llg-line, rgba(255, 255, 255, 0.16));
	border-radius: calc(var(--llg-radius, 6px) + 6px);
	padding: clamp(26px, 4vw, 40px);
}

.llg-gate-title {
	margin: 0 0 14px;
	font-size: clamp(22px, 3vw, 28px);
	line-height: 1.15;
}

.llg-gate-text {
	color: var(--llg-fg-soft, rgba(255, 255, 255, 0.78));
	margin-bottom: 24px;
	line-height: 1.6;
}

.llg-gate-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-align: left;
}

.llg-gate-form input {
	padding: 14px 16px;
	border-radius: var(--llg-radius, 6px);
	border: 1px solid var(--llg-line, rgba(255, 255, 255, 0.2));
	background: var(--llg-surface-2, rgba(255, 255, 255, 0.08));
	color: var(--llg-fg, #fff);
	font-size: 15px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.llg-gate-form input::placeholder {
	color: var(--llg-fg-soft, rgba(255, 255, 255, 0.55));
	opacity: 0.7;
}

.llg-gate-form input:focus {
	outline: none;
	border-color: var(--llg-accent, #f4c20d);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--llg-accent, #f4c20d) 35%, transparent);
}

/* ------------------------------------------------------------- Buttons */
.llg-gate-form button,
.llg-lb-btn {
	padding: 14px 18px;
	border: none;
	border-radius: var(--llg-radius, 6px);
	background: var(--llg-accent, #f4c20d);
	color: var(--llg-accent-fg, #1a1a1a);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.llg-gate-form button:hover,
.llg-lb-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.llg-gate-form button:active,
.llg-lb-btn:active {
	transform: translateY(0);
}

.llg-error {
	background: rgba(220, 60, 60, 0.16);
	border: 1px solid rgba(220, 60, 60, 0.4);
	color: var(--llg-fg, #fff);
	padding: 11px 14px;
	border-radius: var(--llg-radius, 6px);
	margin-bottom: 18px;
}

/* ------------------------------------------------------------- Lightbox
   The lightbox is a full-screen dark overlay regardless of the gallery
   background, so it keeps a fixed light-on-dark palette for legibility. */
.llg-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(8, 8, 8, 0.94);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 56px 16px 40px;
	opacity: 0;
	transition: opacity 0.22s ease;
}

.llg-lightbox.is-open {
	display: flex;
	opacity: 1;
}

.llg-lb-figure {
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.llg-lb-img {
	max-width: 92vw;
	max-height: 78vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.llg-lb-meta {
	color: #fff;
	margin-top: 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	justify-content: center;
}

.llg-lb-caption {
	opacity: 0.82;
	font-size: 14px;
}

.llg-lb-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

.llg-lb-actions .llg-lb-btn {
	padding: 11px 16px;
	font-size: 14px;
}

.llg-lb-count {
	position: absolute;
	top: 20px;
	left: 22px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
}

.llg-lb-close,
.llg-lb-prev,
.llg-lb-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.llg-lb-close:hover,
.llg-lb-prev:hover,
.llg-lb-next:hover {
	background: rgba(255, 255, 255, 0.24);
}

.llg-lb-close { top: 16px; right: 18px; }
.llg-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.llg-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.llg-lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.llg-lb-next:hover { transform: translateY(-50%) scale(1.06); }

.llg-lb-status {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 14px;
	background: rgba(0, 0, 0, 0.5);
	padding: 6px 14px;
	border-radius: 100px;
	max-width: 90vw;
}

.llg-lb-status:empty { display: none; }

.llg-mini-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 10px;
}

.llg-mini-form input,
.llg-mini-form select {
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 14px;
}

/* Keyboard focus visibility */
.llg-item:focus-visible,
.llg-gate-form button:focus-visible,
.llg-lb-btn:focus-visible,
.llg-lb-close:focus-visible,
.llg-lb-prev:focus-visible,
.llg-lb-next:focus-visible {
	outline: 3px solid var(--llg-accent, #f4c20d);
	outline-offset: 2px;
}

/* Discourage casual right-click save of protected images. */
.llg-item img,
.llg-lb-img {
	-webkit-user-drag: none;
	user-select: none;
}

/* Lightbox image loading state and scroll lock. */
.llg-lb-img.is-loading {
	opacity: 0.35;
	transition: opacity 0.2s ease;
}

body.llg-no-scroll {
	overflow: hidden;
}
