/**
 * Announcement Bar — front-end styles.
 *
 * Colors and the per-instance rotation are driven from inline custom
 * properties set in PHP (--hab-bg, --hab-color). Height is a variable here so
 * it can be overridden by a theme if desired.
 */

.hab {
	--hab-height: 44px;
	width: 100%;
	background: var(--hab-bg, #111827);
	color: var(--hab-color, #ffffff);
	font-size: 15px;
	line-height: 1.4;
	position: relative;
	z-index: 100;
}

/* The viewport clips the filmstrip to a single announcement's height. */
.hab__viewport {
	height: var(--hab-height);
	overflow: hidden;
}

/* The filmstrip: items stacked vertically, translated up one slot at a time. */
.hab__track {
	display: flex;
	flex-direction: column;
	will-change: transform;
}

.hab__item {
	height: var(--hab-height);
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 0 16px;
	text-align: center;
}

.hab__text,
.hab__link {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hab__link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hab__link:hover,
.hab__link:focus {
	text-decoration: none;
}

/* Users who prefer reduced motion get hard cuts with no sliding animation. */
@media (prefers-reduced-motion: reduce) {
	.hab__track {
		transition: none !important;
	}
}
