/*
 * a11y.css: WCAG 2.2 AA fixes layered on the converted design. Each rule
 * names the success criterion it addresses. Colors were darkened only as
 * far as the contrast minimum requires, keeping the original hue.
 * Review: docs/accessibility-review.md.
 */

/* 2.4.7 Focus Visible: one clear indicator for every keyboard stop. */
:focus-visible {
	outline: 2px solid #077cbf;
	outline-offset: 2px;
}
.top-bar__menu a:focus-visible,
.footer-button:focus-visible,
.act-elbtn .wp-block-button__link:focus-visible,
.gform_wrapper .gform_footer .gform_button:focus-visible,
.mobile-nav__menu a:focus-visible {
	outline: 2px solid #04295c;
	outline-offset: 2px;
}
.mobile-nav__menu a:focus-visible {
	outline-color: #fff;
	outline-offset: -4px;
}
a:focus:not(:focus-visible) {
	outline: 0;
}

/* 2.4.11 Focus Not Obscured: keep focused items clear of the sticky bar. */
html {
	scroll-padding-top: 140px;
}

/* 2.4.1 Bypass Blocks: the skip target takes focus without an outline box. */
#ndic-content:focus {
	outline: 0;
}

/* 1.4.3 Contrast: green buttons (were #61ce70, 2.0:1 with white). */
.act-elbtn .wp-block-button__link,
.act-elbtn .wp-block-button__link:visited,
.footer-button,
.footer-button:visited {
	background-color: #2a8737;
}

/* 1.4.3 Contrast: blue on the footer's gray (#077cbf was 4.0:1). */
.site-footer a:not(.footer-button),
.footer-nav__menu .current-menu-item > a {
	color: #0774b3;
}

/* 1.4.3 Contrast: testimonial job titles (#9b9b9b was 2.8:1). */
.act-testimonial__title {
	color: #767676;
}

/* 1.4.3 Contrast: WooCommerce prices (#958e09 was 3.4:1). */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: #7f7908;
}

/* 1.4.11 Non-text Contrast: form field borders (#c5c5c5 was 1.7:1). */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea,
.gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) {
	border-color: #949494;
}

/* 1.4.11 + 2.5.8: carousel arrows were near-white; dots were 6px targets at
   an 18px pitch. Dots keep their 6px look inside 24px buttons. */
.act-testimonials .act-tcar__arrow,
.act-testimonials .act-tcar__arrow:hover,
.act-testimonials .act-tcar__arrow:focus {
	color: #767676;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
}
.act-testimonials .act-tcar__dot,
.act-testimonials .act-tcar__dot:hover,
.act-testimonials .act-tcar__dot:focus {
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0;
	background: transparent;
	opacity: 1;
	vertical-align: middle;
}
.act-testimonials .act-tcar__dot::before {
	content: "";
	position: absolute;
	left: 9px;
	top: 9px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #000;
	opacity: 0.45;
}
.act-testimonials .act-tcar__dot[aria-current="true"]::before {
	opacity: 1;
}
.act-tcar__dots {
	line-height: 24px;
	bottom: 5px;
}

/* 1.4.1 Use of Color: links inside running text are underlined. */
.entry-content :is(p, li, td) a:not(.button):not(.wp-block-button__link):not(nav a),
.act-text p a:not(.wp-block-button__link),
.woocommerce-MyAccount-content p a,
.site-credit a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* 1.3.1 / 3.3.2: Contact form labels were display:none; keep them for
   assistive tech without changing the placeholder-led design. */
#gform_wrapper_2 .gfield_label,
#gform_wrapper_2 .gform-field-label,
#gform_wrapper_2 label {
	display: block;
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* 1.4.10 Reflow at 320px: long single words in big headings, and the
   Turnstile widget (300px minimum) inside the padded home contact card. */
@media (max-width: 359px) {
	.act-sec h1 {
		font-size: 24px;
		overflow-wrap: anywhere;
	}
	#contact-me .act-col {
		padding-left: 10px !important;
		padding-right: 10px !important;
	}
}
.act-turnstile {
	max-width: 100%;
}

/* 2.5.8 Target Size: WooCommerce's show-password eye button was 22px. */
.show-password-input {
	min-width: 24px;
	min-height: 24px;
}

/* 1.3.1 / 2.4.6: page title kept for screen readers on pages whose content
   has no h1 (the old theme hid it with display:none everywhere). */
.page-header.page-header--sr {
	display: block;
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* 1.4.3: links on WooCommerce's striped table rows (#077cbf on #f8f9fa was 4.3:1). */
.woocommerce table.shop_table a,
.woocommerce-orders-table a {
	color: #0774b3;
}
.woocommerce table.shop_table a.button,
.woocommerce-orders-table a.button {
	color: #04295c;
}

/* 2.5.8: LearnDash breadcrumb links were 22px tall. Inline padding grows
   the hit area without moving anything (display is left to LearnDash, which
   hides the breadcrumbs in some layouts). */
.ld-breadcrumbs__link {
	padding-block: 2px;
}
