/**
 * Scherrer Winery - Global Accessibility Stylesheet
 *
 * Site-wide WCAG 2.1 AA fixes. Loads on every front-end page.
 *
 * Selector strategy: high specificity to defeat Elementor inline styles
 * without needing !important. Where Elementor's inline styles are set
 * directly on the element (style="..."), !important is used surgically.
 */


/* ==========================================================================
   WCAG 1.4.1 - Use of Color
   Links must not rely on color alone to be distinguishable from surrounding
   text. Resting-state underlines are required; hover/focus-only indicators
   do not satisfy Lighthouse static analysis.
   ========================================================================== */

/* --------------------------------------------------------------------------
   WooCommerce breadcrumbs
   Applies to every page that renders the WooCommerce breadcrumb trail.
   -------------------------------------------------------------------------- */
nav.woocommerce-breadcrumb a,
.woocommerce nav.woocommerce-breadcrumb a,
.woocommerce-page nav.woocommerce-breadcrumb a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

nav.woocommerce-breadcrumb a:hover,
nav.woocommerce-breadcrumb a:focus {
	text-decoration: underline;
}


/* --------------------------------------------------------------------------
   Inline content links inside paragraphs
   Covers links embedded in body copy across the editing surfaces in use:
     - Elementor Text Editor widget
     - Elementor Theme Post Content widget (single page/post template)
     - Classic .entry-content (Hello Elementor fallback / WooCommerce)
   Header, footer, navigation, breadcrumbs, and button widgets are excluded
   so this rule only touches genuine content links.
   -------------------------------------------------------------------------- */
.elementor-widget-text-editor p a,
.elementor-widget-theme-post-content p a,
.entry-content p a,
.woocommerce-tabs .panel p a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.elementor-widget-text-editor p a:hover,
.elementor-widget-text-editor p a:focus,
.elementor-widget-theme-post-content p a:hover,
.elementor-widget-theme-post-content p a:focus,
.entry-content p a:hover,
.entry-content p a:focus,
.woocommerce-tabs .panel p a:hover,
.woocommerce-tabs .panel p a:focus {
	text-decoration: underline;
}


/* --------------------------------------------------------------------------
   List items inside content
   Same principle as paragraphs - inline links inside body lists need
   resting-state underlines.
   -------------------------------------------------------------------------- */
.elementor-widget-text-editor li a,
.elementor-widget-theme-post-content li a,
.entry-content li a,
.woocommerce-tabs .panel li a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}


/* --------------------------------------------------------------------------
   Explicit opt-outs
   Some links should NOT receive the underline treatment because they're
   already distinguishable by other means (buttons, nav, image-only links).
   These selectors restore no-underline where the rules above would
   otherwise apply too broadly.
   -------------------------------------------------------------------------- */
.elementor-widget-text-editor p a.elementor-button,
.elementor-widget-theme-post-content p a.elementor-button,
.entry-content p a.elementor-button {
	text-decoration: none;
}

/* Image-only links: when an anchor's only child is an image, no underline
   needed (the image itself provides the affordance). */
.elementor-widget-text-editor p a:has(> img:only-child),
.elementor-widget-theme-post-content p a:has(> img:only-child),
.entry-content p a:has(> img:only-child) {
	text-decoration: none;
}
