/* Modal Styles - Enhanced Bootstrap Modal Styling */

/* Modal backdrop - blur entfernt wegen Overlay-Problemen */
.modal-backdrop {
    /* backdrop-filter: blur(2px); - DEAKTIVIERT */
}

/* Modal dialog */
.modal-dialog {
    margin: 1.75rem auto;
    max-width: 90vw;
}

.modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
}

/* Modal content */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Modal header */
.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-title {
    font-weight: 600;
    color: #212529;
}

.modal-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

/* Modal body */
.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Modal footer */
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Form elements in modals */
.modal .form-control,
.modal .form-select {
    margin-bottom: 1rem;
}

.modal .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Button groups in modals */
.modal-footer .btn + .btn {
    margin-left: 0.5rem;
}

/* Loading states */
.modal-loading {
    text-align: center;
    padding: 2rem;
}

.modal-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Error states */
.modal-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.modal-error .error-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Success states */
.modal-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* Modal sizes */
.modal-sm .modal-dialog {
    max-width: 300px;
}

.modal-lg .modal-dialog {
    max-width: 800px;
}

.modal-xl .modal-dialog {
    max-width: 1140px;
}

/* Full screen modal */
.modal-fullscreen .modal-dialog {
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
}

.modal-fullscreen .modal-content {
    height: 100vh;
    border: 0;
    border-radius: 0;
}

/* Scrollable modals */
.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 3.5rem);
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

/* Animation improvements */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

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

/* Dark mode support - DEAKTIVIERT
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #343a40;
        color: #fff;
    }

    .modal-header,
    .modal-footer {
        background-color: #495057;
        border-color: #6c757d;
    }

    .modal-error {
        background-color: #2c0b0e;
        border-color: #842029;
        color: #ea868f;
    }

    .modal-success {
        background-color: #051b11;
        border-color: #0f5132;
        color: #75b798;
    }
}
*/

/* Responsive adjustments */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}