/*
 * SB Lightbox - site-wide custom image lightbox.
 * Replaces the Simple Lightbox plugin. Triggered by .sb-lightbox class
 * on either an <a> or <img>. Modal markup lives in footer.php; click
 * handler in assets/js/sb-lightbox.js. Enqueued from functions.php.
 */

.sb-lightbox-modal {
	display: none;
	position: fixed;
	z-index: 99999;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background: rgba(0, 0, 0, 0.9);
	justify-content: center;
	align-items: center;
	padding: 40px 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.18s ease;
}
.sb-lightbox-modal.sb-lightbox-active {
	display: flex;
	opacity: 1;
}
.sb-lightbox-content {
	position: relative;
	max-width: 95vw;
	max-height: 95vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
}
.sb-lightbox-img {
	max-width: 100%;
	max-height: calc(95vh - 60px);
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	/* White background so transparent PNGs render against white instead of
	   bleeding through to the dark overlay. Padding gives the image a small
	   frame; border-radius softens the corners. */
	background: #ffffff;
	padding: 16px;
	box-sizing: border-box;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	border-radius: 4px;
}
.sb-lightbox-caption {
	color: rgba(255, 255, 255, 0.92);
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	max-width: 800px;
	padding: 0 8px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.sb-lightbox-caption:empty { display: none; }
.sb-lightbox-close {
	position: absolute;
	top: 14px;
	right: 18px;
	width: 44px;
	height: 44px;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	font-weight: 300;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.3);
	border: none;
	padding: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	z-index: 100000;
}
.sb-lightbox-close:hover,
.sb-lightbox-close:focus { background: rgba(0, 0, 0, 0.6); outline: none; }
a.sb-lightbox { display: inline-block; }
a.sb-lightbox img,
img.sb-lightbox { cursor: zoom-in; }
body.sb-lightbox-open { overflow: hidden; }
