/* A small notice modal, the in-page replacement for the browser's alert().
   One instance, reused: the message changes, the chrome does not. Loaded
   globally and inert until mjNotice() is called, so it costs a page that never
   raises a notice only this stylesheet. */

.mj-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vmin;
    background: rgba(10, 14, 22, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.mj-notice-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mj-notice {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.16s ease;
}

.mj-notice-overlay.open .mj-notice {
    transform: none;
}

.mj-notice__body {
    display: flex;
    gap: 0.85rem;
    padding: 1.25rem 1.25rem 1rem;
}

.mj-notice__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.mj-notice__text {
    margin: 0;
    padding-top: 0.35rem;
    color: #1f2937;
    font-size: 0.96rem;
    line-height: 1.5;
}

.mj-notice__foot {
    display: flex;
    justify-content: flex-end;
    padding: 0 1.25rem 1.1rem;
}

.mj-notice__ok {
    border: 0;
    border-radius: 8px;
    padding: 0.55rem 1.4rem;
    background: #1f3a5f;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mj-notice__ok:hover {
    background: #17293f;
}

/* Confirm modal: a Cancel beside the primary, and a red primary for a
   destructive confirm (delete, remove). */
.mj-notice__foot {
    gap: 0.6rem;
}

.mj-notice__cancel {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 0.55rem 1.2rem;
    background: #fff;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mj-notice__cancel:hover {
    background: #f2f4f7;
}

.mj-notice__ok--danger {
    background: #b42318;
}

.mj-notice__ok--danger:hover {
    background: #912018;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mj-notice__cancel {
        background: transparent;
        color: #cbd5e1;
        border-color: #3a4658;
    }
    :root:not([data-theme="light"]) .mj-notice__cancel:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

/* Tone variants — the icon and its tint say what kind of notice it is. */
.mj-notice--info    .mj-notice__icon { background: #e6effb; color: #1f3a5f; }
.mj-notice--error   .mj-notice__icon { background: #fdeaea; color: #b42318; }
.mj-notice--success .mj-notice__icon { background: #e7f6ec; color: #1a7f42; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mj-notice { background: #1b2330; }
    :root:not([data-theme="light"]) .mj-notice__text { color: #e5e9f0; }
}
