/* Bungalow Promo Bar & Popup - Frontend styles */

/* ---------- Top Bar ---------- */
.bpbp-bar {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99998;
	width: 100%;
	box-sizing: border-box;
	font-size: 14px;
	line-height: 1.4;
	transition: transform 0.35s ease;
}

.bpbp-bar-top {
	top: 0;
	transform: translateY(-100%);
}

html.wp-toolbar .bpbp-bar-top {
	top: 32px;
}

@media screen and (max-width: 782px) {
	html.wp-toolbar .bpbp-bar-top {
		top: 46px;
	}
}

.bpbp-bar-top.bpbp-bar-visible {
	transform: translateY(0);
}

.bpbp-bar-bottom {
	bottom: 0;
	transform: translateY(100%);
}

.bpbp-bar-bottom.bpbp-bar-visible {
	transform: translateY(0);
}

.bpbp-bar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 40px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
}

.bpbp-bar-content p {
	margin: 0;
}

.bpbp-bar-button {
	display: inline-block;
	background: #fff;
	padding: 5px 16px;
	border-radius: 30px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.bpbp-bar-close {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	opacity: 0.8;
}

.bpbp-bar-close:hover {
	opacity: 1;
}

body.bpbp-bar-top-active {
	margin-top: var(--bpbp-bar-height, 0);
}

/* ---------- Popup ---------- */
.bpbp-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
}

.bpbp-popup-overlay.bpbp-popup-visible {
	opacity: 1;
	visibility: visible;
}

.bpbp-popup {
	position: relative;
	background: #fff;
	max-width: 480px;
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: scale(0.9);
	transition: transform 0.3s ease;
	max-height: 90vh;
	overflow-y: auto;
}

.bpbp-popup-overlay.bpbp-popup-visible .bpbp-popup {
	transform: scale(1);
}

.bpbp-popup-image img {
	display: block;
	width: 100%;
	height: auto;
}

.bpbp-popup-body {
	padding: 30px;
	text-align: center;
}

.bpbp-popup-title {
	margin: 0 0 12px;
	font-size: 22px;
}

.bpbp-popup-content {
	margin-bottom: 20px;
	font-size: 15px;
	line-height: 1.5;
}

.bpbp-popup-content p:last-child {
	margin-bottom: 0;
}

.bpbp-popup-button {
	display: inline-block;
	background: #111;
	color: #fff;
	padding: 12px 28px;
	border-radius: 30px;
	text-decoration: none;
	font-weight: 600;
}

.bpbp-popup-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #333;
	z-index: 1;
}

@media (max-width: 480px) {
	.bpbp-bar-inner {
		padding: 10px 34px;
	}
	.bpbp-popup-body {
		padding: 22px;
	}
}
