.modal {
    --bs-modal-border-radius: 10px;
    --bs-modal-border-width: 1px;
    --bs-modal-inner-border-radius: calc(var(--bs-modal-border-radius) - (var(--bs-modal-border-width)));

    --bs-modal-header-border-width: 0;
    --bs-modal-footer-border-width: 0;
    --bs-modal-footer-gap: 0.5rem;
}

.modal-header {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.modal-body {
    padding: 0.5rem 1.5rem 0.5rem 1.5rem;
}

.modal-footer {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    gap: var(--bs-modal-footer-gap);
}

.modal-footer>* {
    margin: 0;
}

/* Bottom sheet on phones (e.g. Add widget: .modal-bottom-sheet) */

@media (max-width: 575.98px) {
    .modal-bottom-sheet .modal-dialog {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        max-width: none;
        height: auto;
    }

    /* The content, not the dialog, caps the height: .modal-dialog-scrollable then scrolls the body inside it */
    .modal-bottom-sheet .modal-dialog .modal-content {
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: 20px 20px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .modal-bottom-sheet.fade .modal-dialog {
        transform: translateY(100%);
    }

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