/*
 * Accessibility (WCAG 2.1 AA). Loaded site-wide by inc/a11y.php.
 */

/* ---------------------------------------------------------------------
 * Screen-reader-only text (same pattern as WordPress core)
 * ------------------------------------------------------------------ */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------------------------------------------------------------------
 * Skip link (2.4.1): off-screen until focused
 * ------------------------------------------------------------------ */

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2147483647;
	padding: 12px 18px;
	background: #f5ba02;
	color: #000;
	font-weight: 700;
	text-decoration: none;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
	outline: 3px solid #000;
	outline-offset: 2px;
}

#main-content:focus {
	outline: none;
}

/* ---------------------------------------------------------------------
 * Focus indicators (2.4.7)
 *
 * Only for keyboard focus (:focus-visible), so mouse clicks look as they
 * did. Black instead of yellow where the background is yellow.
 * ------------------------------------------------------------------ */

:focus-visible {
	outline: 3px solid #f5ba02;
	outline-offset: 2px;
}

.top-marquee-bar :focus-visible,
.reels-plus-logo:focus-visible,
.fixed-footer :focus-visible,
.hero-btn:focus-visible,
#quick-zip-button:focus-visible {
	outline-color: #000;
}

/* The compiled CSS removes outlines from these outright. */
.header__search-btn:focus-visible,
.header__search-form__input:focus-visible,
select[timezone-select]:focus-visible {
	outline: 3px solid #f5ba02 !important;
	outline-offset: 2px;
}

/*
 * Schedule row titles sit in an overflow-hidden ellipsis heading that clips
 * an outline, so ring the whole row header instead.
 */
.archive-event__toggle:focus-visible {
	outline: none;
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.archive-event__tab-head-wrapper:has(.archive-event__toggle:focus-visible) {
	outline: 3px solid #f5ba02;
	outline-offset: -3px;
}

/* The logo link collapses to 0x0 around its image, so ring the image. */
.header__logo a:focus-visible {
	outline: none;
}

.header__logo a:focus-visible img {
	outline: 3px solid #f5ba02;
	outline-offset: 4px;
}

/* ---------------------------------------------------------------------
 * Top marquee (2.2.2): pause control, pause on focus, reduced motion
 * ------------------------------------------------------------------ */

.top-marquee-bar {
	position: relative;
}

.marquee-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	/* 28px hit area around a small glyph */
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	opacity: 0.6;
	transition: opacity 0.2s;
}

.marquee-toggle:hover,
.marquee-toggle:focus-visible {
	opacity: 1;
}

.marquee-toggle[hidden] {
	display: none;
}

/* Pause glyph: two bars */
.marquee-toggle__icon {
	width: 9px;
	height: 11px;
	border-left: 3px solid #000;
	border-right: 3px solid #000;
	box-sizing: border-box;
}

/* Play glyph: triangle */
.top-marquee-bar.is-paused .marquee-toggle__icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent #000;
	margin-left: 2px;
}

/* Keep scrolling text and the arrows clear of the button. */
.top-marquee-bar .marquee,
.top-marquee-bar .marquee-carousel {
	padding-right: 40px;
	box-sizing: border-box;
}

.top-marquee-bar.is-paused .marquee-track,
.top-marquee-bar .marquee:focus-within .marquee-track {
	animation-play-state: paused !important;
}

/* 2.5.8 target size */
.marquee-carousel__btn {
	min-width: 24px;
	min-height: 24px;
}

/*
 * Long messages pushed the message box wider than its flex slot, so the
 * text ran over the next arrow and covered its hit area. Let the box shrink
 * and clip the link itself with an ellipsis. (display: block here stops the
 * text painting at all; inline-block works.)
 */
.marquee-carousel__msg {
	min-width: 0;
}

.marquee-carousel__msg a {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: top;
}

@media (prefers-reduced-motion: reduce) {
	.marquee-track {
		animation-play-state: paused !important;
	}

	.loader-icon {
		animation: none !important;
	}
}

/* ---------------------------------------------------------------------
 * Modals: the close control is now a real <button>; keep the old look.
 * ------------------------------------------------------------------ */

.modal .modal-header button.close {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	line-height: inherit;
}

/* ---------------------------------------------------------------------
 * Hero video pause control (2.2.2), added by a11y.js on video slides
 * ------------------------------------------------------------------ */

.hero-video-toggle {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 5;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-video-toggle__icon {
	width: 14px;
	height: 14px;
	border-left: 4px solid #fff;
	border-right: 4px solid #fff;
	box-sizing: border-box;
}

.hero-video-toggle[aria-pressed="true"] .hero-video-toggle__icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 8px 0 8px 13px;
	border-color: transparent transparent transparent #fff;
	margin-left: 4px;
}
