/**
 * Behavior Automation Engine – Frontend Styles
 *
 * Styles for all client-side actions:
 *   • Popup / Modal overlay
 *   • Sticky top/bottom banner
 *   • Hidden content (to be revealed by rules)
 *
 * All styles are namespaced with .bae- to avoid conflicts.
 */

/* ── Hidden content (pre-rule reveal state) ───────────────────────────────── */
.bae-hidden-content,
.bae-hidden {
	display: none !important;
}

/* ── Popup Overlay ────────────────────────────────────────────────────────── */
.bae-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	opacity: 0;
	transition: opacity 0.3s ease;
	padding: 20px;
	box-sizing: border-box;
}

.bae-popup-overlay--visible {
	opacity: 1;
}

.bae-popup {
	background: #ffffff;
	border-radius: 12px;
	max-width: 480px;
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	position: relative;
	transform: translateY(20px);
	transition: transform 0.3s ease;
	overflow: hidden;
}

.bae-popup-overlay--visible .bae-popup {
	transform: translateY(0);
}

.bae-popup__close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #888;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 50%;
	transition: background 0.2s, color 0.2s;
}

.bae-popup__close:hover {
	background: #f3f4f6;
	color: #111;
}

.bae-popup__body {
	padding: 36px 32px 32px;
	text-align: center;
}

.bae-popup__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #1d2327;
	line-height: 1.3;
}

.bae-popup__msg {
	font-size: 15px;
	color: #555;
	line-height: 1.6;
	margin: 0 0 24px;
}

.bae-popup__btn {
	display: inline-block;
	background: #2271b1;
	color: #ffffff !important;
	text-decoration: none;
	padding: 12px 28px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	transition: background 0.2s;
}

.bae-popup__btn:hover {
	background: #135e96;
}

/* ── Banner ───────────────────────────────────────────────────────────────── */
.bae-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999998;
	background: #1d2327;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 14px 20px;
	font-size: 14px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	transform: translateY(-100%);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	flex-wrap: wrap;
}

.bae-banner--top    { top: 0; transform: translateY(-100%); }
.bae-banner--bottom { bottom: 0; transform: translateY(100%); }

.bae-banner--visible { transform: translateY(0); }

.bae-banner__msg {
	flex: 1;
	min-width: 200px;
}

.bae-banner__btn {
	background: #2271b1;
	color: #ffffff !important;
	text-decoration: none;
	padding: 7px 16px;
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.2s;
}

.bae-banner__btn:hover {
	background: #135e96;
}

.bae-banner__close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	font-size: 20px;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
	transition: color 0.2s;
	flex-shrink: 0;
}

.bae-banner__close:hover {
	color: #ffffff;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.bae-popup__body {
		padding: 28px 20px 24px;
	}

	.bae-popup__title {
		font-size: 18px;
	}

	.bae-banner {
		flex-direction: column;
		text-align: center;
		gap: 10px;
	}
}
