/*
 * A11Y-B01 — accessible colour palette (WCAG 1.4.3 Contrast Minimum)
 * ============================================================================
 * STATUS: ON (enabled 2026-10-01 at the site owner's request, staging first).
 *         Switch off with define( 'AOS_A11Y_DISABLE', 'A11Y-B01' ).
 *         The file name is kept for the existing branch history.
 *
 * Preferred permanent fix: change the same values at their source —
 *   Divi > Theme Customizer (body link colour, accent colour), Divi Builder
 *   Global Colours, MEC > Settings > Styling (main colour), CookieYes banner
 *   colours, and the child-theme rules listed per block below.
 * Elements coloured per module / inline are caught by a runtime sweep in
 * a11y.js (fixColours) that adds the .aos-fg-* / .aos-bg-* classes below.
 *
 * Current → new (WCAG 2.x ratios)
 *   brand green  #60b88d → #387c5b   2.40:1 → 5.00:1 on #fff, 4.54:1 on #f2f4f7
 *   brand blue   #0088af → #00718f   4.08:1 → 5.59:1 on #fff, 5.07:1 on #f2f4f7, 5.12:1 on #f5f5f5
 *   footer grey  #828284 → #666668   3.48:1 → 5.20:1 on #f2f4f7
 *   meta grey    #959595 → #666668   2.72:1 → 5.20:1 on #f2f4f7, 5.73:1 on #fff
 *   light greys  #8d8d8d #9a9a9a #a9a9a9 #999 #cacaca #777 → #595959 (≥6.0:1)
 *   Woo blue     #2ea3f2 → #1f6fa3   2.84:1 → 5.44:1
 *   white text on green / blue / red backgrounds → #387c5b (5.0:1) / #00718f (5.6:1) / #c00000 (6.5:1)
 */

/* ---- Runtime-tagged elements (a11y.js fixColours) ----
 * Divi module styles and MEC use !important with an ID in the selector
 * (e.g. "body #page-container .et_pb_section .et_pb_button_0"). The
 * :not(#aos-x):not(#aos-y) pairs never match anything but add two ID
 * weights of specificity, so these overrides win without inline styles. */
body.aos-a11y-b01 .aos-fg-green:not(#aos-x):not(#aos-y) { color: #387c5b !important; }
body.aos-a11y-b01 .aos-fg-blue:not(#aos-x):not(#aos-y)  { color: #00718f !important; }
body.aos-a11y-b01 .aos-fg-grey:not(#aos-x):not(#aos-y)  { color: #595959 !important; }
body.aos-a11y-b01 .aos-bg-green:not(#aos-x):not(#aos-y):not(:hover) { background-color: #387c5b !important; border-color: #387c5b !important; }
body.aos-a11y-b01 .aos-bg-blue:not(#aos-x):not(#aos-y):not(:hover)  { background-color: #00718f !important; border-color: #00718f !important; }
body.aos-a11y-b01 .aos-bg-red:not(#aos-x):not(#aos-y):not(:hover)   { background-color: #c00000 !important; border-color: #c00000 !important; }
/* Text that sits on a recoloured background stays white (beats the link rules below). */
body.aos-a11y-b01 .aos-bg-green:not(#aos-x):not(#aos-y),
body.aos-a11y-b01 .aos-bg-blue:not(#aos-x):not(#aos-y),
body.aos-a11y-b01 .aos-bg-red:not(#aos-x):not(#aos-y),
body.aos-a11y-b01 .wp-pagenavi a.first:not(#aos-x):not(#aos-y),
body.aos-a11y-b01 .wp-pagenavi a.last:not(#aos-x):not(#aos-y),
body.aos-a11y-b01 .wp-pagenavi a.page:not(#aos-x):not(#aos-y),
body.aos-a11y-b01 .wp-pagenavi span.current:not(#aos-x):not(#aos-y) {
	color: #ffffff !important;
}
body.aos-a11y-b01 #searchsubmit:not(#aos-x) {
	color: #333333 !important;
}

/* ---- A11Y-013 Footer text and links (child style.css L1041-1070; Customizer ".icon-text p") ---- */
body.aos-a11y-b01 #main-footer,
body.aos-a11y-b01 #main-footer p,
body.aos-a11y-b01 #main-footer .icon-text p,
body.aos-a11y-b01 #main-footer .icon-text p a,
body.aos-a11y-b01 #footer-widgets .footer-widget a,
body.aos-a11y-b01 #footer-widgets .footer-widget li a,
body.aos-a11y-b01 #main-footer .textwidget p,
body.aos-a11y-b01 #main-footer .menu-item a {
	color: #666668 !important;
}

/* ---- A11Y-014 Brand-green text links (Customizer "a { color:#60b88d }", content links, header/footer menus) ---- */
body.aos-a11y-b01 .entry-content a:not(.et_pb_button):not(.button),
body.aos-a11y-b01 .et_pb_text a:not(.et_pb_button),
body.aos-a11y-b01 .et_pb_post_content a:not(.et_pb_button),
body.aos-a11y-b01 #top-menu li.current-menu-item > a,
body.aos-a11y-b01 #top-menu li.current-menu-ancestor > a,
body.aos-a11y-b01 .nav li ul a,
body.aos-a11y-b01 .et_mobile_menu li a,
body.aos-a11y-b01 #main-footer .icon-text a,
body.aos-a11y-b01 .woocommerce-LostPassword a,
body.aos-a11y-b01 .gform_wrapper .gfield a,
body.aos-a11y-b01 .cky-btn-do-not-sell,
body.aos-a11y-b01 .cky-btn.cky-btn-do-not-sell {
	color: #387c5b !important;
}
body.aos-a11y-b01 .cky-btn-do-not-sell {
	border-color: #387c5b !important;
}

/* ---- A11Y-015 White text on brand-green backgrounds (buttons, "read more", Woo notices, Gravity Forms submit, header phone CTA) ---- */
body.aos-a11y-b01 .et_pb_button[style*="60b88d"],
body.aos-a11y-b01 .home_top .et_pb_button,
body.aos-a11y-b01 .green_cent_btn,
body.aos-a11y-b01 .btn_green_bg,
body.aos-a11y-b01 #top-menu li.green_top_btn > a,
body.aos-a11y-b01 .nav li.green_top_btn > a,
body.aos-a11y-b01 a.more-link,
body.aos-a11y-b01 .woocommerce-info,
body.aos-a11y-b01 #wcu-register-button,
body.aos-a11y-b01 .gform_wrapper .gform_button,
body.aos-a11y-b01 #gform_submit_button_4,
body.aos-a11y-b01 #gform_submit_button_6 {
	background-color: #387c5b !important;
	border-color: #387c5b !important;
	color: #ffffff !important;
}

/* ---- A11Y-016 Brand-blue headings (child style.css L405 "h3 { color:#0088af }", inline <span style="color:#0088af">) ---- */
/* :where() keeps the specificity of the original `h3` rule, so only the base colour changes. */
:where(body.aos-a11y-b01) h3 {
	color: #00718f;
}
body.aos-a11y-b01 span[style*="color: #0088af"],
body.aos-a11y-b01 span[style*="color:#0088af"],
body.aos-a11y-b01 [style*="color: #0088af"],
body.aos-a11y-b01 #left-area h2.entry-title a,
body.aos-a11y-b01 .et_pb_post .entry-title a,
body.aos-a11y-b01 .icontxt-title,
body.aos-a11y-b01 .et_pb_testimonial_author {
	color: #00718f !important;
}
/* White text on brand-blue (WP-PageNavi first/last, blue buttons) */
body.aos-a11y-b01 .wp-pagenavi a.first,
body.aos-a11y-b01 .wp-pagenavi a.last,
body.aos-a11y-b01 .wp-pagenavi a.page,
body.aos-a11y-b01 .wp-pagenavi span.current,
body.aos-a11y-b01 .btn_blue {
	background-color: #00718f !important;
	border-color: #00718f !important;
	color: #ffffff !important;
}

/* ---- A11Y-017 Post meta / related-post dates (#959595) ---- */
body.aos-a11y-b01 .post-meta,
body.aos-a11y-b01 .post-meta a,
body.aos-a11y-b01 .post-meta span,
body.aos-a11y-b01 .rpth_list_date {
	color: #666668 !important;
}

/* ---- A11Y-018 Neutral UI: search-widget button, WooCommerce inputs/buttons, gift-card preview ---- */
body.aos-a11y-b01 .widget_search #searchsubmit {
	color: #333333 !important;
}
body.aos-a11y-b01 .woocommerce form .form-row input.input-text,
body.aos-a11y-b01 #username,
body.aos-a11y-b01 #password,
body.aos-a11y-b01 #reg_email {
	color: #3d3d3d !important;
}
body.aos-a11y-b01 .woocommerce form .form-row input::placeholder,
body.aos-a11y-b01 #username::placeholder,
body.aos-a11y-b01 #password::placeholder,
body.aos-a11y-b01 #user_login::placeholder {
	color: #595959;
	opacity: 1;
}
body.aos-a11y-b01 .woocommerce a.button.wc-backward,
body.aos-a11y-b01 .product_meta a[rel="tag"],
body.aos-a11y-b01 .posted_in a {
	color: #1f6fa3 !important;
}
body.aos-a11y-b01 #mwg_wgm_preview_email {
	background-color: #c00000 !important;
	color: #ffffff !important;
}

/* ---- A11Y-019 Modern Events Calendar colours (prefer: MEC > Settings > Styling > main colour) ---- */
body.aos-a11y-b01 .mec-wrap .mec-color,
body.aos-a11y-b01 .mec-wrap .mec-color-hover,
body.aos-a11y-b01 .mec-wrap .mec-color-hover:hover,
body.aos-a11y-b01 .mec-events-gcal.mec-events-button,
body.aos-a11y-b01 .mec-end-counts h3,
body.aos-a11y-b01 .mec-wrap .mec-table-side-day {
	color: #387c5b !important;
}
body.aos-a11y-b01 .mec-booking-button,
body.aos-a11y-b01 .mec-wrap .mec-bg-color {
	background-color: #387c5b !important;
	color: #ffffff !important;
}
body.aos-a11y-b01 .mec-single-event .mec-start-date-label,
body.aos-a11y-b01 .mec-single-event .mec-events-abbr,
body.aos-a11y-b01 .mec-single-event .author,
body.aos-a11y-b01 .mec-single-event .mec-address,
body.aos-a11y-b01 .mec-single-event .mec-more-info-button,
body.aos-a11y-b01 .mec-wrap .mec-load-month-link,
body.aos-a11y-b01 .mec-wrap .mec-table-nullday,
body.aos-a11y-b01 .mec-wrap .mec-event-detail,
body.aos-a11y-b01 .mec-wrap .mec-search-form select,
body.aos-a11y-b01 .mec-wrap .mec-search-form input {
	color: #595959 !important;
}

/* ---- Dropdown / mobile menu hover & focus ----
 * The menu links are pinned to #387c5b (rules above + .aos-fg-green), which also
 * won over Divi's hover state: green text on the #60b88d hover background
 * (≈2:1). Hovered/focused items get white text on #387c5b (5.0:1). Three
 * :not(#…) raise specificity above the .aos-fg-green rule. */
body.aos-a11y-b01 .nav li ul li > a:hover:not(#aos-x):not(#aos-y):not(#aos-z),
body.aos-a11y-b01 .nav li ul li > a:focus-visible:not(#aos-x):not(#aos-y):not(#aos-z),
body.aos-a11y-b01 .nav li ul li.current-menu-item > a:hover:not(#aos-x):not(#aos-y):not(#aos-z),
body.aos-a11y-b01 .et_mobile_menu li a:hover:not(#aos-x):not(#aos-y):not(#aos-z),
body.aos-a11y-b01 .et_mobile_menu li a:focus-visible:not(#aos-x):not(#aos-y):not(#aos-z) {
	color: #ffffff !important;
	background-color: #387c5b !important;
	opacity: 1 !important;
}
