.yfn-fc-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(30, 36, 26, 0.72);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	box-sizing: border-box;
}

.yfn-fc-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.yfn-fc-dialog {
	position: relative;
	width: 100%;
	max-width: 960px;
	transform: translateY(16px) scale(0.97);
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.yfn-fc-overlay.is-open .yfn-fc-dialog {
	transform: translateY(0) scale(1);
}

.yfn-fc-link {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	outline-offset: 4px;
}

.yfn-fc-link:focus-visible {
	outline: 3px solid #ffffff;
}

.yfn-fc-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 48px);
	object-fit: contain;
	transition: transform 0.4s ease;
}

.yfn-fc-link:hover .yfn-fc-img {
	transform: scale(1.01);
}

.yfn-fc-close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #ffffff;
	color: #4a5a3c;
	font-size: 26px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.yfn-fc-close:hover,
.yfn-fc-close:focus-visible {
	background: #4a5a3c;
	color: #ffffff;
	transform: rotate(90deg);
	outline: none;
}

/* Safety net: never display on phones, even if the script runs. */
@media (max-width: 767px) {
	.yfn-fc-overlay {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yfn-fc-overlay,
	.yfn-fc-dialog,
	.yfn-fc-img,
	.yfn-fc-close {
		transition: none;
	}
}
