/* ═══════════════════════════════════════════════════════════════════════════════ */
/* DevExpress Blazor Popups/Dropdowns - Globale z-index Regeln                     */
/* Diese müssen global sein, da DevExpress Popups im <body> gerendert werden       */
/* ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* Modal Portal Container - Höchste Priorität                                      */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.modal-portal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    isolation: isolate;
}

.modal-portal .dxbl-popup-wrapper,
.modal-portal .dxbl-popup,
.modal-portal .dxbl-modal-back {
    z-index: 999999 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* DxPopup Modal - Innerhalb des Portals                                           */
/* ═══════════════════════════════════════════════════════════════════════════════ */

/* DxPopup Wrapper */
.dxbl-popup-wrapper {
    z-index: 100001 !important;
    position: fixed !important;
}

/* DxPopup Modal Background/Overlay */
.dxbl-popup-wrapper > .dxbl-modal-back,
.dxbl-popup-modal-back,
.dxbl-modal-back {
    z-index: 100000 !important;
    background-color: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(4px) !important;
}

/* DxPopup Content Container */
.dxbl-popup-wrapper > .dxbl-popup,
.dxbl-popup {
    z-index: 100002 !important;
}

/* DxPopup innerer Content */
.dxbl-popup-content,
.dxbl-popup-body,
.dxbl-popup-header,
.dxbl-popup-footer {
    z-index: inherit !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* DevExpress Dropdowns und Menüs                                                  */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.dxbl-dropdown-area,
.dxbl-modal,
.dxbl-dropdown,
.dxbl-combobox-dropdown,
.dxbl-drop-down,
.dxbl-listbox-dropdown,
.dxbl-menu-dropdown {
    z-index: 100000 !important;
}

.dxbl-btn-dropdown,
.dxbl-btn-group .dxbl-dropdown-area {
    z-index: 100000 !important;
}

.dx-overlay-wrapper,
.dx-popup-wrapper,
.dx-dropdowneditor-overlay,
.dx-overlay-content {
    z-index: 100000 !important;
}

.dx-overlay-shader {
    z-index: 99999 !important;
}

[class*="dxbl-"][class*="dropdown"],
[class*="dxbl-"][class*="popup"],
[class*="dxbl-"][class*="modal"] {
    z-index: 100000 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* Cookie Banner und Floating Button                                               */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.cookie-consent-banner {
    z-index: 9998 !important;
}

.cookie-floating-button {
    z-index: 40 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* Stacking Context Reset                                                          */
/* ═══════════════════════════════════════════════════════════════════════════════ */

footer {
    position: relative;
    z-index: auto;
}

/* Verhindere, dass flex-Container einen neuen stacking context erstellen */
.flex.min-h-screen {
    isolation: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* Android Autofill Schutz                                                         */
/* Verhindert, dass Android Chrome/Samsung Browser DOM-Texte überschreibt          */
/* ═══════════════════════════════════════════════════════════════════════════════ */

/* Autofill-Highlighting unterdrücken */
input:-webkit-autofill,
select:-webkit-autofill,
textarea:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s !important;
    caret-color: inherit !important;
}

/* Autofill-Animation erkennen (wird vom JS genutzt) */
@keyframes onAutoFillStart {
    from { /* leer */ }
    to { /* leer */ }
}

input:-webkit-autofill {
    animation-name: onAutoFillStart;
    animation-duration: 0.01s;
}

/* Geschützte Text-Elemente: user-select verhindert Textersetzung durch Tastatur */
[data-af-protect],
[role="presentation"][data-form-type="other"] {
    -webkit-user-modify: read-only !important;
    user-select: text;
}
