/* Millington Township accessibility fixes, loaded after the Wordbench theme CSS.
   Each rule notes the WCAG 2.2 success criterion it addresses. */

/* 1.4.1 Use of Color: links inside text are underlined, not only colored */
.post__content p a:not(.wp-element-button),
.post__content li:not([class]) > a,
.post__content td a,
.lsvr_document-attachments__item-link,
.post-attachments__item-link,
.widget_text p a,
.textwidget a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* 1.4.3 Contrast: calendar days without events were #acabaf (2.3:1) */
.lsvr_event-calendar-widget__day-cell,
.lsvr_event-calendar-widget__day-cell span {
	color: #6f6e74;
}

/* 2.5.8 Target Size (Minimum): small category tags get at least 24px of height */
.post__term-link {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
	padding-top: 0;
	padding-bottom: 0;
}

/* 2.4.11 Focus Not Obscured: keep focused items clear of the sticky header
   when the browser scrolls them into view */
@media (min-width: 1200px) {
	html { scroll-padding-top: 160px; }
}

/* 2.4.7 Focus Visible: a consistent, high-contrast focus ring everywhere,
   including dark sections, on top of the theme's own keyboard outline */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
	outline: 3px solid #1d1c21 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #ffffff !important;
}

/* Skip links: large enough to see and hit when they appear (2.4.1, 2.5.8) */
.accessibility-link:focus {
	padding: 12px 18px !important;
	z-index: 100000 !important;
	font-size: 1rem !important;
}

/* 2.3.3 / user preference: honor reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* 1.4.3 Contrast: calendar days from the previous/next month were #acabaf (2.3:1) */
.lsvr_event-calendar-widget__day--previous-month .lsvr_event-calendar-widget__day-cell,
.lsvr_event-calendar-widget__day--next-month .lsvr_event-calendar-widget__day-cell,
.lsvr_event-calendar-widget__day--previous-month .lsvr_event-calendar-widget__day-cell span,
.lsvr_event-calendar-widget__day--next-month .lsvr_event-calendar-widget__day-cell span {
	color: #6f6e74 !important;
}
.lsvr_event-calendar-widget__day--has-events.lsvr_event-calendar-widget__day--previous-month .lsvr_event-calendar-widget__day-cell,
.lsvr_event-calendar-widget__day--has-events.lsvr_event-calendar-widget__day--next-month .lsvr_event-calendar-widget__day-cell {
	color: #1e7f53 !important;
}

/* 1.4.3 Contrast: on the dark "Featured" panels the darker green is too dark (3.6:1);
   keep the original lighter green there (8.6:1 on #14161c) */
[class*="-featured-widget"] .widget__more-link,
[class*="-featured-widget"] .widget__more-link-label {
	color: #5dc996 !important;
}

/* 1.4.1 Use of Color: attachment links are underlined everywhere */
.post-attachments .post-attachments__item-link,
.lsvr_document-attachments .lsvr_document-attachments__item-link {
	text-decoration: underline !important;
}

/* 2.5.8 Target Size: file download links (File blocks) are at least 24px tall */
.wp-block-file > a:not(.wp-block-file__button) {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
}

/* ---- Pass 6 (live site, December 1, 2026) ---- */

/* 2.4.11 Focus Not Obscured: the sticky desktop header is 189-194px tall (with the notice bar),
   so 160px of scroll padding could leave a focused item partly under it */
@media (min-width: 1200px) {
	html { scroll-padding-top: 220px; }
}

/* 2.5.8 Target Size: controls that were under 24px tall. Padding is offset with a negative
   margin so the layout doesn't move. */
@media (min-width: 1200px) {
	.header-menu-primary__item-link--level-0 {
		padding-top: 2px;
		padding-bottom: 2px;
		margin-top: -2px;
		margin-bottom: -2px;
	}
}
.lsvr_event-post-archive .post-archive-filter__reset-button {
	min-height: 24px;
	padding-top: 4px;
	padding-bottom: 4px;
	margin-top: -4px;
	margin-bottom: -4px;
}
.lsvr_event-post-archive .post-archive-filter__input,
.lsvr_event-filter-widget__input {
	min-height: 24px;
}
.lsvr_document-attachments__item-toggle {
	width: 24px;
	height: 24px;
}

/* 3.3.2 Labels or Instructions: date format hint added to the filter labels */
.millington-format-hint {
	font-weight: normal;
}
.millington-format-note {
	margin: 0 0 10px;
	font-size: 0.875em;
}

/* 1.4.11 Non-text Contrast: form field edges were #e9e9ea on a #f4f3f6 page (1.1:1), so the
   fields couldn't be seen. #85848a is 3.4:1 against the page and 3.7:1 against the white field.
   Contact form fields, and the date boxes of the event filters (label + input + calendar icon). */
.wpcf7-form-control:not(.wpcf7-submit):not([type="checkbox"]):not([type="radio"]),
.lsvr_event-post-archive .post-archive-filter__option--datepicker,
.lsvr_event-filter-widget__option--datepicker {
	border-color: #85848a !important;
}

/* 2.5.8 Target Size: breadcrumb links were 16px tall, and on phones long trails wrap onto
   lines that sit too close together. Each crumb is now at least 24px tall. */
.breadcrumbs__link {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
}

/* ---- Pass 6, round 2 (reviewer findings) ---- */

/* 2.4.11 / 2.4.7: on desktop the sticky header collapses the top bar (office hours, phone,
   email, YouTube) to 0px after scrolling, but its links stay in the tab order. Open the bar
   again while one of its links has focus. */
.header__topbar--collapsed:focus-within {
	height: 33px;
}
.header--has-notice .header__topbar--collapsed:focus-within {
	height: 38px;
}

/* 2.5.8 Target Size: top-bar links shown inside the open mobile menu were 17px tall */
.header__navbar-menu .header-menu-secondary__item-link {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
}

/* 2.4.7 Focus Visible: the event calendar's "Skip calendar days" / "Back to calendar days"
   links are screen-reader text that stayed clipped when focused. Show them on focus. */
.lsvr_event-calendar-widget a.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none !important;
	position: absolute !important;
	z-index: 100;
	top: 0;
	left: 0;
	width: auto;
	height: auto;
	overflow: visible;
	padding: 8px 12px;
	background: #ffffff;
	color: #1d1c21;
	font-size: 0.875rem;
	text-decoration: underline;
	white-space: nowrap;
}
.lsvr_event-calendar-widget .widget__content,
.lsvr_event-calendar-widget__calendar {
	position: relative;
}

/* 1.4.3 Contrast (hover/focus): event days were #1e7f53 on the 10% green hover tint (4.37:1);
   #1a7049 is 5.3:1 there */
a.lsvr_event-calendar-widget__day-cell:hover,
a.lsvr_event-calendar-widget__day-cell:focus,
.lsvr_event-calendar-widget__day--has-events a.lsvr_event-calendar-widget__day-cell:hover,
.lsvr_event-calendar-widget__day--has-events a.lsvr_event-calendar-widget__day-cell:focus {
	color: #1a7049 !important;
}

/* 1.4.11 Non-text Contrast: the contact form's Submit button was light grey on light grey.
   Use the site's existing primary button style (blue #2e63f5, white text: 4.98:1;
   button edge against the #f4f3f6 page: 4.6:1). */
.wpcf7-form .wpcf7-submit {
	color: #ffffff;
	background-color: #2e63f5;
	border: 0;
	border-radius: 6px;
	padding: 15px 20px;
	font-size: 1rem;
	cursor: pointer;
}
.wpcf7-form .wpcf7-submit:hover {
	background-color: #2453d6;
}

/* 1.3.1 / 3.3.2: visible label for the home page search box (white on the green hero, 5:1) */
.lsvr-wordbench-hero__search-input-wrapper {
	position: relative;
}
.lsvr-wordbench-hero__search {
	padding-top: 26px;
}
.lsvr-wordbench-hero__search-input-label.millington-visible-label {
	position: absolute !important;
	bottom: 100%;
	left: 0;
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	overflow: visible;
	margin: 0 0 6px;
	color: #ffffff;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
}

/* 3.3.1 Error Identification: date filter error message */
.millington-field-error {
	display: block;
	margin: 6px 0 0;
	color: #b3261e;
	font-size: 0.875em;
	font-weight: 600;
}
.lsvr_event-calendar-widget a.screen-reader-text[id*="back-to-days"]:focus {
	top: auto;
	bottom: 0;
}
