/*
Theme Name: Enfold Child
Theme URI: https://www.kriesi.at/support/
Description: Child theme for Enfold theme
Author: Robben Media
Author URI: https://robbenmedia.com
Template: enfold
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================================================
   ACCESSIBILITY - WCAG 2.1 AA COMPLIANCE
   ============================================================================ */

/* Skip Link (visually hidden until focused) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #9c1f26;
    color: #ffffff;
    padding: 8px 16px;
    z-index: 100000;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #9c1f26;
    outline-offset: 2px;
}

/* Keyboard Focus Styles - Enhanced visibility for all interactive elements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #9c1f26 !important;
    outline-offset: 2px !important;
}

/* Navigation focus styles */
.main_menu a:focus,
.avia-menu a:focus,
#menu-item a:focus {
    outline: 3px solid #9c1f26 !important;
    outline-offset: 2px !important;
    background-color: rgba(156, 31, 38, 0.1);
}

/* Button focus styles */
.avia-button:focus,
.button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
.av-button-big:focus,
.frm_submit button:focus {
    outline: 3px solid #9c1f26 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(156, 31, 38, 0.3);
}

/* Social icon focus styles */
.social_bookmarks a:focus,
.avia-icon-list a:focus,
.av-social a:focus {
    outline: 3px solid #9c1f26 !important;
    outline-offset: 3px !important;
    border-radius: 50%;
}

/* Form field focus */
.text_input:focus,
.av_contact_form input:focus,
.av_contact_form textarea:focus,
.frm_form_field input:focus,
.frm_form_field textarea:focus {
    border-color: #9c1f26 !important;
    box-shadow: 0 0 0 3px rgba(156, 31, 38, 0.2) !important;
    outline: none !important;
}

/* Ensure focus is never removed (some themes do this) */
*:focus {
    outline: 3px solid #9c1f26;
    outline-offset: 2px;
}

/* Exception: Remove double outlines on explicitly styled elements */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #9c1f26 !important;
    box-shadow: 0 0 0 3px rgba(156, 31, 38, 0.2) !important;
}

/* Ensure links without text (icon links) have visible focus */
a[aria-label]:focus,
a.social_bookmarks:focus {
    outline: 3px solid #9c1f26 !important;
    outline-offset: 3px !important;
}

/* Screen reader only text utility class */
.sr-only,
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus,
.screen-reader-text:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ============================================================================
   LINK UNDERLINES - WCAG 2.0-2.2 Level A (Issue #1 from audit)
   Links must be distinguished from surrounding text in a way that does not
   rely on color alone. Adding underlines to text links.
   ============================================================================ */

/* Text links in content areas - add underlines */
.avia_textblock a,
.entry-content a,
.av_textblock_section a,
p a,
.content a:not(.avia-button):not(.button):not(.av-icon-char) {
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* Exclude navigation, buttons, and icon links from underlines */
.av-main-nav a,
.main_menu a,
.sub_menu a,
.avia-menu a,
.avia-button,
.button,
a.av-icon-char,
.social_bookmarks a,
.av-social a,
.av_font_icon a,
.logo a,
.footer_color a.av-social-link,
.av-image-link,
a[class*="avia-slideshow"],
.av_tab_section a {
    text-decoration: none !important;
}

/* Hover state for underlined links - slightly more visible */
.avia_textblock a:hover,
.entry-content a:hover,
.av_textblock_section a:hover,
p a:hover {
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
}
