/*
 * AASW WCAG Fixes - CSS
 * Fixes that must be server-side (not JS) to be detected by Pa11y
 */

/* Fix: link-in-text-block
 * Image links inside content grids must be distinguishable without colour.
 * Adding a subtle border makes them visually distinct from surrounding content.
 */
.elementor-widget-container a:has(img.featured_image),
.cpt-related a:has(img),
.post-content a:has(img) {
    display: inline-block;
    outline: 2px solid transparent;
}

.elementor-widget-container a:has(img.featured_image):focus,
.elementor-widget-container a:has(img.featured_image):hover,
.cpt-related a:has(img):focus,
.cpt-related a:has(img):hover {
    outline: 2px solid #015d84;
}

/* Fix: skip-link focusable
 * The skip link must be focusable and visible when focused.
 */
a.skip-link.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 999999 !important;
    background: #015d84 !important;
    color: #ffffff !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    text-decoration: none !important;
}

/* Fix: region - wrap elementor sections outside main in a landmark
 * Elementor renders some sections outside the <main> element.
 * We use CSS to visually contain them but JS handles the ARIA fix.
 */
 
 /* Fix: color-contrast on elementor price list descriptions
   Text inside member benefits price list cards has insufficient contrast.
   Darkening the text colour to meet WCAG AA 4.5:1 ratio.
*/
.elementor-price-list-description {
    color: #1a1a1a !important;
}