/* PopKit frontend styles — lightweight, zero CLS (popups are position:fixed). */

.popkit {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.popkit-hidden {
	display: none;
}

.popkit-visible .popkit__panel,
.popkit-visible .popkit__overlay {
	pointer-events: auto;
}

.popkit__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 15, 15, 0.6);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.popkit-visible .popkit__overlay {
	opacity: 1;
}

.popkit__panel {
	position: relative;
	background: #fff;
	color: #1f1f1f;
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	padding: 32px;
	width: calc(100% - 32px);
	max-width: 520px;
	max-height: calc(100vh - 48px);
	overflow: auto;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.popkit-visible .popkit__panel {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.popkit__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.popkit__close:hover {
	background: rgba(0, 0, 0, 0.12);
}

.popkit__close:focus-visible,
.popkit__panel a:focus-visible,
.popkit__panel button:focus-visible,
.popkit__panel input:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.popkit__sr-title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Slide-in ---- */

.popkit--slidein {
	align-items: flex-end;
	justify-content: flex-end;
	padding: 24px;
}

.popkit--slidein .popkit__overlay {
	display: none;
}

.popkit--slidein .popkit__panel {
	max-width: 380px;
	transform: translateX(24px);
}

.popkit--slidein.popkit-visible .popkit__panel {
	transform: translateX(0);
}

/* ---- Sticky bars ---- */

.popkit--bar_top,
.popkit--bar_bottom {
	align-items: flex-start;
	justify-content: stretch;
}

.popkit--bar_bottom {
	align-items: flex-end;
}

.popkit--bar_top .popkit__overlay,
.popkit--bar_bottom .popkit__overlay {
	display: none;
}

.popkit--bar_top .popkit__panel,
.popkit--bar_bottom .popkit__panel {
	width: 100%;
	max-width: none;
	border-radius: 0;
	padding: 12px 48px 12px 16px;
	transform: translateY(-100%);
}

.popkit--bar_bottom .popkit__panel {
	transform: translateY(100%);
}

.popkit--bar_top.popkit-visible .popkit__panel,
.popkit--bar_bottom.popkit-visible .popkit__panel {
	transform: translateY(0);
}

/* ---- Welcome mat ---- */

.popkit--welcome_mat .popkit__panel {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

/* ---- WhatsApp popup ---- */

.popkit--whatsapp {
	align-items: flex-end;
	justify-content: flex-end;
	padding: 24px;
}

.popkit--whatsapp .popkit__overlay {
	display: none;
}

.popkit--whatsapp .popkit__panel {
	max-width: 340px;
	transform: translateY(24px);
}

.popkit--whatsapp.popkit-visible .popkit__panel {
	transform: translateY(0);
}

.popkit__wa-btn {
	display: block;
	margin-top: 12px;
	padding: 12px 20px;
	border-radius: 999px;
	background: #25d366;
	color: #fff !important;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
}

.popkit__wa-btn:hover {
	background: #1ebe5b;
}

/* ---- Toast ---- */

.popkit--toast {
	align-items: flex-end;
	justify-content: flex-start;
	padding: 24px;
}

.popkit--toast .popkit__overlay {
	display: none;
}

.popkit--toast .popkit__panel {
	max-width: 320px;
	padding: 16px 44px 16px 16px;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transform: translateY(16px);
}

.popkit--toast.popkit-visible .popkit__panel {
	transform: translateY(0);
}

/* ---- Spin-to-Win ---- */

.popkit--spin .popkit__panel {
	max-width: 420px;
	text-align: center;
}

.popkit__spin {
	margin-top: 8px;
}

.popkit__wheel-wrap {
	position: relative;
	width: 260px;
	height: 260px;
	margin: 0 auto 16px;
}

.popkit__wheel {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 6px solid #1f1f1f;
	position: relative;
	overflow: hidden;
}

.popkit__wheel-label {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -40px;
	width: 80px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	transform-origin: center;
	pointer-events: none;
}

.popkit__wheel-pointer {
	position: absolute;
	top: -14px;
	left: 50%;
	margin-left: -12px;
	width: 0;
	height: 0;
	border-left: 12px solid transparent;
	border-right: 12px solid transparent;
	border-top: 18px solid #1f1f1f;
	z-index: 2;
}

.popkit__spin-btn {
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: #6c5ce7;
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
}

.popkit__spin-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.popkit__spin-result {
	min-height: 24px;
	margin-top: 12px;
	font-weight: 700;
}

/* ---- Content: no stray gaps around background blocks ---- */

.popkit__content > :first-child {
	margin-block-start: 0;
}

.popkit__content > :last-child {
	margin-block-end: 0;
}

.popkit__content .has-background {
	box-sizing: border-box;
}

/* ---- Utility ---- */

body.popkit-no-scroll {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.popkit__panel,
	.popkit__overlay,
	.popkit__wheel {
		transition: none !important;
	}
}

@media (max-width: 480px) {
	.popkit__panel {
		padding: 24px 20px;
	}

	.popkit__wheel-wrap {
		width: 220px;
		height: 220px;
	}
}
