/* ==========================================================================
   BT Popup System — Frontend Styles
   Optimized: ~4 KB, critical inline
   ========================================================================== */

.bt-popup {
	position: fixed;
	z-index: 999999;
	display: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.bt-popup.is-open {
	display: flex;
	opacity: 1;
	pointer-events: auto;
}

/* Overlay */
.bt-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 1;
}
.bt-popup-overlay-blur {
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	background: rgba(15, 23, 42, var(--bt-overlay-opacity, 0.75));
}
.bt-popup-overlay-dark {
	background: rgba(0, 0, 0, var(--bt-overlay-opacity, 0.75));
}
.bt-popup-overlay-light {
	background: rgba(255, 255, 255, var(--bt-overlay-opacity, 0.85));
}
.bt-popup-overlay-none {
	background: transparent;
	pointer-events: auto;
}

/* Panel */
.bt-popup-panel {
	position: relative;
	z-index: 2;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 32px;
	max-width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	color: #111827;
	font-family: inherit;
}

/* Position — Center */
.bt-popup-center {
	align-items: center;
	justify-content: center;
	padding: 20px;
	inset: 0;
}
.bt-popup-center .bt-popup-panel { width: 100%; }

/* Size */
.bt-popup-size-small .bt-popup-panel { max-width: 400px; }
.bt-popup-size-medium .bt-popup-panel { max-width: 600px; }
.bt-popup-size-large .bt-popup-panel { max-width: 800px; }

/* Position — Top Bar */
.bt-popup-top_bar {
	top: 0;
	left: 0;
	right: 0;
	display: none;
	padding: 0;
}
.bt-popup-top_bar.is-open { display: block; }
.bt-popup-top_bar .bt-popup-panel {
	border-radius: 0;
	padding: 16px 24px;
	max-width: 100%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.bt-popup-top_bar .bt-popup-close {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

/* Position — Bottom Bar */
.bt-popup-bottom_bar {
	bottom: 0;
	left: 0;
	right: 0;
	display: none;
	padding: 0;
}
.bt-popup-bottom_bar.is-open { display: block; }
.bt-popup-bottom_bar .bt-popup-panel {
	border-radius: 0;
	padding: 16px 24px;
	max-width: 100%;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.bt-popup-bottom_bar .bt-popup-close {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

/* Position — Bottom Right */
.bt-popup-bottom_right {
	bottom: 24px;
	right: 24px;
	display: none;
}
.bt-popup-bottom_right.is-open { display: block; }
.bt-popup-bottom_right .bt-popup-panel {
	max-width: 380px;
	padding: 24px;
}

/* Close button */
.bt-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #6b7280;
	transition: all 0.15s;
	z-index: 3;
	padding: 0;
	line-height: 1;
}
.bt-popup-close:hover {
	background: #fef2f2;
	color: #dc2626;
	border-color: #fecaca;
	transform: rotate(90deg);
}

/* Content */
.bt-popup-content {
	font-size: 15px;
	line-height: 1.7;
	color: #374151;
	margin-bottom: 20px;
}
.bt-popup-content h1,
.bt-popup-content h2,
.bt-popup-content h3 {
	margin-top: 0;
	color: #111827;
}
.bt-popup-content p { margin: 0 0 12px; }
.bt-popup-content p:last-child { margin-bottom: 0; }
.bt-popup-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Actions */
.bt-popup-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}
.bt-popup-cta,
.bt-popup-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 24px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s;
	border: none;
	line-height: 1;
	flex: 1;
	min-width: 120px;
}
.bt-popup-cta {
	background: var(--bt-primary, #1677FF);
	color: #ffffff;
}
.bt-popup-cta:hover {
	background: var(--bt-primary, #1677FF);
	filter: brightness(0.9);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.bt-popup-secondary {
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #e5e7eb;
}
.bt-popup-secondary:hover {
	background: #e5e7eb;
	color: #111827;
}

/* Animations */
.bt-popup-anim-fade.is-open { animation: btPopupFade 0.25s ease; }
@keyframes btPopupFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.bt-popup-anim-zoom.is-open .bt-popup-panel {
	animation: btPopupZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes btPopupZoom {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

.bt-popup-anim-slide_bottom.is-open .bt-popup-panel {
	animation: btPopupSlideBottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes btPopupSlideBottom {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: translateY(0); }
}

.bt-popup-anim-slide_top.is-open .bt-popup-panel {
	animation: btPopupSlideTop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes btPopupSlideTop {
	from { opacity: 0; transform: translateY(-40px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Body scroll lock */
body.bt-popup-locked { overflow: hidden; }

/* Mobile */
@media (max-width: 640px) {
	.bt-popup-center {
		padding: 12px;
	}
	.bt-popup-panel {
		padding: 22px;
		border-radius: 14px;
		max-height: 85vh;
	}
	.bt-popup-actions {
		flex-direction: column;
	}
	.bt-popup-cta,
	.bt-popup-secondary {
		width: 100%;
	}
	.bt-popup-bottom_right {
		left: 12px;
		right: 12px;
		bottom: 12px;
	}
	.bt-popup-bottom_right .bt-popup-panel {
		max-width: 100%;
	}
	.bt-popup-close {
		width: 30px;
		height: 30px;
		top: 10px;
		right: 10px;
	}
}
/* ==========================================================================
   BT Popup System — Frontend Styles
   ========================================================================== */

.bt-popup {
	position: fixed;
	z-index: 999999;
	display: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.bt-popup.is-open {
	display: flex;
	opacity: 1;
	pointer-events: auto;
}

/* Closing state for smooth close */
.bt-popup.is-closing {
	opacity: 0;
	pointer-events: none;
}

.bt-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 1;
}
.bt-popup-overlay-blur {
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	background: rgba(15, 23, 42, var(--bt-overlay-opacity, 0.75));
}
.bt-popup-overlay-dark {
	background: rgba(0, 0, 0, var(--bt-overlay-opacity, 0.75));
}
.bt-popup-overlay-light {
	background: rgba(255, 255, 255, var(--bt-overlay-opacity, 0.85));
}
.bt-popup-overlay-none {
	background: transparent;
	pointer-events: auto;
}

.bt-popup-panel {
	position: relative;
	z-index: 2;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 32px;
	max-width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	color: #111827;
	font-family: inherit;
}

.bt-popup-center {
	align-items: center;
	justify-content: center;
	padding: 20px;
	inset: 0;
}
.bt-popup-center .bt-popup-panel { width: 100%; }

.bt-popup-size-small .bt-popup-panel { max-width: 400px; }
.bt-popup-size-medium .bt-popup-panel { max-width: 600px; }
.bt-popup-size-large .bt-popup-panel { max-width: 800px; }

.bt-popup-top_bar {
	top: 0;
	left: 0;
	right: 0;
	padding: 0;
}
.bt-popup-top_bar.is-open { display: block; }
.bt-popup-top_bar .bt-popup-panel {
	border-radius: 0;
	padding: 16px 24px;
	max-width: 100%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.bt-popup-top_bar .bt-popup-close {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

.bt-popup-bottom_bar {
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0;
}
.bt-popup-bottom_bar.is-open { display: block; }
.bt-popup-bottom_bar .bt-popup-panel {
	border-radius: 0;
	padding: 16px 24px;
	max-width: 100%;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.bt-popup-bottom_bar .bt-popup-close {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

.bt-popup-bottom_right {
	bottom: 24px;
	right: 24px;
}
.bt-popup-bottom_right.is-open { display: block; }
.bt-popup-bottom_right .bt-popup-panel {
	max-width: 380px;
	padding: 24px;
}

.bt-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #6b7280;
	transition: all 0.15s;
	z-index: 3;
	padding: 0;
	line-height: 1;
}
.bt-popup-close:hover {
	background: #fef2f2;
	color: #dc2626;
	border-color: #fecaca;
	transform: rotate(90deg);
}

.bt-popup-content {
	font-size: 15px;
	line-height: 1.7;
	color: #374151;
	margin-bottom: 20px;
}
.bt-popup-content h1,
.bt-popup-content h2,
.bt-popup-content h3 {
	margin-top: 0;
	color: #111827;
}
.bt-popup-content p { margin: 0 0 12px; }
.bt-popup-content p:last-child { margin-bottom: 0; }
.bt-popup-content img { max-width: 100%; height: auto; border-radius: 8px; }

.bt-popup-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}
.bt-popup-cta,
.bt-popup-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 24px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s;
	border: none;
	line-height: 1;
	flex: 1;
	min-width: 120px;
}
.bt-popup-cta {
	background: var(--bt-primary, #1677FF);
	color: #ffffff;
}
.bt-popup-cta:hover {
	background: var(--bt-primary, #1677FF);
	filter: brightness(0.9);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.bt-popup-secondary {
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #e5e7eb;
}
.bt-popup-secondary:hover {
	background: #e5e7eb;
	color: #111827;
}

/* Animations */
.bt-popup-anim-fade.is-open { animation: btPopupFade 0.25s ease; }
@keyframes btPopupFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.bt-popup-anim-zoom.is-open .bt-popup-panel {
	animation: btPopupZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes btPopupZoom {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

.bt-popup-anim-slide_bottom.is-open .bt-popup-panel {
	animation: btPopupSlideBottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes btPopupSlideBottom {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: translateY(0); }
}

.bt-popup-anim-slide_top.is-open .bt-popup-panel {
	animation: btPopupSlideTop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes btPopupSlideTop {
	from { opacity: 0; transform: translateY(-40px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Body scroll lock */
body.bt-popup-locked { overflow: hidden; }

/* Mobile */
@media (max-width: 640px) {
	.bt-popup-center { padding: 12px; }
	.bt-popup-panel { padding: 22px; border-radius: 14px; max-height: 85vh; }
	.bt-popup-actions { flex-direction: column; }
	.bt-popup-cta,
	.bt-popup-secondary { width: 100%; }
	.bt-popup-bottom_right { left: 12px; right: 12px; bottom: 12px; }
	.bt-popup-bottom_right .bt-popup-panel { max-width: 100%; }
	.bt-popup-close { width: 30px; height: 30px; top: 10px; right: 10px; }
}

/* Trigger button (shortcode) */
.bt-popup-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background: #1677FF;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.15s;
	text-decoration: none;
}
.bt-popup-trigger:hover {
	background: #0958d9;
	color: #fff;
	transform: translateY(-1px);
}