/**
 * TimeTide Accessibility Suite — styles
 * v1.0.0
 *
 * Covers: link underlines, global focus indicators, input contrast, skip link,
 * sr-only helper, and the video pause/play control.
 */

/* ===================================================================== */
/* A. LINK UNDERLINES (SC 1.4.1 — Use of Colour)                         */
/*                                                                       */
/* Every text link on the site is underlined EXCEPT the primary navbar.  */
/* The JS tags every eligible link with .tt-ul so the rule is precise    */
/* and never touches the header menu, buttons or icon-only links.        */
/* ===================================================================== */
a.tt-ul,
a.tt-ul:link,
a.tt-ul:visited {
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.18em !important;
	text-decoration-skip-ink: auto !important;
}

/* Thicken on hover/focus so the affordance strengthens rather than
   disappears (some Divi themes remove the underline on hover). */
a.tt-ul:hover,
a.tt-ul:focus,
a.tt-ul:active {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
}

/* The underline must not be inherited by an icon or image sitting inside
   a text link. */
a.tt-ul img,
a.tt-ul svg,
a.tt-ul .et-pb-icon {
	text-decoration: none !important;
}

/* ===================================================================== */
/* B. VISIBLE FOCUS INDICATOR (SC 2.4.7, 2.4.11)                         */
/*                                                                       */
/* The theme sets `outline: none` on every interactive element, so       */
/* keyboard users get no focus indicator at all. This restores one       */
/* globally with a two-tone ring that stays visible on both the light    */
/* and the dark sections of the page.                                    */
/* ===================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible {
	outline: 3px solid #1a4fd6 !important;
	outline-offset: 2px !important;
	/* White halo keeps the ring visible against the dark hero/footer. */
	box-shadow: 0 0 0 5px #ffffff !important;
	border-radius: 2px;
}

/* Fallback for browsers without :focus-visible support. */
a:focus,
button:focus,
[role="button"]:focus,
[tabindex]:focus {
	outline: 3px solid #1a4fd6;
	outline-offset: 2px;
}

/* Inverted ring where the background is already light — avoids the white
   halo washing out on white sections. */
#main-footer a:focus-visible,
.et-l--footer a:focus-visible,
.et_pb_section_video_bg a:focus-visible,
.et_pb_section_video_bg button:focus-visible {
	box-shadow: 0 0 0 5px rgba( 0, 0, 0, 0.65 ) !important;
}

/* ===================================================================== */
/* C. Form control contrast (SC 1.4.11)                                  */
/* #595959 on #ffffff ~= 7:1, comfortably above the 3:1 requirement.     */
/* ===================================================================== */
.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-tel,
.wpcf7-form-control.wpcf7-email,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-select {
	border: 1px solid #595959 !important;
}

.wpcf7-form-control.wpcf7-text:focus,
.wpcf7-form-control.wpcf7-tel:focus,
.wpcf7-form-control.wpcf7-email:focus,
.wpcf7-form-control.wpcf7-textarea:focus,
.wpcf7-form-control.wpcf7-select:focus {
	border-color: #1a4fd6 !important;
}

/* ===================================================================== */
/* D. Skip to main content link (SC 2.4.1)                               */
/* ===================================================================== */
.tt-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 12px 20px;
	background: #ffffff;
	color: #0a1a4f;
	font: 600 16px/1.2 sans-serif;
	text-decoration: underline;
	border: 2px solid #0a1a4f;
	border-radius: 0 0 6px 0;
}

.tt-skip-link:focus,
.tt-skip-link:focus-visible {
	left: 0;
	outline: 3px solid #1a4fd6;
	outline-offset: 2px;
}

/* Never draw a focus ring on the programmatic skip-link target. */
#main-content:focus,
[role="main"]:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* ===================================================================== */
/* E. FAQ toggle buttons (SC 1.3.1, 2.1.1)                               */
/*                                                                       */
/* The toggle title stays a real <h5>; a transparent <button> inside it  */
/* carries the interaction. Reset the UA button styling so the visual    */
/* design is unchanged.                                                  */
/* ===================================================================== */
.tt-toggle-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	text-align: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	cursor: pointer;
}

.et_pb_toggle_title {
	cursor: pointer;
}

/* ===================================================================== */
/* F. Visually-hidden helper (screen-reader-only content)                */
/* ===================================================================== */
.tt-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect( 0, 0, 0, 0 ) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ===================================================================== */
/* G. Video pause/play control (SC 2.2.2)                                */
/*                                                                       */
/* Anchored bottom-RIGHT: the bottom-left corner is occupied by the      */
/* third-party accessibility widget and the two controls overlapped.     */
/* ===================================================================== */
.tt-video-pause-btn {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 50;
	min-width: 88px;
	min-height: 44px;
	padding: 8px 14px;
	background: rgba( 10, 26, 79, 0.9 );
	color: #ffffff;
	font: 600 14px/1 sans-serif;
	border: 2px solid #ffffff;
	border-radius: 6px;
	cursor: pointer;
}

.tt-video-pause-btn:hover {
	background: rgba( 10, 26, 79, 1 );
}

/* ===================================================================== */
/* H. Respect reduced-motion preference (SC 2.3.3)                       */
/* ===================================================================== */
@media ( prefers-reduced-motion: reduce ) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
