.fl-popup {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

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

.fl-popup.is-open {
	display: flex;
}

.fl-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
}

.fl-popup__panel {
	position: relative;
	width: min(100%, 30rem);
	max-height: calc(100vh - 2.5rem);
	overflow: auto;
	background: #fff;
	border: solid 1px #eee;
	border-radius: 1rem;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
	padding: 2rem 1.75rem 1.75rem;
	animation: fl-popup-enter 0.25s ease-out;
}

.fl-popup__panel--has-banner {
	padding: 0;
}

.fl-popup__banner {
	overflow: hidden;
	border-radius: 1rem 1rem 0 0;
}

.fl-popup__banner-image {
	display: block;
	width: 100%;
	height: 7rem;
	object-fit: cover;
	object-position: center;
}

.fl-popup__panel--has-banner .fl-popup__content {
	padding: 1.125rem 1.375rem 1.25rem;
}

.fl-popup__panel--has-banner .fl-popup__close {
	top: 0.625rem;
	right: 0.625rem;
}

@keyframes fl-popup-enter {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.fl-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.42);
	backdrop-filter: blur(12px) saturate(160%);
	-webkit-backdrop-filter: blur(12px) saturate(160%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.65),
		0 4px 14px rgba(2, 3, 38, 0.12);
	color: var(--color-primary, #020326);
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.fl-popup__close:hover {
	background: rgba(255, 255, 255, 0.58);
	border-color: rgba(255, 255, 255, 0.75);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.8),
		0 6px 18px rgba(2, 3, 38, 0.16);
}

.fl-popup__close:active {
	transform: scale(0.96);
}

.fl-popup__title {
	margin: 0 0 0.375rem;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--color-primary, #020326);
}

.fl-popup__description {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--color-second-text-grey, #747688);
}

.fl-popup__benefits {
	margin: 0 0 0.875rem;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.4375rem;
}

.fl-popup__benefit {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fl-popup__benefit-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.625rem;
	height: 1.625rem;
	border-radius: 5px;
	background: rgba(15, 157, 99, 0.12);
	color: #0f9d63;
}

.fl-popup__benefit-text {
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--color-primary, #020326);
}

.fl-popup__lucide {
	display: block;
}

.fl-popup__field {
	margin-bottom: 0.625rem;
}

.fl-popup__field--text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fl-popup__label {
	display: block;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--color-primary, #020326);
}

.fl-popup__control {
	min-width: 0;
}

.fl-popup .fl-popup__input[type="email"],
.fl-popup .fl-popup__input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid #eeeeee !important;
	border-radius: 6px !important;
	background: #f7f7f7;
	color: var(--color-primary, #020326);
	font-size: 13px;
	line-height: 1.4;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.fl-popup__input::placeholder {
	color: var(--color-second-text-grey, #6f6f6f);
}

.fl-popup .fl-popup__input[type="email"]:hover,
.fl-popup .fl-popup__input:hover {
	border-color: #d4d4d4 !important;
	background: #f3f3f3;
}

.fl-popup .fl-popup__input[type="email"]:focus,
.fl-popup .fl-popup__input:focus {
	outline: none;
	border-color: rgba(15, 157, 99, 0.65) !important;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(15, 157, 99, 0.14);
}

.fl-popup__field--checkbox {
	margin-bottom: 0.75rem;
}

.fl-popup__checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.75rem;
	line-height: 1.35;
	color: var(--color-second-text-grey, #747688);
	cursor: pointer;
}

.fl-popup__checkbox-label input {
	margin-top: 0.15rem;
	flex-shrink: 0;
	accent-color: var(--color-accent, #29eb94);
}

.fl-popup__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.fl-popup__feedback {
	margin: 0 0 0.625rem;
	font-size: 0.8125rem;
	line-height: 1.35;
}

.fl-popup__feedback.is-error {
	color: #b91c1c;
}

.fl-popup__feedback.is-success {
	color: #15803d;
}

.fl-popup__actions {
	display: flex;
	justify-content: flex-start;
}

.fl-popup__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 8rem;
	padding: 0.5625rem 1.125rem;
	border: 0;
	border-radius: 6px;
	background: var(--color-primary, #020326);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.fl-popup__submit:hover:not(:disabled) {
	background: #0c0f42;
}

.fl-popup__submit:active:not(:disabled) {
	transform: translateY(1px);
}

.fl-popup__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

body.fl-popup-open {
	overflow: hidden;
}

body.fl-popup-preview::before {
	content: 'Preview pop-up';
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	z-index: 99999;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.85);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	pointer-events: none;
}

@media (max-width: 480px) {
	.fl-popup__panel:not(.fl-popup__panel--has-banner) {
		padding: 1.5rem 1.25rem 1.25rem;
	}

	.fl-popup__panel--has-banner .fl-popup__content {
		padding: 1rem 1.125rem 1.125rem;
	}

	.fl-popup__banner-image {
		height: 6rem;
	}

	.fl-popup__title {
		font-size: 1.125rem;
	}
}
