/* Custom Modal Styles */
.modal-backdrop {
    opacity: 0.75 !important;
    z-index: 1040;
}

.modal-backdrop.show {
    display: block !important;
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    outline: 0;
}

.custom-modal.show {
    display: block !important;
}

.custom-modal .modal-dialog {
    margin: 1.75rem auto;
    max-width: 800px;
    transform: none;
    transition: transform 0.3s ease-out;
}

.custom-modal .modal-content {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    border-radius: 0.3rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

.custom-modal .modal-header {
    background-color: #1a1d20 !important;
    border-bottom: 1px solid #343a40 !important;
    padding: 1rem;
}

.custom-modal .modal-title {
    color: #e9ecef !important;
    font-weight: 500;
}

.custom-modal .modal-body {
    padding: 1rem;
}

.custom-modal .btn-close {
    color: #fff !important;
    text-shadow: none !important;
    opacity: 0.8 !important;
    background-color: transparent !important;
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

.custom-modal .btn-close:hover {
    opacity: 1 !important;
}

/* Vorsichtshalber wichtige Bootstrap-Modalklassen überschreiben */
.modal.fade .modal-dialog {
    transition: transform .3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}