.kby-popup {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.kby-popup[hidden] {
	display: none !important;
}

.kby-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(40, 37, 32, 0.45);
}

.kby-popup__dialog {
	position: relative;
	width: min(480px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	outline: none;
}

.kby-popup__card {
	position: relative;
	background: #fffdf8;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(40, 37, 32, 0.18);
	animation: kby-popup-in 0.28s ease;
}

.kby-popup__card::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(90deg, #b2d235 0%, #ea0b8c 100%);
}

@keyframes kby-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.kby-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: #f3f0e8;
	color: #282520;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.kby-popup__close:hover,
.kby-popup__close:focus-visible {
	background: #e8e3d6;
	color: #282520;
}

.kby-popup__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 240px;
	object-fit: cover;
}

.kby-popup__header {
	padding: 18px 48px 0 24px;
	background: transparent;
}

.kby-popup__header h2 {
	margin: 0;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	color: #282520;
}

.kby-popup__body {
	background: transparent;
	padding: 12px 24px 26px;
	color: #282520;
	font-size: 16px;
	line-height: 1.55;
	font-weight: 500;
}

.kby-popup__header + .kby-popup__body {
	padding-top: 10px;
}

.kby-popup__body > *:first-child {
	margin-top: 0;
}

.kby-popup__body > *:last-child {
	margin-bottom: 0;
}

.kby-popup__body p,
.kby-popup__body li {
	color: #3a372f;
}

.kby-popup__body a {
	color: #b00868;
}

.kby-popup__cta {
	display: inline-block;
	margin-top: 18px;
	padding: 11px 24px;
	border-radius: 999px;
	background: #b2d235;
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.kby-popup__cta:hover,
.kby-popup__cta:focus-visible {
	background: #9fbd2a;
	color: #fff !important;
}

@media (max-width: 575.98px) {
	.kby-popup__header {
		padding: 16px 44px 0 18px;
	}

	.kby-popup__header h2 {
		font-size: 20px;
	}

	.kby-popup__body {
		padding: 10px 18px 22px;
		font-size: 15px;
	}

	.kby-popup__media img {
		max-height: 180px;
	}
}

body.kby-popup-open {
	overflow: hidden;
}
