.op-modal {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.op-modal:not(.op-modal-split) .op-modal__dialog {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: 0;
    max-width: none;
    min-height: 100%;
    padding: 0.875rem;
    width: 100%;
}

.op-modal:not(.op-modal-split) .op-modal__panel {
    background: #ffffff;
    border: 1px solid var(--op-dashboard-border, rgba(47, 43, 61, 0.12));
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(47, 43, 61, 0.18);
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - 1.75rem);
    overflow: hidden;
}

.op-modal:not(.op-modal-split) .op-modal__dialog--sm .op-modal__panel {
    height: min(88vh, 46rem);
    width: min(34rem, calc(100vw - 1.75rem));
}

.op-modal:not(.op-modal-split) .op-modal__dialog--compact .op-modal__panel {
    max-height: min(88vh, 42rem);
    width: min(34rem, calc(100vw - 1.75rem));
}

.op-modal:not(.op-modal-split) .op-modal__dialog--content .op-modal__panel {
    max-height: 88vh;
    width: min(42rem, calc(100vw - 1.75rem));
}

.op-modal:not(.op-modal-split) .op-modal__dialog--md .op-modal__panel {
    height: min(90vh, 54rem);
    width: min(58rem, calc(100vw - 1.75rem));
}

.op-modal:not(.op-modal-split) .op-modal__dialog--reading .op-modal__panel {
    height: 92vh;
    width: min(64rem, calc(100vw - 1.75rem));
}

.op-modal:not(.op-modal-split) .op-modal__dialog--lg .op-modal__panel {
    height: 92vh;
    width: min(92vw, 86rem);
}

.op-modal:not(.op-modal-split) .op-modal__dialog--fluid .op-modal__panel {
    max-height: 88vh;
    width: min(72rem, calc(100vw - 1.75rem));
}

.op-modal:not(.op-modal-split) .op-modal__header {
    align-items: flex-start;
    background: #ffffff;
    border-bottom: 1px solid var(--op-dashboard-border, rgba(47, 43, 61, 0.12));
    display: flex;
    flex: 0 0 auto;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.125rem;
}

.op-modal:not(.op-modal-split) .op-modal__heading {
    align-items: flex-start;
    display: flex;
    gap: 0.875rem;
    min-width: 0;
}

.op-modal:not(.op-modal-split) .op-modal__icon {
    align-items: center;
    background: var(--op-dashboard-primary-soft, #e7f1ff);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(var(--op-dashboard-primary-rgb, 13, 110, 253), 0.12);
    color: var(--op-dashboard-primary-text, #0d6efd);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.op-modal:not(.op-modal-split) .op-modal__icon--danger {
    background: var(--op-health-bad-soft, #ffebee);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.14);
    color: var(--op-health-bad-text, #991b1b);
}

.op-modal:not(.op-modal-split) .op-modal__heading-copy {
    min-width: 0;
}

.op-modal:not(.op-modal-split) .op-modal__subtitle {
    color: var(--op-dashboard-primary-text, #0d6efd);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0 0 0.18rem;
    text-transform: uppercase;
}

.op-modal:not(.op-modal-split) .op-modal__title {
    color: var(--op-dashboard-heading, #2f2b3d);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.op-modal:not(.op-modal-split) .op-modal__close {
    background-color: var(--op-dashboard-muted, #eef5ff);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.75rem;
    border: 0;
    border-radius: 8px;
    flex: 0 0 auto;
    height: 2rem;
    margin: -0.25rem 0 -0.25rem auto;
    opacity: 1;
    padding: 0;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    width: 2rem;
}

.op-modal:not(.op-modal-split) .op-modal__close:hover {
    background-color: var(--op-dashboard-primary-soft, #e7f1ff);
    opacity: 1;
}

.op-modal:not(.op-modal-split) .op-modal__close:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(var(--op-dashboard-primary-rgb, 13, 110, 253), 0.18);
    outline: none;
}

.op-modal:not(.op-modal-split) .op-modal__body {
    background: #ffffff;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
    scrollbar-gutter: stable;
}

.op-modal:not(.op-modal-split) .op-modal__dialog--lg .op-modal__body,
.op-modal:not(.op-modal-split) .op-modal__dialog--reading .op-modal__body,
.op-modal:not(.op-modal-split) .op-modal__dialog--fluid .op-modal__body {
    background: #f3f7ff;
}

.op-modal:not(.op-modal-split) .op-modal__footer {
    align-items: center;
    background: var(--op-dashboard-card-soft, #f8fbff);
    border-top: 1px solid var(--op-dashboard-border, rgba(47, 43, 61, 0.12));
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 0.875rem 1.125rem 1.125rem;
}

.op-modal:not(.op-modal-split) .op-modal__message p:last-child {
    margin-bottom: 0;
}

.op-modal:not(.op-modal-split) .op-modal-option-list {
    display: grid;
    gap: 0.6rem;
}

.op-modal:not(.op-modal-split) .op-modal-option {
    align-items: center;
    background: var(--op-dashboard-muted, #eef5ff);
    border: 1px solid var(--op-dashboard-border, rgba(47, 43, 61, 0.12));
    border-radius: 8px;
    color: var(--op-dashboard-heading, #2f2b3d);
    display: flex;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.75rem 0.875rem;
    text-align: left;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    width: 100%;
}

.op-modal:not(.op-modal-split) .op-modal-option i {
    color: var(--op-dashboard-primary-text, #0d6efd);
    width: 1rem;
}

.op-modal:not(.op-modal-split) .op-modal-option:hover,
.op-modal:not(.op-modal-split) .op-modal-option:focus-visible {
    background: var(--op-dashboard-primary-soft, #e7f1ff);
    border-color: rgba(var(--op-dashboard-primary-rgb, 13, 110, 253), 0.24);
    box-shadow: 0 4px 10px rgba(var(--op-dashboard-primary-rgb, 13, 110, 253), 0.12);
    outline: none;
}

.op-modal__backdrop.show {
    background-color: #2f2b3d;
    opacity: 0.42;
}

@media (max-width: 768px) {
    .op-modal:not(.op-modal-split) .op-modal__dialog {
        padding: 0.5rem;
    }

    .op-modal:not(.op-modal-split) .op-modal__dialog--compact .op-modal__panel,
.op-modal:not(.op-modal-split) .op-modal__dialog--content .op-modal__panel,
.op-modal:not(.op-modal-split) .op-modal__dialog--sm .op-modal__panel,
.op-modal:not(.op-modal-split) .op-modal__dialog--md .op-modal__panel,
.op-modal:not(.op-modal-split) .op-modal__dialog--fluid .op-modal__panel {
        height: auto;
        max-height: calc(100vh - 1rem);
        width: calc(100vw - 1rem);
    }

    .op-modal:not(.op-modal-split) .op-modal__dialog--reading .op-modal__panel {
        height: 100vh;
        max-width: 100vw;
        width: 100vw;
    }

    .op-modal:not(.op-modal-split) .op-modal__dialog--lg {
        padding: 0;
    }

    .op-modal:not(.op-modal-split) .op-modal__dialog--lg .op-modal__panel {
        border-radius: 0;
        height: 100vh;
        max-width: 100vw;
        width: 100vw;
    }

    .op-modal:not(.op-modal-split) .op-modal__header {
        padding: 1rem;
    }

    .op-modal:not(.op-modal-split) .op-modal__body {
        padding: 1rem;
    }

    .op-modal:not(.op-modal-split) .op-modal__footer {
        padding: 0.75rem 1rem 1rem;
    }
}
