/**
 * Pollux Labs Feedback Survey – popup / modal styles.
 *
 * Wraps the existing survey card in an overlay dialog. Depends on frontend.css
 * for the survey itself.
 */

.plfs-popup[hidden] {
	display: none;
}

.plfs-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow-y: auto;
}

.plfs-popup__overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 20, 35, 0.55);
	backdrop-filter: blur(2px);
}

.plfs-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	margin: auto;
	animation: plfs-popup-in 0.22s ease-out;
}

/* The survey card already styles itself; just neutralise its outer margin so
   it sits flush inside the dialog. */
.plfs-popup__dialog .plfs-survey {
	margin: 0;
	max-width: none;
}

.plfs-popup__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 1;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	color: var(--plfs-fg, #1f2330);
	background: var(--plfs-bg, #ffffff);
	border: 1px solid var(--plfs-border, #e2e6ee);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(20, 30, 60, 0.18);
	cursor: pointer;
	transition: transform 0.1s ease, filter 0.15s ease;
}

.plfs-popup__close:hover {
	filter: brightness(0.97);
}

.plfs-popup__close:active {
	transform: scale(0.94);
}

.plfs-popup__close:focus-visible {
	outline: 2px solid var(--plfs-accent, #2563eb);
	outline-offset: 2px;
}

/* Lock background scroll while the popup is open. */
body.plfs-popup-open {
	overflow: hidden;
}

@media (prefers-color-scheme: dark) {
	.plfs-popup__close {
		color: #e7eaf1;
		background: #1b1f2a;
		border-color: #2c3242;
	}
}

@keyframes plfs-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.plfs-popup__dialog {
		animation: none;
	}
}

@media (max-width: 480px) {
	.plfs-popup {
		padding: 0.5rem;
	}

	.plfs-popup__close {
		top: 6px;
		right: 6px;
	}
}
