/**
 * Front-end Stylesheet for Premium Announcement Bars
 */

.pab-announcement-bar {
	width: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	box-sizing: border-box;
	transition: transform 0.3s ease, opacity 0.3s ease;
	opacity: 1;
}

.pab-announcement-bar.pab-position-top {
	position: relative;
	top: 0;
}

.pab-announcement-bar.pab-position-bottom {
	position: fixed;
	bottom: 0;
	left: 0;
}

/* Offsets for Logged-in WordPress Users (Admin Bar) */
body.admin-bar .pab-announcement-bar.pab-position-top {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .pab-announcement-bar.pab-position-top {
		top: 46px;
	}
}

/* Container */
.pab-announcement-bar .pab-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 40px 10px 20px;
	box-sizing: border-box;
}

.pab-content-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	text-align: center;
	width: 100%;
}

.pab-text {
	font-weight: 500;
	line-height: 1.4;
}

/* HTML format styling support inside bar text */
.pab-text b, .pab-text strong {
	font-weight: 700;
}
.pab-text i, .pab-text em {
	font-style: italic;
}
.pab-text u {
	text-decoration: underline;
}

/* CTA Button */
.pab-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 700;
	transition: transform 0.2s ease, filter 0.2s ease;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Button Sizes */
.pab-btn-small { padding: 6px 14px; font-size: 11px; }
.pab-btn-medium { padding: 8px 20px; font-size: 13px; }
.pab-btn-large { padding: 12px 28px; font-size: 16px; }
.pab-btn-xlarge { padding: 16px 36px; font-size: 18px; }

/* Loading Spinner Animation */
.pab-btn-loading {
	pointer-events: none;
	opacity: 0.9;
}

.pab-btn-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: pabSpinner 0.7s linear infinite;
	margin-left: 8px;
}

.pab-btn-loading .pab-btn-spinner {
	display: inline-block;
}

@keyframes pabSpinner {
	to { transform: rotate(360deg); }
}

.pab-button:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

.pab-button:active {
	transform: translateY(0);
}

/* Close/Dismiss Button */
.pab-close {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 22px;
	font-weight: 300;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	transition: opacity 0.2s ease;
	opacity: 0.7;
	outline: none;
}

.pab-close:hover {
	opacity: 1;
}

/* Device Visibility Utilities */
@media screen and (min-width: 769px) {
	.pab-hide-desktop {
		display: none !important;
	}
}

@media screen and (max-width: 768px) {
	.pab-hide-mobile {
		display: none !important;
	}
	.pab-content-wrapper {
		gap: 10px;
	}
	/* Mobile Button Sizes */
	.pab-btn-small { padding: 4px 10px; font-size: 10px; }
	.pab-btn-medium { padding: 6px 14px; font-size: 11px; }
	.pab-btn-large { padding: 10px 20px; font-size: 14px; }
	.pab-btn-xlarge { padding: 12px 24px; font-size: 16px; }
}

/* Attention animations keyframes */
@keyframes pab-tada {
	from { transform: scale3d(1, 1, 1); }
	10%, 20% { transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); }
	30%, 50%, 70%, 90% { transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); }
	40%, 60%, 80% { transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); }
	to { transform: scale3d(1, 1, 1); }
}

.pab-effect-tada .pab-button {
	animation: pab-tada 1s infinite alternate;
}

@keyframes pab-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

.pab-effect-pulse .pab-button {
	animation: pab-pulse 1.5s infinite ease-in-out;
}

@keyframes pab-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

.pab-effect-bounce .pab-button {
	animation: pab-bounce 1.2s infinite ease-in-out;
}

/* WACRM Modal Styles */
.pab-modal {
	display: none;
	position: fixed;
	z-index: 999999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.6);
}

.pab-modal-content {
	background-color: #fff;
	margin: 5% auto;
	padding: 24px;
	border-radius: 8px;
	width: 90%;
	max-width: 600px;
	position: relative;
	box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.pab-modal-close {
	position: absolute;
	right: 15px;
	top: 10px;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	color: #666;
	line-height: 1;
}

.pab-modal-close:hover {
	color: #000;
}

.pab-modal-body {
	margin-top: 20px;
}
