html.ab-mrc-no-scroll,
body.ab-mrc-no-scroll {
    overflow: hidden;
}

.ab-mrc-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    inset: 0;
    contain: layout style;
}

.ab-mrc-modal.is-open {
    display: block;
}

.ab-mrc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.ab-mrc-dialog {
    position: relative;
    width: min(760px, calc(100% - 32px));
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin: 32px auto;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.ab-mrc-modal.is-busy .ab-mrc-dialog {
    cursor: wait;
}

.ab-mrc-x {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.ab-mrc-dialog h3 {
    margin: 0 32px 6px 0;
}

.ab-mrc-intro {
    margin: 0 0 18px;
}

.ab-mrc-error {
    color: #b00020;
    font-weight: 600;
    margin-bottom: 12px;
}

.ab-mrc-error:empty {
    display: none;
}

.ab-mrc-row {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    background: #fafafa;
}

.ab-mrc-row h4 {
    margin: 0 0 12px;
}

.ab-mrc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.ab-mrc-grid label span {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.ab-mrc-grid select,
.ab-mrc-grid input[type="number"] {
    width: 100%;
    min-height: 42px;
}

.ab-mrc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.ab-mrc-check span {
    margin: 0;
}

.ab-mrc-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.ab-mrc-actions .button {
    min-width: 120px;
}

.ab-mrc-confirm {
    background: #ed1c24 !important;
    color: #fff !important;
    border-color: #ed1c24 !important;
}

@media (max-width: 720px) {
    .ab-mrc-dialog {
        margin: 16px auto;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        padding: 18px;
    }

    .ab-mrc-grid {
        grid-template-columns: 1fr;
    }

    .ab-mrc-actions {
        flex-direction: column;
    }
}
