/**
 * HBKsaar – Barrierefreiheits-Toolbar (kompakt, ausklappbar)
 */

#a11y-toolbar {
    position: fixed;
    left: 8px;
    bottom: 8px;
    z-index: 10050;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 8px;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

@media (min-width: 768px) {
    #a11y-toolbar {
        left: 16px;
        bottom: 16px;
    }
}

body.show-menu #a11y-toolbar {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

body:has(.cookiebar.open) #a11y-toolbar {
    bottom: 72px;
}

@media (max-width: 767px) {
    body:has(.cookiebar.open) #a11y-toolbar {
        bottom: 110px;
    }
}

/* Kompakt-Button (Standardzustand) */
#a11y-toolbar .a11y-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    color: #111;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#a11y-toolbar .a11y-toggle:hover,
#a11y-toolbar .a11y-toggle:focus {
    background: #f3f3f4;
    border-color: rgba(0, 0, 0, 0.22);
    outline: none;
}

#a11y-toolbar .a11y-toggle:focus-visible {
    outline: 2px solid #e30513;
    outline-offset: 2px;
}

#a11y-toolbar.is-open .a11y-toggle {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Ausklapp-Panel */
#a11y-toolbar .a11y-panel {
    min-width: 220px;
    max-width: min(92vw, 320px);
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.14);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    color: #111;
}

#a11y-toolbar .a11y-section + .a11y-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

#a11y-toolbar .a11y-section-label {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}

#a11y-toolbar .a11y-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

#fontsizer,
#kontrast {
    display: flex;
    align-items: center;
    gap: 4px;
}

#kontrast {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 6px;
    margin-left: 2px;
}

#fontsizer a,
#kontrast a,
#a11y-toolbar .cookie-consent {
    padding: 7px;
    border-radius: 7px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f3f3f4;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

#fontsizer a:hover,
#fontsizer a:focus,
#kontrast a:hover,
#kontrast a:focus,
#a11y-toolbar .cookie-consent:hover,
#a11y-toolbar .cookie-consent:focus {
    background: #e8e8ea;
    border-color: rgba(0, 0, 0, 0.2);
    outline: none;
}

#fontsizer a:focus-visible,
#kontrast a:focus-visible,
#a11y-toolbar .cookie-consent:focus-visible {
    outline: 2px solid #e30513;
    outline-offset: 2px;
}

#fontsizer img,
#kontrast img,
#a11y-toolbar .cookie-consent img {
    width: 22px;
    height: 22px;
    display: block;
}

#a11y-toolbar .cookie-consent {
    padding: 7px;
    background: #f3f3f4;
}

#kontrast a[aria-pressed="true"] {
    background: #fff;
    border-color: rgba(227, 5, 19, 0.55);
    box-shadow: inset 0 0 0 1px rgba(227, 5, 19, 0.25);
}

#kontrast a[aria-pressed="true"] img {
    opacity: 1;
}

#kontrast a[aria-pressed="false"] img {
    opacity: 0.45;
}

html.a11y-contrast-high #a11y-toolbar .a11y-toggle {
    background: #000;
    color: #fff;
    border: 2px solid #000;
}

html.a11y-contrast-high #a11y-toolbar .a11y-panel {
    background: #fff;
    border: 3px solid #000;
    box-shadow: none;
}

html.a11y-contrast-high #a11y-toolbar .a11y-section + .a11y-section {
    border-top: 2px solid #000;
}

html.a11y-contrast-high #fontsizer a,
html.a11y-contrast-high #kontrast a,
html.a11y-contrast-high #a11y-toolbar .cookie-consent {
    background: #fff;
    border: 2px solid #000;
}

html.a11y-contrast-high #kontrast {
    border-left: 2px solid #000;
}

html.a11y-contrast-high #kontrast a[aria-pressed="true"] {
    background: #ffff00;
}

/* ==========================================================================
   Kontrasterhöhung: Bilder entfärben + Hauptmenü (Gelb/Schwarz statt HBK-Rot)
   html.a11y-contrast-high lädt nach mod_hauptmenu-accordion.css und setzt
   die Variablen dort zuverlässig außer Kraft.
   ========================================================================== */

html.a11y-contrast-high img {
    filter: grayscale(1) contrast(1.06);
}

html.a11y-contrast-high #a11y-toolbar img {
    filter: none;
}

/* Hintergrundbilder (Logo, News-Kacheln, Slider-Bild) – nur Bildlayer, nicht Text/Slide */
html.a11y-contrast-high .logo a,
html.a11y-contrast-high .tiles-wrap li.news,
html.a11y-contrast-high .slider-links .slide__bg,
html.a11y-contrast-high .slider .slide__bg,
html.a11y-contrast-high .container-fluid .slider_wrap .image img,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .image img,
html.a11y-contrast-high .our-story-image img,
html.a11y-contrast-high .slider-images-wrapper.kenburnsy .slide,
html.a11y-contrast-high .kenburnsy .slide {
    filter: grayscale(1) contrast(1.06);
}

/* arch-slider Headermotiv (z. B. Velobox): Text auf dunklem Kasten lesbar halten */
html.a11y-contrast-high .hbk_textbildslider .arch-slider {
    position: relative;
    isolation: isolate;
}

html.a11y-contrast-high .arch-slider-content {
    z-index: 2;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
}

html.a11y-contrast-high .arch-slider-content h1,
html.a11y-contrast-high .arch-slider-content h2,
html.a11y-contrast-high .arch-slider-content h3,
html.a11y-contrast-high .arch-slider-content h4,
html.a11y-contrast-high .arch-slider-content p,
html.a11y-contrast-high .arch-slider-content a {
    color: #fff !important;
}

/* Startseiten-Slider: Text über entfärbtem Bild halten */
html.a11y-contrast-high .container-fluid .slider_wrap,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap {
    position: relative;
    isolation: isolate;
}

html.a11y-contrast-high .container-fluid .slider_wrap .content,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content {
    z-index: 3 !important;
}

html.a11y-contrast-high .container-fluid .slider_wrap .image,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .image {
    position: relative;
    z-index: 1 !important;
}

html.a11y-contrast-high .slider-links .slide__text,
html.a11y-contrast-high .slider-links .slide__content,
html.a11y-contrast-high .slider .slide__text {
    filter: none !important;
    z-index: 2 !important;
}

/* Slider: Schutzfläche hinter Text (entfärbtes Bild darf nicht mit Text verschmelzen) */
html.a11y-contrast-high .container-fluid .slider_wrap .content:not(.dark_mode) .lines,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content:not(.dark_mode) .lines {
    background: rgba(0, 0, 0, 0.78) !important;
    padding: 12px 20px 16px;
    display: inline-block;
}

html.a11y-contrast-high .container-fluid .slider_wrap .content.dark_mode .lines,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content.dark_mode .lines {
    background: rgba(255, 255, 255, 0.94) !important;
    padding: 12px 20px 16px;
    display: inline-block;
}

html.a11y-contrast-high .container-fluid .slider_wrap .content:not(.dark_mode) .lines h2,
html.a11y-contrast-high .container-fluid .slider_wrap .content:not(.dark_mode) .lines h3,
html.a11y-contrast-high .container-fluid .slider_wrap .content:not(.dark_mode) .lines a h2,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content:not(.dark_mode) .lines h2,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content:not(.dark_mode) .lines h3 {
    color: #fff !important;
}

html.a11y-contrast-high .container-fluid .slider_wrap .content.dark_mode .lines h2,
html.a11y-contrast-high .container-fluid .slider_wrap .content.dark_mode .lines h3,
html.a11y-contrast-high .container-fluid .slider_wrap .content.dark_mode .lines a h2,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content.dark_mode .lines h2,
html.a11y-contrast-high .ce_hbk_teaser_full .slider_wrap .content.dark_mode .lines h3 {
    color: #000 !important;
}

/* Linkboxen: main_contrast.css setzt .our-story-content-inner pauschal auf schwarz */
html.a11y-contrast-high .our-story-content.dark {
    background-color: rgba(0, 0, 0, 0.92) !important;
}

html.a11y-contrast-high .our-story-content.white {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

html.a11y-contrast-high .our-story.linkbox .our-story-content-inner.dark,
html.a11y-contrast-high .our-story.linkbox .our-story-content-inner.schwarz {
    background-image: none !important;
    background-color: #000 !important;
}

html.a11y-contrast-high .our-story.linkbox .our-story-content-inner.white,
html.a11y-contrast-high .our-story.linkbox .our-story-content-inner.weiss {
    background-image: none !important;
    background-color: #fff !important;
}

html.a11y-contrast-high .our-story.linkbox .our-story-content.dark h2,
html.a11y-contrast-high .our-story.linkbox .our-story-content.dark h3,
html.a11y-contrast-high .our-story.linkbox .our-story-content.dark p,
html.a11y-contrast-high .our-story.linkbox .our-story-content.dark a,
html.a11y-contrast-high .our-story-content-inner.dark h2,
html.a11y-contrast-high .our-story-content-inner.dark h3,
html.a11y-contrast-high .our-story-content-inner.dark p,
html.a11y-contrast-high .our-story-content-inner.dark a {
    color: #fff !important;
}

html.a11y-contrast-high .our-story.linkbox .our-story-content.white h2,
html.a11y-contrast-high .our-story.linkbox .our-story-content.white h3,
html.a11y-contrast-high .our-story.linkbox .our-story-content.white p,
html.a11y-contrast-high .our-story.linkbox .our-story-content.white a,
html.a11y-contrast-high .our-story-content-inner.white h2,
html.a11y-contrast-high .our-story-content-inner.white h3,
html.a11y-contrast-high .our-story-content-inner.white p,
html.a11y-contrast-high .our-story-content-inner.white a {
    color: #000 !important;
}

html.a11y-contrast-high .our-story.linkbox .our-story-content.dark a.btn {
    color: #000 !important;
    background-color: #fff !important;
    border: 2px solid #fff !important;
}

html.a11y-contrast-high .our-story.linkbox .our-story-content.white a.btn {
    color: #fff !important;
    background-color: #000 !important;
    border: 2px solid #000 !important;
}

/* schwarz/weiss/rot: Zeilen-Hintergrund + Textfarbe abstimmen */
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz h1,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz h2,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz h3,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz p,
html.a11y-contrast-high .our-story-content.schwarz,
html.a11y-contrast-high .our-story-content-inner.schwarz h2,
html.a11y-contrast-high .our-story-content-inner.schwarz p {
    color: #fff !important;
}

html.a11y-contrast-high .ce_content_2spalter .row.weiss article.weiss,
html.a11y-contrast-high .ce_content_2spalter .row.weiss article.weiss h1,
html.a11y-contrast-high .ce_content_2spalter .row.weiss article.weiss h2,
html.a11y-contrast-high .ce_content_2spalter .row.weiss article.weiss h3,
html.a11y-contrast-high .ce_content_2spalter .row.weiss article.weiss p,
html.a11y-contrast-high .our-story-content.weiss,
html.a11y-contrast-high .our-story-content-inner.weiss h2,
html.a11y-contrast-high .our-story-content-inner.weiss p {
    color: #000 !important;
}

html.a11y-contrast-high .ce_content_2spalter .row.rot article.rot,
html.a11y-contrast-high .ce_content_2spalter .row.rot article.rot h1,
html.a11y-contrast-high .ce_content_2spalter .row.rot article.rot h2,
html.a11y-contrast-high .ce_content_2spalter .row.rot article.rot h3,
html.a11y-contrast-high .ce_content_2spalter .row.rot article.rot p,
html.a11y-contrast-high .our-story-content.rot,
html.a11y-contrast-high .our-story-content-inner.rot h2,
html.a11y-contrast-high .our-story-content-inner.rot p {
    color: #fff !important;
}

/* Intro-Texte auf hellem Seitenhintergrund (article.schwarz ohne dunkle Zeile) */
html.a11y-contrast-high article.schwarz h1,
html.a11y-contrast-high article.schwarz h2,
html.a11y-contrast-high article.schwarz h3,
html.a11y-contrast-high article.schwarz p {
    color: #000 !important;
}

html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz h1,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz h2,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz h3,
html.a11y-contrast-high .ce_content_2spalter .row.schwarz article.schwarz p {
    color: #fff !important;
}

/* Hauptmenü-Accordion: Kontrast-Palette */
html.a11y-contrast-high .hauptmenu.wider {
    --hm-accent: #ffff00;
    --hm-accent-soft: rgba(255, 255, 0, 0.18);
    --hm-border-active: rgba(255, 255, 0, 0.55);
    --hm-text: #ffffff;
    --hm-text-soft: rgba(255, 255, 255, 0.82);
}

html.a11y-contrast-high .menu-wrap.hauptmenu.wider {
    background: #000 !important;
}

html.a11y-contrast-high .hauptmenu.wider .menu-accordion-link:hover,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li:not(.submenu) > a:hover,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li.trail > .menu-accordion-header .menu-accordion-link,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li.active > .menu-accordion-header .menu-accordion-link,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li.trail:not(.submenu) > a,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li.active:not(.submenu) > a,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li.trail:not(.submenu) > span,
html.a11y-contrast-high .hauptmenu.wider .level_1 > li.active:not(.submenu) > span,
html.a11y-contrast-high .hauptmenu.wider .menu-accordion-toggle:hover,
html.a11y-contrast-high .hauptmenu.wider .menu-accordion-toggle:focus,
html.a11y-contrast-high .hauptmenu.wider li.submenu.is-open > .menu-accordion-header .menu-accordion-toggle,
html.a11y-contrast-high .hauptmenu.wider li.menu_small > a:hover,
html.a11y-contrast-high .hauptmenu.wider li.menu_small .menu-accordion-link:hover {
    color: #ffff00;
}

html.a11y-contrast-high .hauptmenu.wider .level_2 a:hover,
html.a11y-contrast-high .hauptmenu.wider .level_3 a:hover {
    color: #000 !important;
    background: #ffff00 !important;
}

html.a11y-contrast-high .hauptmenu.wider button.close-menu:hover,
html.a11y-contrast-high .hauptmenu.wider button.close-menu:focus {
    border-color: rgba(255, 255, 0, 0.55);
}

html.a11y-contrast-high .hauptmenu.wider button.close-menu:hover::before,
html.a11y-contrast-high .hauptmenu.wider button.close-menu:hover::after,
html.a11y-contrast-high .hauptmenu.wider button.close-menu:focus::before,
html.a11y-contrast-high .hauptmenu.wider button.close-menu:focus::after {
    background: #ffff00;
}

html.a11y-contrast-high .main-menu-indicator::before {
    color: #000;
}

html.a11y-contrast-high .main-menu-indicator > span,
html.a11y-contrast-high .main-menu-indicator > span::before,
html.a11y-contrast-high .main-menu-indicator > span::after {
    background: #000;
}

/* Überlagerungen (Login, Cookie-Bar, Menü) – immer aus zuverlässigen Stylesheets */
#top .mod_login:not(.show) {
    display: none !important;
}

#top .mod_login {
    position: fixed !important;
    inset: 0;
    z-index: 100;
}

.cookiebar:not(.open) {
    display: none !important;
}

.cookiebar {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

body:not(.show-menu) .menu-wrap.hauptmenu.wider {
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
    clip-path: inset(0 0 0 100%) !important;
    -webkit-clip-path: inset(0 0 0 100%) !important;
}
