/* Sanctoria lightbox (shared by Gallery and Portfolio Grid). */
.sce-lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(8, 10, 16, .96);
	color: #fff;
}
/* Above the sticky header (100000), mega menu, off-canvas menu (100001) and the admin bar (99999). The
   dialog uses the top layer when showModal() is available; the fixed position and z-index cover the rest. */
dialog.sce-lightbox[open] { position: fixed; inset: 0; z-index: var(--sce-z-lightbox, 1000000); display: block; overflow: hidden; }
.sce-lightbox::backdrop { background: rgba(8, 10, 16, .96); }
.sce-lightbox__frame { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; box-sizing: border-box; padding: 64px 72px; touch-action: pan-y pinch-zoom; }
.sce-lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; margin: 0; }
.sce-lightbox__img { display: block; max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.sce-lightbox__caption { max-width: 70ch; color: rgba(255, 255, 255, .9); text-align: center; }
.sce-lightbox__caption[hidden] { display: none; }
.sce-lightbox__count { position: absolute; top: 18px; inset-inline-start: 22px; margin: 0; color: rgba(255, 255, 255, .8); font-size: .9rem; font-variant-numeric: tabular-nums; }
.sce-lightbox__btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.sce-lightbox__btn:hover, .sce-lightbox__btn:focus-visible { background: rgba(255, 255, 255, .2); }
.sce-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sce-lightbox__btn[hidden] { display: none; }
.sce-lightbox__prev { top: 50%; inset-inline-start: 14px; transform: translateY(-50%); }
.sce-lightbox__next { top: 50%; inset-inline-end: 14px; transform: translateY(-50%); }
[dir="rtl"] .sce-lightbox__prev span, [dir="rtl"] .sce-lightbox__next span { display: inline-block; transform: scaleX(-1); }
.sce-lightbox__close { top: 12px; inset-inline-end: 14px; }
html.sce-lightbox-open { overflow: hidden; }
html.sce-lightbox-open body { padding-inline-end: var(--sce-scrollbar-gap, 0); }
html.sce-lightbox-open { overscroll-behavior: none; }
@media (max-width: 767px) {
	.sce-lightbox__frame { padding: 60px 12px 80px; }
	.sce-lightbox__prev, .sce-lightbox__next { top: auto; bottom: 16px; transform: none; }
}
.sce-lightbox[open] .sce-lightbox__img { animation: sce-lb-in .25s ease-out; }
@keyframes sce-lb-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.sce-lightbox__title { position: absolute; top: 18px; inset-inline-start: 50%; max-width: 50vw; margin: 0; transform: translateX(-50%); color: #fff; font-size: 1rem; font-weight: 600; line-height: 1.35; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir="rtl"] .sce-lightbox__title { transform: translateX(50%); }
.sce-lightbox__title:empty { display: none; }
dialog.sce-lightbox a.sce-lightbox__title-link { color: inherit; text-decoration: none; text-underline-offset: .2em; }
dialog.sce-lightbox a.sce-lightbox__title-link:hover, dialog.sce-lightbox a.sce-lightbox__title-link:focus-visible { color: inherit; text-decoration: underline; }
dialog.sce-lightbox a.sce-lightbox__title-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }
/* Optional "View details" link to the project page. */
dialog.sce-lightbox a.sce-lightbox__details { position: absolute; bottom: 18px; inset-inline-end: 22px; display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 18px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font-family: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none; box-shadow: none; }
dialog.sce-lightbox a.sce-lightbox__details:hover, dialog.sce-lightbox a.sce-lightbox__details:focus-visible { background: rgba(255, 255, 255, .2); color: #fff; text-decoration: underline; }
dialog.sce-lightbox a.sce-lightbox__details:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
dialog.sce-lightbox a.sce-lightbox__details[hidden] { display: none; }
/* Scoped resets: theme and kit button styles (backgrounds, shadows, padding, text transforms) must not leak into the viewer. */
dialog.sce-lightbox button.sce-lightbox__btn { box-sizing: border-box; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(255, 255, 255, .08); background-image: none; box-shadow: none; color: #fff; font-family: inherit; font-size: 28px; font-weight: 400; letter-spacing: normal; line-height: 1; text-shadow: none; text-transform: none; text-decoration: none; transition: background-color .15s ease; }
dialog.sce-lightbox button.sce-lightbox__btn:hover, dialog.sce-lightbox button.sce-lightbox__btn:focus, dialog.sce-lightbox button.sce-lightbox__btn:focus-visible, dialog.sce-lightbox button.sce-lightbox__btn:active { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .2); background-image: none; box-shadow: none; color: #fff; }
dialog.sce-lightbox button.sce-lightbox__btn:focus:not(:focus-visible) { outline: none; }
dialog.sce-lightbox button.sce-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
dialog.sce-lightbox button.sce-lightbox__btn[hidden] { display: none; }
@media (max-width: 767px) {
	/* Phones: the title wraps over the full width instead of being cut at 50vw. */
	.sce-lightbox__title, [dir="rtl"] .sce-lightbox__title { top: 16px; inset-inline: 16px 72px; max-width: none; transform: none; white-space: normal; overflow: visible; text-overflow: clip; text-align: start; overflow-wrap: anywhere; }
	.sce-lightbox__count { top: auto; bottom: 30px; inset-inline-start: 50%; transform: translateX(-50%); }
	[dir="rtl"] .sce-lightbox__count { transform: translateX(50%); }
	.sce-lightbox__frame { padding-top: 84px; }
	dialog.sce-lightbox a.sce-lightbox__details { bottom: 76px; inset-inline-end: 50%; transform: translateX(50%); }
	[dir="rtl"] dialog.sce-lightbox a.sce-lightbox__details { transform: translateX(-50%); }
	.sce-lightbox__img { max-height: calc(100vh - 200px); }
}
@media (prefers-reduced-motion: reduce) { dialog.sce-lightbox button.sce-lightbox__btn { transition: none; } }
@media (prefers-reduced-motion: reduce) { .sce-lightbox[open] .sce-lightbox__img { animation: none; } }
@media (forced-colors: active) { dialog.sce-lightbox button.sce-lightbox__btn, dialog.sce-lightbox a.sce-lightbox__details { border-color: ButtonText; } }
