/* OWL Consent 0.2.5 – E-Commerce OWL */
:root { --owlc-akzent: #2e7d5b; --owlc-knopf: #2e7d5b; }

/* Alte JTL-Oberfläche ausblenden – Speicher und window.CM bleiben */
body.owlc-aktiv #consent-manager { display: none !important; }

#owlc { position: fixed; z-index: 100000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.35); font-size: 15px; line-height: 1.45; }
#owlc .owlc-karte { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; }
#owlc[hidden] { display: none; }
#owlc .owlc-karte { display: flex; gap: 16px; align-items: flex-start; background: #fff; color: #222; border-radius: 16px; padding: 18px 20px; box-shadow: 0 8px 32px rgba(0,0,0,.22); }
#owlc .owlc-bild { width: 130px; height: auto; flex: 0 0 130px; }
#owlc .owlc-inhalt { flex: 1 1 auto; min-width: 0; }
#owlc .owlc-titel { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
#owlc .owlc-text { margin: 0 0 14px; }
#owlc .owlc-knoepfe { display: flex; gap: 10px; }
/* Beide Knöpfe identisch: gleiche Farbe, Größe, Schrift und Kontrast */
#owlc .owlc-knopf, .owlc-ds-box .owlc-knopf {
    flex: 1 1 0; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--owlc-knopf, var(--owlc-akzent)); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2;
}
#owlc .owlc-knopf:hover, #owlc .owlc-knopf:focus-visible, .owlc-ds-box .owlc-knopf:hover { filter: brightness(1.08); outline: 2px solid var(--owlc-akzent); outline-offset: 2px; }
#owlc .owlc-fuss { margin: 12px 0 0; font-size: 13px; }
#owlc .owlc-fuss a { color: inherit; text-decoration: underline; }
#owlc .owlc-gruppe { border-top: 1px solid #e5e5e5; padding: 8px 0; }
#owlc .owlc-gruppe label { display: flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; }
#owlc .owlc-gruppe input { width: 18px; height: 18px; accent-color: var(--owlc-akzent); }
#owlc .owlc-gruppe p { margin: 2px 0 0 26px; font-size: 13px; color: #555; }
#owlc .owlc-dienste { display: block; color: #5f5f5f; }

@media (max-width: 575px) {
    #owlc { padding: 10px; }
    #owlc .owlc-bild { width: 80px; flex-basis: 80px; }
    #owlc .owlc-karte { padding: 14px; gap: 10px; }
}

/* Dauerhaftes Symbol unten links */
#owlc-symbol { position: fixed; z-index: 99990; left: 16px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--owlc-akzent); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; padding: 8px; }
#owlc-symbol svg { width: 100%; height: 100%; }
body:has(#owlc:not([hidden])) #owlc-symbol { display: none; }

.owlc-ds-box { border: 1px solid #ddd; border-radius: 12px; padding: 14px 16px; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.owlc-ds-box p { margin: 0; flex: 1 1 260px; }
.owlc-ds-box .owlc-knopf { flex: 0 0 auto; }

/* Videos: Vorschau mit Play-Knopf */
.owlc-video { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; background: #111; border-radius: 8px; overflow: hidden; margin: 0 0 8px; }
.owlc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.owlc-video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #111; cursor: pointer; }
.owlc-video-bild { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.owlc-video-icon { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; border-radius: 12px; background: var(--owlc-akzent); }
.owlc-video-icon::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; }
.owlc-video-play:hover .owlc-video-icon { filter: brightness(1.1); }
.owlc-video-info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 10px; font-size: 12px; color: #fff; background: rgba(0,0,0,.6); }
.owlc-video-info a { color: #fff; text-decoration: underline; }
.owlc-video-info label { margin: 0; cursor: pointer; display: flex; gap: 4px; align-items: center; }

/* Chat-Knopf (Smartsupp lädt erst beim Klick) */
#owlc-chat { position: fixed; z-index: 99980; right: 16px; bottom: 16px; display: flex; gap: 6px; align-items: center; height: 48px; padding: 0 18px; border: 0; border-radius: 24px; background: var(--owlc-knopf, var(--owlc-akzent)); color: #fff; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.25); cursor: pointer; }
#owlc-chat svg { width: 20px; height: 20px; }
body:has(#owlc:not([hidden])) #owlc-chat { display: none; }
#owlc .owlc-karte:focus { outline: none; }

/* Drei Knöpfe immer gleich groß: nebeneinander, auf schmalen Schirmen alle untereinander */
#owlc .owlc-knoepfe-3 { flex-wrap: nowrap; }
#owlc .owlc-knoepfe-3 .owlc-knopf { flex: 1 1 0; min-width: 0; padding: 10px 8px; font-size: 14px; }
@media (max-width: 520px) {
    #owlc .owlc-knoepfe-3 { flex-direction: column; }
    #owlc .owlc-knoepfe-3 .owlc-knopf { flex: 0 0 auto; width: 100%; }
}

/* Eulen-Icon als dauerhafter Knopf (48 px) */
#owlc-symbol:has(img) { width: 40px; height: 40px; padding: 0; background: transparent; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
#owlc-symbol img { width: 100%; height: 100%; display: block; border-radius: 50%; }
#owlc .owlc-gruppe p.owlc-hinweis-video { color: #333; }
/* Runder Knopf mit dem eigenen Fensterbild: weißer Kreis mit Rahmen in der Akzentfarbe */
/* Ab 0.3.4 überall 40 px – gleich groß wie der Barrierefreiheits-Knopf von SALEPIX (WCAG 2.2: mind. 24 px) */
#owlc-symbol.owlc-symbol-bild { width: 40px; height: 40px; padding: 3px; background: #fff; border: 2px solid var(--owlc-akzent); }
#owlc-symbol.owlc-symbol-bild img { object-fit: contain; border-radius: 0; }

/* 0.2.3: Hinweis mit Maskottchen über dem Video-Platzhalter */
.owlc-vh { display: flex; gap: 14px; align-items: center; max-width: 100%; margin: 0 0 8px; padding: 12px 14px; border: 1px solid #e3e7ee; border-left: 5px solid var(--owlc-akzent); border-radius: 12px; background: #f7f9fc; color: #222; font-size: 15px; line-height: 1.45; text-align: left; }
.owlc-vh-bild { width: 130px; height: auto; flex: 0 0 130px; }
.owlc-vh-inhalt { flex: 1 1 auto; min-width: 0; }
.owlc-vh p { margin: 0 0 6px; }
.owlc-vh .owlc-vh-titel { font-weight: 700; font-size: 17px; }
.owlc-vh .owlc-vh-aktion { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 8px 0 0; }
.owlc-vh-knopf { min-height: 42px; padding: 9px 18px; border: 0; border-radius: 10px; background: var(--owlc-knopf, var(--owlc-akzent)); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.owlc-vh-knopf:hover, .owlc-vh-knopf:focus-visible { filter: brightness(1.08); outline: 2px solid var(--owlc-akzent); outline-offset: 2px; }
.owlc-vh a.owlc-vh-alle { color: inherit; font-size: 14px; text-decoration: underline; }
@media (max-width: 575px) {
    .owlc-vh { gap: 10px; padding: 10px; font-size: 14px; }
    .owlc-vh-bild { width: 84px; flex-basis: 84px; }
    .owlc-vh .owlc-vh-titel { font-size: 16px; }
}
/* Video-Vorschau in einem Seitenverhältnis-Rahmen des Themes (Bootstrap .embed-responsive / .ratio): Rahmen füllen statt darunter */
.embed-responsive > .owlc-video, .ratio > .owlc-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; aspect-ratio: auto; margin: 0; }

/* 0.2.5 Barrierefreiheit: sichtbarer Tastatur-Fokus auf allen Links und Knöpfen des Plugins */
#owlc a:focus-visible, .owlc-vh a:focus-visible, .owlc-video-info a:focus-visible, .owlc-link:focus-visible,
#owlc-symbol:focus-visible, #owlc-chat:focus-visible, .owlc-video-play:focus-visible, #owlc input:focus-visible {
    outline: 3px solid var(--owlc-knopf, #1a5c40); outline-offset: 2px; border-radius: 4px;
}
.owlc-video-play:focus-visible { outline-offset: -3px; }
/* 0.2.5 Schmale Bildschirme (bis 420 px, auch 400 % Zoom): Bild über den Text, Inhalt volle Breite */
@media (max-width: 420px) {
    #owlc .owlc-karte { flex-direction: column; align-items: stretch; }
    #owlc .owlc-bild { width: 72px; flex: 0 0 auto; align-self: center; }
    #owlc .owlc-knopf { padding: 10px 8px; }
    .owlc-vh { flex-direction: column; align-items: flex-start; }
    .owlc-vh-bild { width: 96px; flex: 0 0 auto; }
}

/* 0.2.7: angehaltene Karten/Einbettungen anderer Anbieter */
.owlc-fremd { display: flex; align-items: center; justify-content: center; min-height: 80px; padding: 12px; margin: 0 0 8px; border: 1px dashed #c9d1dc; border-radius: 10px; background: #f7f9fc; }
.owlc-fremd-knopf { border: 0; border-radius: 8px; padding: 10px 16px; background: var(--owlc-akzent, #1f6f8b); color: #fff; font-weight: 600; cursor: pointer; }
.owlc-fremd + iframe:not([src]) { display: none; }

/* 0.2.9: Video ohne Vorschaubild – Maskottchen auf hellem Grund statt dunklem Platzhalter */
.owlc-video-ohnebild { background: #f3f5f7; }
.owlc-video-ohnebild .owlc-video-play { background: #f3f5f7; }
.owlc-video-ohnebild .owlc-video-bild { object-fit: contain; object-position: 30% 50%; opacity: 1; padding: 6% 0 14%; box-sizing: border-box; }
.owlc-video-ohnebild .owlc-video-icon { left: 66%; }
/* Ab 0.3.1: Handy – kleinerer runder Knopf; verdeckt er einen Link/Knopf der Seite, rutscht er an den Rand (schmaler Rand bleibt klickbar) */
#owlc-symbol, #owlc-chat { transition: transform .25s ease, opacity .25s ease; }
#owlc-symbol.owlc-geparkt, #owlc-chat.owlc-geparkt { transform: translateX(-34px); opacity: .85; }
#owlc-symbol.owlc-geparkt-rechts, #owlc-chat.owlc-geparkt-rechts { transform: translateX(34px); }
@media (prefers-reduced-motion: reduce) { #owlc-symbol, #owlc-chat { transition: none; } }
