/**
 * OAS Commerce — announcement bar above the site header: the landlord and bulk
 * line and the warranty line. Reads the theme's brand tokens (--oas-*), with
 * fallbacks so it still renders under another theme.
 *
 * @author Selman Selman @ Engineered Leads
 */

.oasc-announce { background: var(--oas-dark, #1a1a1a); color: var(--oas-white, #fff); font-size: .88rem; line-height: 1.35; }
.oasc-announce__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem 1.5rem; max-width: 1160px; margin: 0 auto; padding: .55rem 16px; text-align: center; }
.oasc-announce__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem .6rem; margin: 0; }
.oasc-announce--both .oasc-announce__item--warranty { padding-left: 1.5rem; border-left: 1px solid rgba(255, 255, 255, .25); }
.oasc-announce .oasc-trust-icon { flex: none; width: 18px; height: 18px; color: color-mix(in srgb, var(--oas-primary, #c8102e) 55%, var(--oas-white, #fff)); }
.oasc-announce__text { font-weight: 700; }
.oasc-announce__link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.oasc-announce__call { color: color-mix(in srgb, var(--oas-primary, #c8102e) 35%, var(--oas-white, #fff)); }
.oasc-announce__link:hover { color: color-mix(in srgb, var(--oas-primary, #c8102e) 45%, var(--oas-white, #fff)); }
.oasc-announce__link:focus-visible { outline: 2px solid var(--oas-white, #fff); outline-offset: 2px; }

/* Wide screens with both lines and too little room: stack them. */
@media (max-width: 1099px) {
	.oasc-announce--both .oasc-announce__item--warranty { padding-left: 0; border-left: 0; }
}

/* Phones: one flowing line of text; with both lines, they take turns. */
@media (max-width: 599px) {
	.oasc-announce { font-size: .8rem; }
	.oasc-announce__inner { display: block; padding: .45rem 16px; }
	.oasc-announce__item { display: block; }
	.oasc-announce .oasc-trust-icon { display: none; }
	.oasc-announce__link { margin-left: .35rem; }

	.oasc-announce--both .oasc-announce__inner { display: grid; }
	.oasc-announce--both .oasc-announce__item { grid-area: 1 / 1; animation: oasc-announce-turn 12s infinite; }
	.oasc-announce--both .oasc-announce__item--warranty { animation-delay: -6s; }
}

@keyframes oasc-announce-turn {
	0%, 45% { opacity: 1; visibility: visible; }
	50%, 95% { opacity: 0; visibility: hidden; }
	100% { opacity: 1; visibility: visible; }
}

/* No turning for people who asked for less motion: the landlord line stays. */
@media (max-width: 599px) and (prefers-reduced-motion: reduce) {
	.oasc-announce--both .oasc-announce__item { animation: none; }
	.oasc-announce--both .oasc-announce__item--warranty { display: none; }
}
