/* ==========================================================================
   Site Notice Bar — v1.2.0
   Custom notification bar replacing Peanut Butter Bar plugin.
   Color scheme: Blueberry (hardcoded).
   ========================================================================== */

.asn-bar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 100%;
	min-height: 35px;
	padding: 8px 50px;
	font-size: 16px;
	text-align: center;
	background-color: #c5d2f5;
	box-sizing: border-box;
}

/* Shift down when WP admin bar is present */
.admin-bar .asn-bar {
	top: 32px;
}

/* Push Divi's fixed header down by the bar height.
   Targets both classic Divi (#main-header) and Theme Builder (.et-l--header). */
.asn-bar-visible #main-header,
.asn-bar-visible #top-header,
.asn-bar-visible .et-l--header {
	top: var(--asn-bar-height, 46px) !important;
}

.admin-bar.asn-bar-visible #main-header,
.admin-bar.asn-bar-visible #top-header,
.logged-in.admin-bar.asn-bar-visible .et-l--header {
	top: calc(32px + var(--asn-bar-height, 46px)) !important;
}

/* Push page content down so it's not hidden behind the bar + header */
.asn-bar-visible #page-container,
.asn-bar-visible .et-l--body {
	padding-top: var(--asn-bar-height, 46px) !important;
}

.asn-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
}

.asn-bar__text {
	color: #111;
	line-height: 1.4;
}

/* Inline link (default) */
.asn-bar .asn-link {
	color: #111;
	text-decoration: underline;
}

.asn-bar .asn-link:hover {
	opacity: 0.85;
}

/* Button-style link */
.asn-bar .asn-link--button {
	display: inline-block;
	padding: 2px 8px;
	margin: 0 5px;
	color: #222;
	text-decoration: none;
	background: linear-gradient(to bottom, #eee 0%, #fff 100%);
	border: 1px solid #ccc;
	border-radius: 7px;
	cursor: pointer;
}

.asn-bar .asn-link--button:hover {
	background: linear-gradient(to bottom, #fff 0%, #eeeddd 100%);
}

/* Close button */
.asn-bar__close {
	position: absolute;
	top: 50%;
	right: 15px;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	font-size: 20px;
	line-height: 28px;
	color: #111;
	background: none;
	border: none;
	cursor: pointer;
	opacity: 0.8;
}

.asn-bar__close:hover {
	opacity: 1;
}

/* Hidden state (set by JS) */
.asn-bar--hidden {
	display: none;
}

/* Mobile adjustments */
@media (max-width: 782px) {
	.admin-bar .asn-bar {
		top: 46px;
	}

	.admin-bar.asn-bar-visible #main-header,
	.admin-bar.asn-bar-visible #top-header,
	.logged-in.admin-bar.asn-bar-visible .et-l--header {
		top: calc(46px + var(--asn-bar-height, 46px)) !important;
	}

	.asn-bar {
		padding: 8px 35px 8px 10px;
		font-size: 14px;
	}

	.asn-bar__close {
		right: 5px;
	}
}
