/* ==========================================================================
   Announcement Bar — location hours, phone, delivery
   ========================================================================== */

.announcement-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--wp--preset--color--red);
	color: #fff;
	font-family: var(--wp--preset--font-family--md-nichrome);
	font-size: 22px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	height: 64px;
	padding: 0 3rem 0 1rem;
	line-height: 1;
}

.announcement-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2.5rem;
	flex-wrap: nowrap;
}

.announcement-bar__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
}

.announcement-bar__item a {
	color: inherit;
	text-decoration: none;
}

.announcement-bar__item a:hover {
	text-decoration: underline;
}

.announcement-bar__item svg {
	flex-shrink: 0;
}

.announcement-bar__close {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 0;
	line-height: 0;
}

.announcement-bar__close:hover {
	opacity: 0.7;
}

/* Invert when mega menu is open */
body:has(.nav-overlay.is-open) .announcement-bar {
	background-color: #fff;
	color: var(--wp--preset--color--red);
}

body:has(.nav-overlay.is-open) .announcement-bar__close {
	color: var(--wp--preset--color--red);
}

/* Offset for WP admin bar */
.admin-bar .announcement-bar {
	top: 32px;
}

/* Push page content down to make room for the fixed bar */
body:has(.announcement-bar:not(.is-hidden)) {
	padding-top: 84px;
}

@media (max-width: 768px) {
	.announcement-bar {
		font-size: 18px;
	}

	.announcement-bar__inner {
		justify-content: center;
		min-height: 1.2em;
	}

	.announcement-bar__item {
		white-space: nowrap;
	}
}

/* When bar is dismissed */
.announcement-bar.is-hidden {
	display: none;
}
