/**
 * Feeling For You – Poem Manager
 * Image-only lightbox stylesheet.
 */

.ffy-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(10, 6, 10, 0.82);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ffy-lightbox-overlay[hidden] {
	display: none;
}

.ffy-lightbox-overlay.is-open {
	opacity: 1;
}

.ffy-lightbox {
	--ffy-primary: #E91E63;
	--ffy-secondary: #FF5E8A;
	--ffy-accent: #FF8FAB;

	position: relative;
	width: 100%;
	height: 100%;
	max-width: 1400px;
	max-height: 92vh;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0.94);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
	outline: none;
}

.ffy-lightbox-overlay.is-open .ffy-lightbox {
	transform: scale(1);
	opacity: 1;
}

.ffy-lightbox__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 6;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	transition: transform 0.25s ease, background 0.25s ease;
}

.ffy-lightbox__close:hover {
	transform: rotate(90deg) scale(1.08);
	background: var(--ffy-primary);
	border-color: var(--ffy-primary);
}

.ffy-lightbox__toolbar {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 999px;
	background: rgba(20, 12, 18, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.ffy-lightbox__btn {
	min-width: 40px;
	height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	border: none;
	background: linear-gradient(135deg, var(--ffy-primary), var(--ffy-secondary));
	color: #fff;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
	box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
}

.ffy-lightbox__btn--reset {
	padding: 0 18px;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.14);
	box-shadow: none;
}

.ffy-lightbox__btn:hover:not(:disabled) {
	transform: translateY(-2px) scale(1.05);
	filter: brightness(1.08);
}

.ffy-lightbox__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	transform: none;
}

.ffy-lightbox__viewport {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
	cursor: zoom-in;
}

.ffy-lightbox__viewport.is-zoomed {
	cursor: grab;
}

.ffy-lightbox__viewport.is-dragging {
	cursor: grabbing;
}

.ffy-lightbox__image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	user-select: none;
	-webkit-user-select: none;
	-webkit-user-drag: none;
	transform-origin: center center;
	will-change: transform;
	border-radius: 8px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.ffy-lightbox__viewport:not(.is-dragging) .ffy-lightbox__image {
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ffy-lightbox__viewport.is-dragging .ffy-lightbox__image {
	transition: none;
}

/* Responsive */
@media (max-width: 782px) {
	.ffy-lightbox-overlay {
		padding: 0;
	}

	.ffy-lightbox {
		max-width: 100%;
		max-height: 100%;
	}

	.ffy-lightbox__close {
		top: 12px;
		right: 12px;
	}

	.ffy-lightbox__toolbar {
		bottom: 24px;
	}
}

@media (max-width: 480px) {
	.ffy-lightbox__btn {
		min-width: 36px;
		height: 36px;
		padding: 0 12px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffy-lightbox-overlay,
	.ffy-lightbox,
	.ffy-lightbox__image {
		transition: none !important;
	}
}
