/* Photo Booth Moments (U3j; gallery design approved 2026-10-23): the photos are the focus. A calm grid - 4 columns on
   desktops, 2 on phones - where a landscape print spans 2 columns, a strip 2 rows and a portrait print one cell, so
   their sizes stay balanced. Each print is shown complete at its own proportions, fitted to its slot, directly on the
   page background with softly rounded corners and a quiet shadow. Positions come from the page (ry_moments_layout):
   --dc/--dr/--dw/--dh on desktops and --mc/--mr/--mw/--mh on phones, in half columns, so a short last row is centred. */
.ry-moments {
	--ry-m-heading: var(--ry-c-heading, #f6f2ea);
	--ry-m-muted: var(--ry-c-muted, #a7a093);
	--ry-m-gold: var(--ry-c-gold, #d4af37);
	--ry-m-ease: var(--ry-ease, cubic-bezier(.22, .61, .36, 1));
	margin: clamp(56px, 4vw + 32px, 96px) auto;
	padding: 0; /* the page container already has its side gutters */
	max-width: 1240px;
	box-sizing: border-box;
	container-type: inline-size; /* the gallery rows are sized from this width */
}
.ry-moments__inner {
	text-align: center;
}
.ry-moments .ry-moments__title {
	margin: 0;
	color: var(--ry-m-heading);
	font-family: var(--ry-font-display, "Playfair Display", Georgia, serif);
	font-weight: 500;
	letter-spacing: .01em;
}
.ry-moments .ry-moments__title::after { /* one short, thin gold line */
	content: "";
	display: block;
	width: 44px;
	height: 1px;
	margin: 18px auto 0;
	background: var(--ry-m-gold);
	opacity: .8;
}
.ry-moments .ry-moments__lead {
	margin: 16px auto clamp(28px, 2vw + 16px, 44px);
	max-width: 36em;
	color: var(--ry-m-muted);
	font-family: var(--ry-font-sans, Mulish, system-ui, sans-serif);
	font-size: var(--ry-fs-small, .9375rem);
	letter-spacing: .14em;
	text-transform: uppercase;
}
.ry-moments__note {
	margin: 0 auto 24px;
	padding: 10px 14px;
	max-width: 52em;
	border: 1px dashed rgba(255, 255, 255, .25);
	border-radius: 8px;
	color: var(--ry-m-muted);
	font-size: 14px;
	text-align: left;
}

/* the gallery: phones first (2 columns = 4 half-column tracks) */
.ry-moments .ry-moments__grid.ry-moments__grid { /* doubled class: wins over the theme's list indents */
	--g: 12px;
	--cols: 2;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: calc((100cqi - (var(--cols) - 1) * var(--g)) / var(--cols) * 4 / 3); /* a column's width x 4/3 */
	gap: var(--g);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ry-moments .ry-moments__grid .ry-moments__item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	grid-column: var(--mc) / span var(--mw);
	grid-row: var(--mr) / span var(--mh);
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
}
.ry-moments .ry-moments__grid .ry-moments__item::before,
.ry-moments .ry-moments__grid .ry-moments__item::marker {
	content: none;
}
.ry-moments__link { /* fills its slot; the photo inside is fitted to it */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	line-height: 0;
	cursor: zoom-in;
}
.ry-moments__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 16px 36px -22px rgba(0, 0, 0, .95);
	transition: transform .5s var(--ry-m-ease), box-shadow .5s var(--ry-m-ease), filter .5s var(--ry-m-ease);
}
@media (hover: hover) {
	.ry-moments__link:hover .ry-moments__img {
		transform: translateY(-3px);
		box-shadow: 0 1px 0 rgba(255, 255, 255, .05), 0 24px 44px -24px rgba(0, 0, 0, 1);
		filter: brightness(1.03);
	}
}
.ry-moments__link:focus-visible {
	outline: none;
}
.ry-moments__link:focus-visible .ry-moments__img {
	outline: 2px solid var(--ry-m-heading);
	outline-offset: 3px;
}
.ry-moments__item--waiting .ry-moments__img {
	opacity: .45;
}
.ry-moments__badge {
	position: absolute;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	padding: 4px 8px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	font-size: 11px;
	line-height: 1.3;
	white-space: nowrap;
}
@media (min-width: 768px) {
	.ry-moments .ry-moments__grid.ry-moments__grid { --g: 20px; --cols: 4; grid-template-columns: repeat(8, minmax(0, 1fr)); }
	.ry-moments .ry-moments__grid .ry-moments__item {
		grid-column: var(--dc) / span var(--dw);
		grid-row: var(--dr) / span var(--dh);
	}
}
@media (prefers-reduced-motion: reduce) {
	.ry-moments__img { transition: none; }
	.ry-moments__link:hover .ry-moments__img { transform: none; }
}

/* the enlarged viewer */
.ry-moments-dialog {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(8, 8, 7, .96); /* the viewer covers the page itself (a theme may style ::backdrop lighter) */
	color: #f6f2ea;
	overflow: hidden;
}
.ry-moments-dialog::backdrop {
	background: rgba(8, 8, 7, .93);
}
.ry-moments-dialog__stage {
	position: absolute;
	inset: 64px 76px 56px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ry-moments-dialog__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
	transition: opacity .25s ease;
}
.ry-moments-dialog__img.is-loading {
	opacity: .2;
}
.ry-moments-dialog__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(246, 242, 234, .35);
	border-radius: 50%;
	background: rgba(15, 15, 13, .6);
	color: #f6f2ea;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.ry-moments-dialog__btn svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 1.6;
	fill: none;
}
.ry-moments-dialog__btn:hover,
.ry-moments-dialog__btn:focus-visible {
	background: #f6f2ea;
	border-color: #f6f2ea;
	color: #15130e;
	outline: none;
}
.ry-moments-dialog__close { top: 12px; right: 12px; }
.ry-moments-dialog__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.ry-moments-dialog__next { right: 14px; top: 50%; transform: translateY(-50%); }
.ry-moments-dialog__count {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	margin: 0;
	color: #a7a093;
	font-family: var(--ry-font-sans, Mulish, system-ui, sans-serif);
	font-size: 13px;
	letter-spacing: .2em;
	text-align: center;
}
@media (max-width: 640px) {
	.ry-moments-dialog__stage { inset: 64px 10px 76px; }
	.ry-moments-dialog__prev, .ry-moments-dialog__next { top: auto; bottom: 10px; transform: none; }
	.ry-moments-dialog__prev { left: 16px; }
	.ry-moments-dialog__next { right: 16px; }
	.ry-moments-dialog__count { bottom: 26px; }
}
