/**
 * Dates Store announcement bar.
 *
 * Rendered site-wide via wp_body_open (see functions.php), so it must NOT rely
 * on homepage.css being present. Every palette token therefore uses a var()
 * fallback so the bar looks correct on all templates (front page or not).
 *
 * All rules are scoped under .dh-announcement-bar.
 */
.dh-announcement-bar {
	background-color: var(--dh-dark, #3E2A20);
	color: #FBF5EC;
	font-size: 14px;
	line-height: 1.4;
	position: relative;
	z-index: 5;
}

.dh-announcement-bar[hidden] {
	display: none;
}

.dh-announcement-bar__inner {
	max-width: var(--dh-container-wide, 1530px);
	margin-inline: auto;
	min-height: 44px;
	padding: 8px 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	flex-wrap: wrap;
}

.dh-announcement-bar__content {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.dh-announcement-bar__message {
	margin: 0;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.dh-announcement-bar__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--dh-rating, #E8A33D);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.dh-announcement-bar__link:hover,
.dh-announcement-bar__link:focus {
	color: #fff;
	text-decoration: underline;
}

.dh-announcement-bar__link svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* Countdown ------------------------------------------------------- */
.dh-announcement-bar__timer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.dh-countdown__item {
	min-width: 40px;
	padding: 2px 6px;
	text-align: center;
	border: 1px solid rgba(251, 245, 236, 0.28);
	border-radius: 5px;
	line-height: 1.15;
}

.dh-countdown__number {
	display: block;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.dh-countdown__text {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	opacity: 0.8;
}

/* Close button ---------------------------------------------------- */
.dh-announcement-bar__close {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.2s ease;
}

.dh-announcement-bar__close:hover,
.dh-announcement-bar__close:focus {
	opacity: 1;
}

.dh-announcement-bar__close svg {
	width: 16px;
	height: 16px;
	pointer-events: none;
}

/* Responsive: match Shopify behaviour (drop seconds, tighten gaps). */
@media only screen and (max-width: 749px) {
	.dh-announcement-bar__inner {
		gap: 10px;
		padding: 8px 40px;
	}

	.dh-announcement-bar__content {
		flex-wrap: wrap;
	}

	.dh-countdown__item {
		min-width: 34px;
	}

	.dh-announcement-bar__timer .dh-countdown__item.is-seconds {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dh-announcement-bar__close {
		transition: none;
	}
}
