.ms-modal-lock {
    overflow: hidden !important;
}

.ms-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 12, 22, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, background 180ms ease;
}

.ms-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    background: rgba(8, 12, 22, 0.52);
}

.ms-modal__panel {
    --ms-modal-title-size: 1.1875rem;
    --ms-modal-action-size: .9375rem;
    --ms-modal-message-line: 1.65;
    width: min(100%, 22.5rem);
    overflow-wrap: anywhere;
    min-width: 0;
    max-height: calc(100dvh - 48px);
    overflow: auto;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 22px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.26);
    transform: translateY(8px) scale(0.98);
    transition: transform 180ms ease;
}

.ms-modal.is-open .ms-modal__panel {
    transform: translateY(0) scale(1);
}

.ms-modal__body {
    padding: 22px 22px 18px;
}

.ms-modal__title {
    margin: 0;
    font-size: var(--ms-modal-title-size);
    line-height: var(--ms-line-title);
    font-weight: var(--ms-weight-section);
    letter-spacing: 0;
}

.ms-modal__message {
    margin: 10px 0 0;
    color: #475569;
    font-size: 0.875rem;
    line-height: var(--ms-modal-message-line);
}

.ms-modal__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
    gap: 10px;
    padding: 0 22px 22px;
}

.ms-modal__button {
    min-height: 2.875rem;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    width: 100%;
    padding: .75rem 1rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: var(--ms-modal-action-size);
    font-weight: var(--ms-weight-action);
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.ms-modal__button:active {
    transform: scale(0.98);
}

.ms-modal__button.is-primary {
    border-color: #0f172a;
    background: #0f172a;
    color: #fff;
}

.ms-modal__button.is-danger {
    border-color: #ef4444;
    background: #dc2626;
    color: #fff;
}

.ms-modal__button.is-danger:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}
