/* =========================================
   OM Cookie Manager – eigenes Design
   ========================================= */

/* Dialogfenster */
.om-cookie-panel {
    position: fixed;
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;

    width: min(720px, calc(100vw - 32px));
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;

    padding: 32px 40px 24px;
    background: #fff;
    color: #000;
    border: 0;
    border-radius: 2px;

    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;

    z-index: 99999;

    /* Abdunklung hinter dem Dialog */
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.68);

    /* Position unabhängig vom alten Slide-in 
    transform: translate(-50%, -50%);*/
}

/* Sichtbarer Zustand des Plugins */
.om-cookie-panel.active {
    transform: translate(-50%, -50%);
    opacity: 1;
}

/* Überschrift: Das Template nutzt div.h3 */
.om-cookie-panel > .h3 {
    display: block;
    margin: 0 0 20px;
    padding: 0;
    color: #000;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
}

/* Cookie-Kategorien */
.om-cookie-panel .cookie-panel__selection {
    margin: 0 0 26px;
}

.om-cookie-panel .cookie-panel__selection form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 28px;
}

.om-cookie-panel .cookie-panel__checkbox-wrap {
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
    margin: 0;
}

/* Eigene sichtbare Checkbox statt display:none */
.om-cookie-panel .cookie-panel__checkbox {
    display: inline-block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0 10px 0 0;
    accent-color: #000;
    cursor: pointer;
}

.om-cookie-panel .cookie-panel__checkbox:disabled {
    cursor: not-allowed;
}

.om-cookie-panel .cookie-panel__checkbox + label {
    display: inline-block;
    float: none;
    margin: 0;
    color: #000;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}

.om-cookie-panel .cookie-panel__checkbox + label::before {
    display: none;
}

/* Beschreibungstext */
.om-cookie-panel .cookie-panel__description {
    clear: both;
    color: #000;
    text-align: center;
    line-height: 1.4;
}

.om-cookie-panel .cookie-panel__description p {
    margin: 0;
    padding: 0 0 8px;
	color: #555;
}

.om-cookie-panel .cookie-panel__description a,
.om-cookie-panel .cookie-panel__link a {
    color: #000;
    text-decoration: underline;
}

/* Aktionsbuttons */
.om-cookie-panel .cookie-panel__control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #555;
}

/* Bestehende Bootstrap-Buttons überschreiben */
.om-cookie-panel .cookie-panel__control button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 12px 18px;

    background: #fff;
    color: #000;
    border: 0;
    border-radius: 0;

    font: inherit;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: normal;

    cursor: pointer;
}

.om-cookie-panel .cookie-panel__control button:hover,
.om-cookie-panel .cookie-panel__control button:focus-visible {
    background: #eee;
    color: #000;
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Desktop: Speichern – Ablehnen – Akzeptieren */
.om-cookie-panel [data-omcookie-panel-save="save"] {
    order: 1;
}

.om-cookie-panel [data-omcookie-panel-save="min"] {
    order: 2;
}

.om-cookie-panel [data-omcookie-panel-save="all"] {
    order: 3;
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.om-cookie-panel [data-omcookie-panel-save="all"]:hover,
.om-cookie-panel [data-omcookie-panel-save="all"]:focus-visible {
    background: #333;
    color: #fff;
}

.om-cookie-panel .cookie-panel__link {
    padding-top: 18px;
}

/* =========================================
   Smartphone
   ========================================= */
@media (max-width: 767px) {
    .om-cookie-panel {
        width: calc(100vw - 32px);
        max-height: 90vh;
        padding: 22px 16px;
        font-size: 18px;
        text-align: left;
    }

    .om-cookie-panel > .h3 {
        margin-bottom: 24px;
        font-size: 28px;
        text-align: center;
    }

    .om-cookie-panel .cookie-panel__selection {
        margin-bottom: 24px;
    }

    .om-cookie-panel .cookie-panel__selection form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .om-cookie-panel .cookie-panel__checkbox-wrap {
        display: flex;
        align-items: center;
    }

    .om-cookie-panel .cookie-panel__checkbox {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
        margin-right: 14px;
    }

    .om-cookie-panel .cookie-panel__description {
        text-align: left;
        line-height: 1.4;
    }

    .om-cookie-panel .cookie-panel__description p {
        padding-bottom: 8px;
    }

    .om-cookie-panel .cookie-panel__control {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: 20px -16px -22px;
        padding: 20px 16px 8px;
    }

    .om-cookie-panel .cookie-panel__control button {
        order: initial;
        display: flex;
        width: 100%;
        min-height: 56px;
        padding: 14px 12px;
        font-size: 18px;
    }

    /* Mobil: Akzeptieren – Ablehnen – Speichern */
    .om-cookie-panel [data-omcookie-panel-save="all"] {
        order: 1 !important;
    }

    .om-cookie-panel [data-omcookie-panel-save="min"] {
        order: 2 !important;
    }

    .om-cookie-panel [data-omcookie-panel-save="save"] {
        order: 3 !important;
    }
}
/* ===== Cookie-Buttons: Farben und Anordnung korrigieren ===== */

.om-cookie-panel .cookie-panel__control {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100%;
}

.om-cookie-panel .cookie-panel__control button,
.om-cookie-panel .cookie-panel__control button.btn,
.om-cookie-panel .cookie-panel__control button.btn-outline-light {
    display: inline-flex !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;

    align-items: center !important;
    justify-content: center !important;

    padding: 12px 10px !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;

    background: #fff !important;
    color: #000 !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
}

/* Alle akzeptieren: schwarz mit weißer Schrift */
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="all"] {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* Hover und Tastaturfokus */
.om-cookie-panel .cookie-panel__control button:hover,
.om-cookie-panel .cookie-panel__control button:focus-visible {
    background: #e5e5e5 !important;
    color: #000 !important;
}

.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="all"]:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Smartphone: Buttons untereinander */
@media (max-width: 767px) {
    .om-cookie-panel .cookie-panel__control {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    .om-cookie-panel .cookie-panel__control button,
    .om-cookie-panel .cookie-panel__control button.btn {
        flex: 0 0 auto !important;
        width: 100% !important;
        min-height: 52px !important;
    }
}

/* Test: Speichern und Nur notwendige ohne Umrandung */
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="save"],
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="min"] {
    border: none !important;
    outline: none;
    box-shadow: none !important;
}

/* Auch beim Hover keine Umrandung */
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="save"]:hover,
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="min"]:hover {
    border: none !important;
    box-shadow: none !important;
}

/* Einheitliches Hover-Verhalten für alle Cookie-Buttons */
.om-cookie-panel .cookie-panel__control button,
.om-cookie-panel .cookie-panel__control button:hover,
.om-cookie-panel .cookie-panel__control button:active,
.om-cookie-panel .cookie-panel__control button:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Neutrale Buttons: immer weiß, Hover hellgrau */
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="save"],
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="min"] {
    background: #fff !important;
    color: #000 !important;
}

.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="save"]:hover,
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="min"]:hover,
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="save"]:active,
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="min"]:active {
    background: #e5e5e5 !important;
    color: #000 !important;
}

/* Hauptbutton: immer schwarz, auch bei Hover und Aktivierung */
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="all"],
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="all"]:hover,
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="all"]:active,
.om-cookie-panel .cookie-panel__control button[data-omcookie-panel-save="all"]:focus {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Speichern und Nur notwendige: kein Hover-Effekt */
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="save"]:hover,
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="min"]:hover {
    background: #fff !important;
    color: #000 !important;
}

/* Alle akzeptieren: Hover-Effekt */
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="all"]:hover {
    background: #777 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background-color 0.2s ease;
}
/* Hover für Speichern und Nur notwendige wiederherstellen */
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="save"]:hover,
.om-cookie-panel .cookie-panel__control
button[data-omcookie-panel-save="min"]:hover {
    background: #e5e5e5 !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ========================================
   BHT Style – Cookie-Checkboxen
   ======================================== */

/* Grunddesign */
.tx-om-cookie-consent input.cookie-panel__checkbox {
    -webkit-appearance: none !important;
    appearance: none !important;

    position: relative !important;
    display: inline-block !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;

    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;

    background: #fff !important;
    border: 2px solid #87ad28 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
}

/* Alte Häkchen entfernen */
.tx-om-cookie-consent input.cookie-panel__checkbox::before {
    content: none !important;
    display: none !important;
}

/* Ausgewählte optionale Cookies */
.tx-om-cookie-consent
input.cookie-panel__checkbox:checked:not(:disabled) {
    background: #fff !important;
    border-color: #87ad28 !important;
}

/* Inneres grünes Quadrat – exakt zentriert */
.tx-om-cookie-consent
input.cookie-panel__checkbox:checked:not(:disabled)::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;

    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;

    width: 6px !important;
    height: 6px !important;
    margin: 0 !important;
    padding: 0 !important;

    background: #87ad28 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Notwendige Cookies – grauer Rahmen */
.tx-om-cookie-consent
input.cookie-panel__checkbox:disabled:checked {
    background: #fff !important;
    border-color: #777 !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

/* Inneres graues Quadrat – exakt zentriert */
.tx-om-cookie-consent
input.cookie-panel__checkbox:disabled:checked::after {
    background: #777 !important;
}
/* Punkt für automatisch ausgewählte notwendige Cookies */
.tx-om-cookie-consent
input.cookie-panel__checkbox:disabled:checked::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;

    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;

    width: 6px !important;
    height: 6px !important;
    margin: 0 !important;
    padding: 0 !important;

    background: #777 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.tx-om-cookie-consent input.cookie-panel__checkbox {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;

    box-sizing: border-box !important;
    border-radius: 4px !important;
}