/* Sahithi Foundation Auto Image Popup */
.sfap-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.68);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .22s ease, visibility .22s ease;
	box-sizing: border-box;
}

.sfap-overlay.sfap-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.sfap-modal {
	position: relative;
	display: inline-flex;
	max-width: min(92vw, 850px);
	max-height: 92vh;
	padding: 0;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 14px 45px rgba(0, 0, 0, .24);
	overflow: hidden;
	transform: translateY(8px) scale(.985);
	transition: transform .22s ease;
	box-sizing: border-box;
}

.sfap-overlay.sfap-open .sfap-modal {
	transform: translateY(0) scale(1);
}

.sfap-image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 92vh;
	object-fit: contain;
	border-radius: 14px;
}

.sfap-close {
	position: absolute;
	top: 9px;
	right: 9px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .68);
	color: #fff;
	font-size: 28px;
	font-weight: 400;
	line-height: 34px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.22);
	transition: background .15s ease, transform .15s ease;
}

.sfap-close:hover {
	background: rgba(0, 0, 0, .85);
	transform: scale(1.05);
}

.sfap-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

body.sfap-lock-scroll {
	overflow: hidden;
}

@media (max-width: 767px) {
	.sfap-overlay {
		padding: 14px;
	}

	.sfap-modal {
		max-width: 94vw;
		max-height: 88vh;
		border-radius: 10px;
	}

	.sfap-image {
		max-width: 94vw;
		max-height: 88vh;
		border-radius: 10px;
	}

	.sfap-close {
		top: 7px;
		right: 7px;
		width: 32px;
		height: 32px;
		font-size: 24px;
		line-height: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sfap-overlay,
	.sfap-modal {
		transition: none;
	}
}
