/**
 * WCAG 2.0 AA remediation.
 * Several rules override Additional CSS (Customizer) or Beaver Builder layout CSS,
 * which print after this file, so selectors carry extra specificity.
 */

/** Visually hidden, still read by screen readers (WordPress core pattern) **/
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

/**
 * Formidable's "hidden" label position (contact form Last name) uses
 * visibility: hidden, which hides the label from screen readers too.
 * Keep it invisible but readable, holding the space it had.
 */
.frm_hidden_container > .frm_primary_label {
	visibility: visible !important;
	opacity: 0;
}

/** Homepage hero rail: eyebrow text at 4.5:1 on #D22630, visible keyboard focus **/
.bf-hrail .bf-hrail-link .hr-eb {
	color: #FFF0F1 !important;
}
.bf-hrail .bf-hrail-link a:focus {
	outline: 3px solid #fff;
	outline-offset: -6px;
	background: rgba(0, 0, 0, .06);
}

/** Header search: dark text and placeholder on #F2F2F2, defined field edge **/
.header-search .fl-search-form .fl-form-field input[type=search] {
	color: #2C2C2C !important;
	border: 1px solid #949494 !important;
}
.header-search .fl-search-form .fl-form-field input[type=search]::placeholder {
	color: #666 !important;
	opacity: 1;
}

/**
 * Links inside body text: underline so they do not rely on colour alone (1.4.1).
 * Kept at low specificity so buttons, cards and rails that set their own
 * text-decoration (mostly in Additional CSS) keep their look.
 */
:where(.fl-page-content, .ld-focus-content) p a:where(:not(.fl-button, .button, .btn, .ld-button)),
:where(.fl-page-content, .ld-focus-content) :where(.fl-rich-text, .fl-post-content, .entry-content, .ld-tab-content, .tribe-events-single-event-description) :is(li, td, dd, blockquote) a:where(:not(.fl-button, .button, .btn, .ld-button)),
:where(.fl-page-content, .ld-focus-content) .page-links a,
:where(.fl-page-content) :is(.fl-post-meta, .fl-post-cats-tags) a:where(:not(.fl-button, .button, .btn)) {
	text-decoration: underline;
}
/* The Events Calendar removes the underline with .tribe-events-content a (0,1,1) */
.tribe-events-content :is(p, li, td, dd, blockquote):not([class]) a:not([class]) {
	text-decoration: underline;
}
.tribe-events-content :is(p, li, td, dd, blockquote):not([class]) a:not([class]):is(:hover, :focus) {
	color: #17808D;
	text-decoration-color: #17808D;
}
/* LearnDash removes link underlines inside .learndash-wrapper with a (0,5,1) selector */
.learndash-wrapper :is(.ld-focus-content, .ld-tab-content) :is(p, li, td, dd, blockquote) a:not(.ld-button):not(.button):not(.btn),
.learndash-wrapper .ld-focus-content .page-links a:not(.ld-button):not(.button):not(.btn) {
	text-decoration: underline;
}

/**
 * Hover and focus on links in running text keep the underline and turn text
 * and underline #17808D (4.66:1 on white). Beaver Builder drops the underline
 * with .fl-module-content a:hover (0,2,1).
 * Only plain links count: no class, inside an unclassed paragraph, list item,
 * table cell or quote, outside nav, cards and the 2026 homepage blocks
 * (bf26-*).
 * Buttons, cards and rails (classed links or paragraphs) keep their own hover.
 * Rows and columns with their own link colours (.u7-own-link-color, set in
 * functions/accessibility.php) keep them: #17808D on the red rows is 1.3:1.
 * style.css forces red on rich text paragraph links with !important, hence the
 * last rule.
 */
:is(.fl-page-content, .ld-focus-content) :is(p, li, td, th, dd, blockquote):not([class]) a:not([class]):not(nav a, [class*="bf26-"] a, [class*="card"] a):is(:hover, :focus),
:is(.fl-page-content, .ld-focus-content) .page-links a:is(:hover, :focus),
.fl-page-content :is(.fl-post-meta, .fl-post-cats-tags) a:not([class]):is(:hover, :focus),
.learndash-wrapper :is(.ld-focus-content, .ld-tab-content) :is(p, li, td, dd, blockquote):not([class]) a:not([class]):is(:hover, :focus) {
	text-decoration: underline;
}
:is(.fl-page-content, .ld-focus-content) a:where(:is(p, li, td, th, dd, blockquote):not([class]) a, .page-links a, :is(.fl-post-meta, .fl-post-cats-tags) a):where(:not([class], nav a, [class*="bf26-"] a, [class*="card"] a, .u7-own-link-color a)):is(:hover, :focus) {
	color: #17808D;
	text-decoration-color: #17808D;
}
.fl-rich-text p:not([class]) > a:not([class]):where(:not(nav a, [class*="bf26-"] a, [class*="card"] a, .u7-own-link-color a)):is(:hover, :focus) {
	color: #17808D !important;
	text-decoration-color: #17808D;
}

/**
 * Button-styled links never underline on hover or focus. The theme's
 * a:hover (0,1,1) beat the 2026 homepage buttons' own .bf26-btn (0,1,0).
 */
a:is([class*="btn"], [class*="button"]):is(:hover, :focus) {
	text-decoration: none;
}

/**
 * Faded grey text (#949494, 3:1 on white): the My Account menu, LearnDash
 * profile stats, workshop list details and the mobile menu. 2023.css reads it
 * from --text-faded, which nothing defines, so define it as the 2026 palette
 * grey (5.5:1).
 */
:root {
	--text-faded: #5B6B72;
}

/** Pre-footer strip links: #17808D on #F7F7F7 (4.34:1), set inline, become the palette dark teal (7.35:1) **/
.bf-prefoot a {
	color: #0F5A64 !important;
}

/**
 * Hero eyebrows (Additional CSS and Beaver Builder settings): pale teal on the
 * teal hero (3.65:1) becomes white (4.66:1); pale pink on the red hero
 * (3.98:1) becomes the near white of the homepage rail (4.68:1).
 */
.fl-module.bf-hero-eyebrow.fl-heading-text,
.fl-module.bf-accred-eyebrow.fl-heading-text,
.fl-module.bf-accred-eyebrow .fl-heading-text {
	color: #fff !important;
}
.fl-module.bf-hero-eyebrow-r.fl-heading-text,
.fl-module.bf-eyebrow-native.fl-heading-text,
.fl-module.bf-eyebrow-native .fl-heading-text {
	color: #FFF0F1 !important;
}

/**
 * Small labels on tinted chips (contact format lines, training card tags,
 * homepage cards): teal and red on their tints (4.11 to 4.45:1) become the
 * palette dark teal and dark red (6.3:1 or better).
 */
body .bfmk .fmt:not(.red),
body .bf-card-body p.bf-tag:not(.red),
body .bf26-fmt-t {
	color: #0F5A64 !important;
}
body .bfmk .fmt.red,
body .bf-card-body p.bf-tag.red,
body .bf26-fmt-r {
	color: #A81C25 !important;
}
/* Homepage mailing list notice: grey on sky blue (4.34:1) becomes the ink of the other notice */
.bf26-body .bf26-notice-in p {
	color: #21333B;
}
/* About rail eyebrows: #8FD3DE on #175D70 (4.42:1) become the palette sky (5.8:1) */
body .bf-rail-col p.bf-rail-eb {
	color: #C9E9F6;
}

/**
 * Teal links on the paper and tint panels of the 2026 pages (4.11 to 4.34:1):
 * workshop search and login cards, and panels whose inline background is
 * --paper, --teal-tint or --sky. They become the palette dark teal; buttons
 * keep their own colours.
 */
html body .fl-builder-content .bf-ws-qcard.fl-rich-text .card p > a:not(.btn),
html body .fl-builder-content .bf-login-cta-mod.fl-rich-text p > a:not(.btn),
.bfmk :is([style*="background:var(--paper)"], [style*="background:var(--teal-tint)"], [style*="background:var(--sky)"]) a:not([class*="btn"], [class*="button"]) {
	color: #0F5A64 !important;
}
/* Login page when signed in: the "logged in" note sits on pale green (#C1F1D5), grey text 4.43:1 and teal link 3.72:1 */
.bfmk .card .uabb-lf-logout-text p {
	color: #21333B !important;
}
#bf-login-slot .uabb-lf-logout-text a {
	color: #0F5A64 !important;
}

/** Child theme search form (sidebars, search results): #757575 on #FCFCFC (4.49:1), now the header search text colour. The skin loads later. **/
input.fl-search-input.form-control {
	color: #2C2C2C;
}

/**
 * LearnDash text greys (#617175 in LearnDash 5: 4.1:1 on the #e2e7ed pager bar,
 * #728188 in older rules: 4.02:1 on white) become #4A5A61, 5.7:1 or better on
 * LearnDash's light panels. Same selectors as LearnDash, which loads first;
 * the pager arrows go with the pager text. Status bubbles with their own
 * colours (complete, waiting, unlocked, alert) keep them. Accent and complete
 * colours come from u7_learndash_colors() in functions/accessibility.php.
 */
.learndash-wrapper .ld-pagination,
.learndash-wrapper .ld-pagination .ld-pages a,
.learndash-wrapper .ld-pagination .ld-pages i,
.learndash-pager,
.learndash-pager a,
.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-title .ld-item-components,
.learndash-wrapper .ld-content-actions .learndash_timer,
.learndash-wrapper .ld-focus .ld-focus-header .ld-user-menu .ld-text,
.learndash-wrapper .ld-status:where(:not(.ld-status-complete, .ld-status-waiting, .ld-status-unlocked, .ld-status-alert)),
.learndash-wrapper .ld-alert:where(:not(.ld-alert-success, .ld-alert-warning)),
.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab,
.learndash-wrapper .ld-course-status .ld-course-status-mode-subscribe .ld-text,
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled .ld-course-status-mode-subscribe .ld-course-status-price,
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled .ld-course-status-price,
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled .ld-course-status-label,
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled .ld-course-status-action .ld-text,
.learndash-wrapper .ld-item-list .ld-section-heading .ld-search-prompt,
.learndash-wrapper .ld-item-list .ld-item-search .ld-item-search-fields label,
.learndash-wrapper .ld-item-list .ld-item-search .ld-item-search-fields .ld-item-search-name .ld-reset-button,
.learndash-wrapper .ld-table-list .ld-table-list-item .ld-comments-column,
.learndash-wrapper .ld-table-list .ld-table-list-item .ld-comments-column a,
.learndash-wrapper .ld-file-upload .ld-file-upload-heading,
.learndash-wrapper .ld-profile-summary .ld-profile-card .ld-profile-edit-link,
.learndash-wrapper .ld-focus-comment .ld-comment-avatar .ld-comment-avatar-author a.ld-comment-permalink,
.learndash-wrapper .ld-login-modal .ld-login-modal-login .ld-modal-text,
.learndash-wrapper .ld-login-modal .ld-login-modal-form label,
.learndash-wrapper .ld-login-modal input[type='text'],
.learndash-wrapper .ld-login-modal input[type='password'],
.learndash-wrapper .ld-login-modal input[type='email'],
.learndash-wrapper .ld-login-modal .ld-login-field,
.learndash-wrapper .ld-login-modal .ld-password-field,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_loadQuiz,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_prerequisite,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_startOnlyRegisteredUser,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_response,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit .time,
.learndash-wrapper .wpProQuiz_quiz_time,
.learndash-wrapper .wpProQuiz_graded_points,
.learndash-wrapper .wpProQuiz_points {
	color: #4A5A61;
}
.learndash-wrapper .ld-pagination .ld-pages i:hover {
	color: #0F5A64;
}

/**
 * Design Upgrade for LearnDash restyles the course pages with its own colour
 * variables, defaulting to the same stock blue, green and greys. Point them at
 * the colours above. Its stylesheet loads before this one.
 */
:root {
	--ldx-color-link-hover: #0F5A64;
	--ldx-color-correct: #006b53;
	--ldx-btn-primary-bg-color: #0F5A64;
	--ldx-btn-primary-bg-color-hover: #0B464E;
	--ldx-btn-standard-bg-color: #0F5A64;
	--ldx-btn-standard-bg-color-hover: #0B464E;
	--ldx-content-lists-header-bg-color: #0F5A64;
	--ldx-content-lists-lesson-text-color-hover: #0F5A64;
	--ldx-focus-mode-topmenu-bg-color: #0F5A64;
	--ldx-focus-mode-sidebar-course-bg-color: #0F5A64;
	--ldx-focus-mode-comment-admin-avatar-border-color: #0F5A64;
	--ldx-course-nav-section-text-color: #4A5A61;
	--ldx-course-nav-link-text-color-hover: #0F5A64;
	--ldx-tooltip-bg-color: #0F5A64;
	--ldx-alert-color-text: #4A5A61;
	--ldx-alert-success-color-text: #006b53;
	--ldx-alert-success-color-border: #006b53;
	--ldx-login-panel-text-color: #4A5A61;
	--ldx-login-panel-heading-color: #0F5A64;
	--ldx-login-panel-input-text-color: #4A5A61;
	--ldx-register-panel-bg-color: #0F5A64;
	--ldx-register-panel-input-text-color: #4A5A61;
}
/* It also fades profile stat labels and step counts (opacity .75 and .8), taking them under 4.5:1 */
.learndash-wrapper .ld-profile-summary .ld-profile-stats .ld-profile-stat span,
.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-title .ld-item-components,
.learndash-wrapper .ld-course-navigation .ld-lesson-item-preview .ld-expand-button {
	opacity: 1;
}
/**
 * LearnDash fades its buttons to 75% on keyboard focus (it also draws an
 * outline), taking the dark teal buttons under 4.5:1. Keep them opaque. Same
 * selectors as LearnDash's inline rule, which prints first.
 */
.learndash-wrapper .ld-button:focus:not(.ld-button-transparent):not(.ld--ignore-inline-css),
.learndash-wrapper .btn-join:focus:not(.ld--ignore-inline-css),
.learndash-wrapper #btn-join:focus:not(.ld--ignore-inline-css),
.learndash-wrapper .ld-expand-button:focus,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button:not(.wpProQuiz_button_reShowQuestion):focus:not(.wpProQuiz_button_restartQuiz),
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button2:focus,
.learndash-wrapper .ld-focus-comments .form-submit #submit,
.learndash-wrapper .ld-login-modal input[type='submit']:focus,
.learndash-wrapper .ld-login-modal .ld-login-modal-register:focus,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_certificate a.btn-blue:focus {
	opacity: 1;
}

/**
 * My Account dashboard: the Final quiz card, still a working link, fades to
 * half opacity until the quizzes are passed (2.9:1). Keep it muted with grey
 * text instead.
 */
.bf-item.bf-hidden {
	opacity: 1;
}
.bf-item.bf-hidden a h3,
.bf-item.bf-hidden a p {
	color: #5B6B72;
}

/**
 * WooCommerce info notices (empty cart and checkout, account creation) and
 * the empty cart's Return to shop button: #757575 and #808080 on #FCFCFC
 * (4.49 and 3.84:1) become #595959 (6.8:1). The skin loads later and sets
 * the notice colour with .woocommerce .woocommerce-info (0,2,0).
 */
.woocommerce-info {
	color: #595959 !important;
}
.woocommerce a.button.wc-backward,
.woocommerce a.button.wc-backward:is(:hover, :focus) {
	color: #595959;
}

/** Checkout progress steps: upcoming steps #7D7D7D on white (4.12:1) become #595959 (7:1). style.css loads later. **/
.progress-wrap .progressbar li:not(.active) {
	color: #595959;
}

/** "Click here to login" in the account creation notice is red in grey text: underline it so it does not rely on colour **/
.woocommerce-info a.showlogin,
.woocommerce-info a.showlogin:is(:hover, :focus) {
	text-decoration: underline;
}

/** Research recruitment contact links: #17808D on #E4F4F6 (4.12:1), set inline with !important, become the palette dark teal (6.9:1) **/
html body .bf26-tlink {
	color: #0F5A64 !important;
}

/** Newsletter "Workshop updates" banner eyebrow (footer layout HTML module, prints later): #17808D on #F7F7F7 (4.35:1) becomes the palette dark teal (7.35:1) **/
html body .bf-notify-banner .bf-eyebrow {
	color: #0F5A64;
}
