/*
Theme Name: Beaver Builder Child Theme
Theme URI: http://www.wpbeaverbuilder.com
Version: 1.1
Description: An example child theme that can be used as a starting point for custom development.
Author: The Beaver Builder Team
Author URI: http://www.fastlinemedia.com
template: bb-theme
*/

/* Add your custom styles here... */ 
/* ==========================================
   BARRIEREFREIHEIT (WCAG 2.1 AA) - Phase 2
   ========================================== */

/* 2.4 Fix: Footer-Navigation Kontrast (4.42:1 → 4.58:1+) */
.fl-page-footer-widgets,
.fl-page-footer-widgets a,
footer a,
.footer-nav a {
    color: #5a5a5a !important;
}

/* 2.4 Fix: Link-Farbe global (3.63:1 → 4.5:1+) */
a,
.entry-content a,
.fl-module-content a,
.fl-rich-text a {
    color: #1a659e;
}

/* 2.4 Fix: Links in Fliesstext mit Unterstreichung (WCAG 1.4.1) */
.entry-content a,
.fl-module-content a,
.fl-rich-text a,
.page-content a,
article a {
    text-decoration: underline;
}
.entry-content a:hover,
.fl-module-content a:hover,
.fl-rich-text a:hover,
.page-content a:hover,
article a:hover {
    text-decoration: none;
}

/* Navigation-Links nicht unterstreichen */
nav a,
.fl-page-nav a,
.mega-menu a,
.menu a,
header a,
footer a,
.fl-page-footer a,
.breadcrumb a,
.woocommerce-breadcrumb a {
    text-decoration: none;
}

/* 2.4 Fix: Button-Kontrast (3.63:1 → 4.5:1+) */
.fl-button,
a.fl-button,
button.fl-button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: #1a659e;
    color: #ffffff;
}

/* 2.4 Fix: Breadcrumb-Kontrast */
.woocommerce-breadcrumb a,
.breadcrumb a,
.fl-breadcrumb a {
    color: #1a659e;
}

/* 2.4 Fix: Cookie-Banner Kontrast (aktualisiert fuer RCB v5.x mit obfuskierten Klassen) */
/* dialog[aria-modal] ist stabiler Selektor fuer Real Cookie Banner */
/* !important noetig da RCB hochspezifische Selektoren mit IDs und CSS-Variablen nutzt */
dialog[aria-modal="true"] p,
dialog[aria-modal="true"] span,
dialog[aria-modal="true"] div {
    color: #333333 !important;
}
/* Banner-Footer-Links und Hinweistexte: #7C7C7C -> #666666 (5.74:1 auf Weiss) */
dialog[aria-modal="true"] a:not([role="button"]) {
    color: #666666 !important;
}
/* Buttons im Banner sollen ihre eigene Farbe behalten */
dialog[aria-modal="true"] a[role="button"] {
    color: inherit;
}


/* ==========================================
   BARRIEREFREIHEIT (WCAG 2.1 AA) - Phase 3
   ========================================== */

/* === 3.4: Skip-Navigation sichtbar bei Fokus === */
.fl-screen-reader-text:focus,
.eh-skip-link:focus {
    position: fixed !important;
    top: 10px !important;
    left: 10px !important;
    width: auto !important;
    height: auto !important;
    padding: 15px 23px !important;
    background: #1a659e !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    z-index: 100000 !important;
    outline: 3px solid #000 !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    border-radius: 4px;
}

/* === 3.5: Fokus-Indikatoren fuer Tastatur-Navigation === */
*:focus-visible {
    outline: 3px solid #1a659e !important;
    outline-offset: 2px !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #1a659e !important;
    outline-offset: 2px !important;
}

/* Kein Outline bei Maus-Click (nur Tastatur) */
:focus:not(:focus-visible) {
    outline: none !important;
}

/* Mega-Menu Toggle-Button Fokus */
.mega-toggle-animated:focus-visible {
    outline: 3px solid #1a659e !important;
    outline-offset: 2px !important;
}

/* WooCommerce Elemente Fokus */
.woocommerce a:focus-visible,
.woocommerce button:focus-visible,
.woocommerce input:focus-visible,
.woocommerce select:focus-visible {
    outline: 3px solid #1a659e !important;
    outline-offset: 2px !important;
}


/* ==========================================
   BARRIEREFREIHEIT (WCAG 2.1 AA) - Phase 4
   ========================================== */

/* === 4.4: Content Reflow - kein horizontales Scrollen (WCAG 1.4.10) === */
/* Fix: Bootstrap .row negative margins verursachen Overflow bei kleinen Viewports */
html,
body {
    overflow-x: hidden;
}

/* Tablepress: Scroll-Wrapper fuer breite Tabellen */
.tablepress-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* WooCommerce Produkt-Gallery Overflow verhindern */
.woocommerce-product-gallery {
    overflow: hidden;
    max-width: 100%;
}

/* Bilder und Medien duerfen nicht breiter als Container sein */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

/* === 4.4: Touch-Targets mindestens 44x44px (WCAG 2.5.5, Level AAA empfohlen) === */
@media (max-width: 768px) {
    /* Footer-Links und kleine Touch-Targets vergroessern */
    footer a,
    .fl-page-footer a,
    .breadcrumb a,
    .woocommerce-breadcrumb a {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
    }
}
