div.sidebar-wrapper{
    pointer-events: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    right: MIN(1%, 20px);
    /* Der Wrapper haengt in <main> (eigener Stapelkontext) und konkurriert nur mit dem Seiteninhalt:
       Rahmen-Elemente mit eigenem z-index (z. B. die 5px-Abschlusslinie, z-index 1) lagen bei z-index 1
       ueber den Boxen (Maria 2026-09-17). Header/Menue liegen ausserhalb von <main> und bleiben unberuehrt. */
    z-index: 50;
}
div.sidebar-wrapper.modal-open{
    z-index: 9998;
}
/* Gruppe der Boxen klebt mittig im Viewport (top 50% + translate) – damit ist sie
   auf jeder Seitenhoehe sofort sichtbar. Die Boxen selbst sind statisch darin. */
div.sidebar-wrapper .sidebar-panels{
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 400;
    @media ((max-width: 640px) and (max-height: 700px)) {
        top: auto;
        bottom: 10%;
        transform: none;
    }
}
/* Im Modal darf die Gruppe keine Transform haben (sonst positioniert sich position:fixed am Transform-Ahnen)
   und keinen eigenen z-index: als Flex-Item bildet sie sonst einen Stapelkontext (400) und das Panel
   laege unter dem Backdrop (9996) */
div.sidebar-wrapper.modal-open .sidebar-panels{
    position: static;
    transform: none;
    z-index: auto;
}
aside.sidebar.fixed {
    pointer-events: auto;
    position: static;
    transform: none;
    z-index: 400;
    background: none;
    border: none;
    transition: opacity .3s ease;
    .stickyElement{
        bottom: 0;
        position: absolute;
        right: 100%;
        transform: translateY(50%);
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 5px 5px 15px 5px;
        background-color: white;
        border-color: #fffc;
        border-width: 1px;
        border-style: solid;
        border-radius: 50px;
        transition-property: all;
        transition-timing-function: cubic-bezier(.4,0,.2,1);
        transition-duration: .3s;
        --ssn-shadow: -4px 4px 12px rgba(0, 0, 0, .1);
        --ssn-shadow-colored: -4px 4px 12px var(--ssn-shadow-color);
        box-shadow: var(--ssn-ring-offset-shadow, 0 0 #0000), var(--ssn-ring-shadow, 0 0 #0000), var(--ssn-shadow);
        @media ((max-width: 640px) and (max-height: 700px)) {
            padding: 0;
        }
        .head{
            display: flex;
            gap: 10px;
            .image{
                border-radius: 50%;
                overflow: hidden;
                width: 44px;
                height: 44px;
                img{
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }
            .title{
                font-weight: 700;
                color: #000;
                &.hidden{
                    display: none;
                }
            }
        }
        .options{
            display: flex;
            &:not(.no-hs){
                @media ((max-width: 640px) and (max-height: 700px)) {
                    display: none;
                }
            }
            flex-direction: column;
            gap: 8px;
            .option{
                align-items: center;
                display: flex;
                gap: 12px;
                &.wysiwyg{
                    min-width: 300px;
                    display: block;
                    padding: 15px;
                }
                &:last-child{
                    margin-bottom: 5px;
                }
                > a{
                    transition: color .3s ease-in-out;
                    font-size: .875rem;
                    line-height: 1.25rem;
                    text-decoration: none;
                    white-space: nowrap;
                    display: flex;
                    gap: 5px;
                    &:hover{
                        color: black;
                        .icon img{
                            filter: drop-shadow(0px 0px 3px var(--mainColor, #000));
                        }
                    }
                }
                .icon{
                    padding: 0 7px;
                    display: flex;
                    img{
                        width: 28px;
                        max-height: 28px;
                        object-fit: contain;
                    }
                }
                .link{
                    &.hidden{
                        display: none;
                    }
                }
                &.divider{
                    hr{
                        margin: 5px 0;
                        background: rgb(206, 206, 206);
                        width: 100%;
                    }
                }
                &.hidden{
                    display: none;
                }
            }
        }
    }
    /* Aufklappen per Hover nur mit Maus (html.ssn-can-hover setzt das Script per (hover: hover)):
       auf Touch-Geraeten (iOS) macht der erste Tipp sonst nur den Hover-Zustand und erst der zweite den Klick */
    .ssn-can-hover &:hover,
    &:focus,
    &:focus-within{
        .stickyElement{
            border-radius: 20px;
            padding: 16px;
            @media ((max-width: 640px) and (max-height: 700px)) {
                position: absolute;
                bottom: 0;
                right: 0;
            }
            .title.hidden,
            .options .option.hidden,
            .options .link.hidden{
                display: flex;
                align-items: center;
                &.wysiwyg{
                    display: block;
                }
            }
            .options{
                @media ((max-width: 640px) and (max-height: 700px)) {
                    display: flex;
                }
            }
        }
    }
}
div.sidebar-wrapper.scroll-hide:not(.modal-open) aside.sidebar.fixed:not(.ssn-can-hover :hover):not(:focus):not(:focus-within) .stickyElement{
    transform: translateY(50%) translateX(calc(98% + 10px));
}

/* ==========================================================================
   Header-Modus: Icon im Header + Modal-Darstellung
   ========================================================================== */

/* Header-Trigger (Icon im Header) - bis zur Einhängung versteckt (gegen FOUC) */
.ssn-header-trigger{
    width: 40px;
    height: 40px;
    padding: 6px;
    border: 1px solid #fffc;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, .1);
    transition: box-shadow .2s ease, outline-offset .15s ease;
}
.ssn-header-trigger:focus{
    outline: none;
}
.ssn-header-trigger:focus-visible{
    outline: 3px solid var(--mainColor, #2271b1);
    outline-offset: 3px;
}
.ssn-header-trigger img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.ssn-header-trigger:hover{
    box-shadow: -4px 4px 16px rgba(0, 0, 0, .18);
}

/* Icon-Gruppe (ein Icon je Box) - bis zur Einhaengung versteckt */
.ssn-header-triggers{
    display: none;
    gap: 8px;
    align-items: center;
}
/* Farbige Boxen: Icon-Kreis in der Boxfarbe, weil die Box-Icons weiss sind */
.ssn-header-trigger.has-color{
    background-color: var(--ssn-panel-color);
    border-color: var(--ssn-panel-color);
}

/* Header-Modus greift nur auf mobilen Geräten (Theme-Breakpoint: 1200px) */
@media (max-width: 1200px){
    /* Variante 1: Icon-Gruppe ist im Header eingehängt (vor #site-navigation) */
    .ssn-header-triggers.in-header{
        display: flex;
        position: relative;
        margin-left: auto;
        align-self: center;
        flex-shrink: 0;
        pointer-events: auto;
    }
    .ssn-header-triggers.in-header .ssn-header-trigger{
        display: flex;
        pointer-events: auto;
    }

    /* Variante 2: Fallback - kein #site-navigation gefunden, fixiert oben rechts */
    .ssn-header-triggers.floating{
        display: flex;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 9997;
        pointer-events: auto;
    }
    .ssn-header-triggers.floating .ssn-header-trigger{
        display: flex;
        width: 48px;
        height: 48px;
        padding: 8px;
        pointer-events: auto;
    }

    /* Im Header-Modus: seitliche Sticky Nav komplett ausblenden (außer die im Modal geoeffnete Box) */
    div.sidebar-wrapper.has-header-mode:not(.modal-open) aside.sidebar.fixed,
    div.sidebar-wrapper.has-header-mode.modal-open aside.sidebar.fixed:not(.is-open){
        display: none;
    }

    /* Header-Modus: Box klappt unterhalb des Headers auf (Offset setzt das Script), der Header bleibt
       sichtbar und bedienbar - das Icon selbst schliesst wieder, ein extra Schliessen-Button entfaellt */
    div.sidebar-wrapper.has-header-mode.modal-open aside.sidebar.fixed,
    div.sidebar-wrapper.has-header-mode.modal-open .ssn-modal-backdrop{
        top: var(--ssn-header-offset, 0px);
    }
    div.sidebar-wrapper.has-header-mode.modal-open aside.sidebar.fixed{
        padding: 15px;
    }
    div.sidebar-wrapper.has-header-mode.modal-open .ssn-modal-close{
        display: none;
    }
    div.sidebar-wrapper.has-header-mode.modal-open aside.sidebar.fixed.has-color .stickyElement{
        padding: 24px;
    }
    /* Aktives Icon markieren */
    .ssn-header-triggers.in-header .ssn-header-trigger[aria-expanded="true"]{
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ssn-panel-color, #333);
    }
}

/* Modal-Backdrop */
.ssn-modal-backdrop{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .45);
    z-index: 9996;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
div.sidebar-wrapper.modal-open .ssn-modal-backdrop{
    opacity: 1;
    pointer-events: auto;
}

/* Schließen-Button (X) */
.ssn-modal-close{
    pointer-events: auto;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    border: 1px solid #fffc;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    color: #333;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, .1);
    transition: box-shadow .2s ease;
}
.ssn-modal-close span{
    display: block;
    margin-top: -3px;
}
.ssn-modal-close:hover{
    box-shadow: -4px 4px 16px rgba(0, 0, 0, .18);
}
.ssn-modal-close:focus{
    outline: none;
}
.ssn-modal-close:focus-visible{
    outline: 3px solid var(--mainColor, #2271b1);
    outline-offset: 3px;
}

/* Fokus-Stil für Links im Modal/Sticky Element */
div.sidebar-wrapper aside.sidebar.fixed .stickyElement a:focus{
    outline: none;
}
div.sidebar-wrapper aside.sidebar.fixed .stickyElement a:focus-visible{
    outline: 2px solid var(--mainColor, #2271b1);
    outline-offset: 3px;
    border-radius: 4px;
}
div.sidebar-wrapper.modal-open .ssn-modal-close{
    display: flex;
}

/* Modal-Darstellung der stickyElement */
div.sidebar-wrapper.modal-open aside.sidebar.fixed{
    pointer-events: auto;
    opacity: 1;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: none;
    z-index: 9998;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 80px 15px 15px 15px;
}
div.sidebar-wrapper.modal-open aside.sidebar.fixed .stickyElement{
    position: relative;
    right: auto;
    bottom: auto;
    transform: none;
    border-radius: 20px;
    padding: 24px;
    max-width: 360px;
    width: auto;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    animation: ssnModalIn .3s cubic-bezier(.4,0,.2,1);
}
/* Versteckte Elemente im Modal vollständig anzeigen */
div.sidebar-wrapper.modal-open .stickyElement .head .title.hidden,
div.sidebar-wrapper.modal-open .stickyElement .options .option.hidden,
div.sidebar-wrapper.modal-open .stickyElement .options .option .link.hidden{
    display: flex;
    align-items: center;
}
/* Farbige Box im Modal: nicht die 60px-Kachel mit Hover-Logik, sondern eine Karte in voller Breite,
   so hoch wie ihr Inhalt; Spalte 2 nimmt den Restplatz, Text darf umbrechen, Inhalt ist ohne Hover sichtbar */
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement{
    width: 100%;
    min-height: 0;
    align-self: flex-start;
    align-content: start;
    grid-template-columns: var(--ssn-panel-icon) minmax(0, 1fr);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    padding: 24px;
}
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .head .title,
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .options,
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .options .option{
    width: auto;
    white-space: normal;
}
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .head .title.hidden,
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .options .option.hidden,
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .options .link.hidden{
    visibility: visible;
}
div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement .options .option.divider{
    display: none;
}
@media (max-width: 640px){
    div.sidebar-wrapper.modal-open aside.sidebar.fixed.has-color .stickyElement{
        border-radius: 0 0 24px 24px;
        padding: 70px 20px 24px 20px;
    }
    div.sidebar-wrapper.has-header-mode.modal-open aside.sidebar.fixed{
        padding: 0;
    }
    div.sidebar-wrapper.has-header-mode.modal-open aside.sidebar.fixed.has-color .stickyElement{
        padding: 24px 20px 28px;
    }
}
div.sidebar-wrapper.modal-open .stickyElement .options .option.wysiwyg.hidden{
    display: block;
}
/* Im geoeffneten Panel sind die Optionen immer sichtbar - auch auf kleinen Displays (bis 640x700, z. B. iPhone SE
   oder Querformat), wo die Regel ".options:not(.no-hs) { display: none }" sonst gewinnt. Bisher kamen sie dort nur
   ueber den Hover-Zustand, den der erste Tipp auf iOS ausgeloest hat (Maria 2026-09-25). */
div.sidebar-wrapper.modal-open .stickyElement .options,
div.sidebar-wrapper.modal-open aside.sidebar.fixed .stickyElement .options:not(.no-hs){
    display: flex;
}

@keyframes ssnModalIn{
    from{
        opacity: 0;
        transform: translateY(-12px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile: Modal als Slide-Down von oben, volle Breite */
@media (max-width: 640px){
    div.sidebar-wrapper.modal-open aside.sidebar.fixed{
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }
    div.sidebar-wrapper.modal-open aside.sidebar.fixed .stickyElement{
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        border-radius: 0 0 24px 24px;
        padding: 70px 20px 24px 20px;
        animation: ssnModalSlideDown .35s cubic-bezier(.4,0,.2,1);
    }
    @keyframes ssnModalSlideDown{
        from{
            opacity: 0;
            transform: translateY(-100%);
        }
        to{
            opacity: 1;
            transform: translateY(0);
        }
    }
}


/* ==========================================================================
   Topcart: farbige Panels (Utility Navigation)
   Design: eingeklappt 60x120 mit Icon, aufgeklappt 270x120 mit Inhalt,
   Radius 5px nur links, weisser Text, Ueberschrift Oswald.

   Wichtig fuers ruhige Aufklappen:
   - Der Wrapper richtet die Boxen rechtsbuendig aus, damit eine
     aufklappende Box die anderen nicht nach links zieht.
   - Raster und Innenabstaende sind in beiden Zustaenden identisch und in
     festen Pixelwerten gesetzt. Nur die Breite der Box aendert sich, der
     Inhalt wird lediglich freigegeben - dadurch bricht kein Text neu um.
   ========================================================================== */
:root{
    --ssn-panel-pad: 13px;
    --ssn-panel-icon: 34px;
    --ssn-panel-content: 198px;
    --ssn-panel-gap: 12px;
}

div.sidebar-wrapper.has-panels{
    right: 0;
    align-items: flex-end; /* haelt eingeklappte Boxen am rechten Rand */
}
div.sidebar-wrapper.has-panels aside.sidebar.fixed .stickyElement{
    position: relative;
    right: auto;
    bottom: auto;
    transform: none;
}

/* Markierung auf den farbigen Panels: weiss mit Panelfarbe, sonst waere sie blau auf blau (Maria 2026-09-17) */
aside.sidebar.fixed.has-color .stickyElement ::selection{
    background: #fff;
    color: var(--ssn-panel-color);
}
aside.sidebar.fixed.has-color .stickyElement ::-moz-selection{
    background: #fff;
    color: var(--ssn-panel-color);
}

/* Farbige Box - Raster in beiden Zustaenden gleich */
aside.sidebar.fixed.has-color .stickyElement{
    background-color: var(--ssn-panel-color);
    border: none;
    border-radius: 5px 0 0 5px;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, .15);
    min-height: 120px;
    width: calc(var(--ssn-panel-pad) * 2 + var(--ssn-panel-icon)); /* 60px */
    padding: 16px var(--ssn-panel-pad);
    overflow: hidden;
    display: grid;
    grid-template-columns: var(--ssn-panel-icon) var(--ssn-panel-content);
    grid-template-rows: auto auto;
    column-gap: var(--ssn-panel-gap);
    row-gap: 6px;
    align-content: center;
    gap: 6px var(--ssn-panel-gap);
}
/* Bild und Titel sollen eigene Rasterzellen sein */
aside.sidebar.fixed.has-color .stickyElement .head{
    display: contents;
}
aside.sidebar.fixed.has-color .stickyElement .head .image{
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
    border-radius: 0;
    width: var(--ssn-panel-icon);
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
aside.sidebar.fixed.has-color .stickyElement .head .image img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
aside.sidebar.fixed.has-color .stickyElement .head .title{
    grid-column: 2;
    grid-row: 1;
    width: var(--ssn-panel-content);
    color: #fff;
    font-family: var(--headline, inherit);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}
aside.sidebar.fixed.has-color .stickyElement .options{
    grid-column: 2;
    grid-row: 2;
    width: var(--ssn-panel-content);
    gap: 6px;
}
aside.sidebar.fixed.has-color .stickyElement .options .option{
    white-space: nowrap;
}
aside.sidebar.fixed.has-color .stickyElement .options .option > a,
aside.sidebar.fixed.has-color .stickyElement .options .option > .no-link{
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    gap: 5px;
    align-items: center;
}
aside.sidebar.fixed.has-color .stickyElement .options .option .icon{
    padding: 0;
}
aside.sidebar.fixed.has-color .stickyElement .options .option .icon img{
    width: 21px;
    max-height: 21px;
}
aside.sidebar.fixed.has-color .stickyElement .options .option.wysiwyg{
    min-width: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #fff;
    white-space: normal;
}
aside.sidebar.fixed.has-color .stickyElement .options .option.wysiwyg p{
    margin: 0;
}
aside.sidebar.fixed.has-color .stickyElement .options .option.wysiwyg a{
    color: #fff;
}
/* Die automatische Trennlinie des Plugins passt hier nicht ins Design */
aside.sidebar.fixed.has-color .stickyElement .options .option.divider{
    display: none;
}
/* Design: beim Service-Portal steht der Pfeil rechts vom Text */
aside.sidebar.fixed.has-color .stickyElement .options .option:last-child > a{
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 8px;
}

/* Hover auf Verlinkungen (Maria 2026-09-17): Text unterstrichen statt Icon-Schatten, Farbe bleibt weiss */
.ssn-can-hover aside.sidebar.fixed.has-color .stickyElement .options .option > a:hover,
aside.sidebar.fixed.has-color .stickyElement .options .option > a:focus-visible{
    color: #fff;
}
.ssn-can-hover aside.sidebar.fixed.has-color .stickyElement .options .option > a:hover .icon img,
aside.sidebar.fixed.has-color .stickyElement .options .option > a:focus-visible .icon img{
    filter: none;
}
.ssn-can-hover aside.sidebar.fixed.has-color .stickyElement .options .option > a:hover .link,
aside.sidebar.fixed.has-color .stickyElement .options .option > a:focus-visible .link{
    text-decoration: underline;
}
/* Pfeil-Link (Service-Portal, Icon rechts vom Text): wie der Pfeil-Button - Pfeil rueckt 5px nach rechts, keine Unterstreichung */
aside.sidebar.fixed.has-color .stickyElement .options .option .icon{
    transition: transform .3s ease;
}
.ssn-can-hover aside.sidebar.fixed.has-color .stickyElement .options .option:last-child > a:hover .icon,
aside.sidebar.fixed.has-color .stickyElement .options .option:last-child > a:focus-visible .icon{
    transform: translateX(5px);
}
.ssn-can-hover aside.sidebar.fixed.has-color .stickyElement .options .option:last-child > a:hover .link,
aside.sidebar.fixed.has-color .stickyElement .options .option:last-child > a:focus-visible .link{
    text-decoration: none;
}

/* Geschlossen: Titel und Zeilen bleiben im Raster, nur unsichtbar - so hat die Box von Anfang an die Hoehe,
   die der Inhalt braucht, und beim Aufklappen springt nichts mehr (Maria 2026-09-17). Die Spalte 2 liegt
   ausserhalb der 60px und wird durch overflow: hidden weggeschnitten. */
aside.sidebar.fixed.has-color .stickyElement .head .title.hidden,
aside.sidebar.fixed.has-color .stickyElement .options .option.hidden,
aside.sidebar.fixed.has-color .stickyElement .options .link.hidden{
    display: flex;
    align-items: center;
    visibility: hidden;
}
aside.sidebar.fixed.has-color .stickyElement .options .option.hidden.wysiwyg{
    display: block;
}
aside.sidebar.fixed.has-color .stickyElement .options .option.divider{
    display: none;
}

/* Aufgeklappt: nur die Breite waechst, das Raster und die Hoehe bleiben unveraendert */
.ssn-can-hover aside.sidebar.fixed.has-color:hover .stickyElement,
aside.sidebar.fixed.has-color:focus .stickyElement,
aside.sidebar.fixed.has-color:focus-within .stickyElement{
    width: calc(var(--ssn-panel-pad) * 2 + var(--ssn-panel-icon) + var(--ssn-panel-gap) + var(--ssn-panel-content)); /* 270px */
    border-radius: 5px 0 0 5px;
    padding: 16px var(--ssn-panel-pad);
}
.ssn-can-hover aside.sidebar.fixed.has-color:hover .stickyElement .head .title.hidden,
.ssn-can-hover aside.sidebar.fixed.has-color:hover .stickyElement .options .option.hidden,
.ssn-can-hover aside.sidebar.fixed.has-color:hover .stickyElement .options .link.hidden,
aside.sidebar.fixed.has-color:focus .stickyElement .head .title.hidden,
aside.sidebar.fixed.has-color:focus .stickyElement .options .option.hidden,
aside.sidebar.fixed.has-color:focus .stickyElement .options .link.hidden,
aside.sidebar.fixed.has-color:focus-within .stickyElement .head .title.hidden,
aside.sidebar.fixed.has-color:focus-within .stickyElement .options .option.hidden,
aside.sidebar.fixed.has-color:focus-within .stickyElement .options .link.hidden{
    visibility: visible;
}
