/*
 * The house look for every Bootstrap modal, in the app and the storefront.
 *
 * Centering is NOT forced here: every .modal-dialog carries
 * modal-dialog-centered in its markup (tests/Ui/NativeDialogTripwireTest.php
 * checks it), so a page can still see from the markup what it gets.
 *
 * Footer convention: right-aligned, Cancel/Close first (btn-secondary with
 * data-bs-dismiss), the action last (btn-primary, or btn-danger when it
 * destroys something). A tertiary button or a counter may sit on the left
 * with me-auto.
 */

.modal-header .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.modal-footer {
    justify-content: flex-end;
    align-items: center;
}

.modal-footer > .btn {
    min-width: 5.5rem;
}

/* ---- SmDialog (mini_shop/shared/sm-dialog.js) ----
 * Above any modal that is already open (Bootstrap: backdrop 1050, modal 1055). */
.modal.sm-dialog {
    --bs-modal-zindex: 1075;
    z-index: 1075;
}

.modal-backdrop.sm-dialog-backdrop {
    --bs-backdrop-zindex: 1070;
    z-index: 1070;
}

.sm-dialog .modal-dialog {
    max-width: 30rem;
}

.sm-dialog__message {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.sm-dialog__input {
    margin-top: .75rem;
}

@media (max-width: 575.98px) {
    .sm-dialog .modal-dialog {
        max-width: none;
    }
}
