/* Shared modal presentation. Keep modal actions aligned with the system's buttons. */
.modal-content {
    border: 1px solid #aeb9b6;
    border-radius: 0.2rem;
    box-shadow: 0 0.75rem 2rem rgba(17, 17, 17, 0.2);
    overflow: hidden;
}

.modal-header {
    align-items: center;
    background: #f7f9f9;
    border-bottom: 1px solid #d9e0de;
    padding: 1rem 1.25rem;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.modal-header .btn-close,
.modal-body > .btn-close:first-child {
    box-shadow: none;
    flex: 0 0 auto;
    margin: 0;
    opacity: 0.65;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus,
.modal-body > .btn-close:first-child:hover,
.modal-body > .btn-close:first-child:focus {
    opacity: 1;
}

.modal-body {
    line-height: 1.55;
    padding: 1.25rem;
}

.modal-body > :last-child {
    margin-bottom: 0;
}

.modal-footer {
    background: #f7f9f9;
    border-top: 1px solid #d9e0de;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
}

.modal .btn:not(.btn-close) {
    float: none !important;
    font-size: 1rem !important;
    font-weight: 600;
    margin: 0 !important;
    min-height: 2.5rem;
    padding: 0.45rem 0.9rem;
}

@media (max-width: 575.98px) {
    .modal-dialog[style] {
        min-width: 0 !important;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }
}
