#wcpt-unsaved-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

#wcpt-unsaved-modal.active {
    display: block;
}

/* Overlay */
.wcpt-unsaved-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 8, 8, 0.55);
    backdrop-filter: blur(2px);
}

/* Modal */
.wcpt-unsaved-box {
    position: relative;
    width: 420px;
    max-width: calc(100% - 32px);

    background: #ffffff;
    border-radius: 14px;

    margin: 12vh auto 0;

    padding: 28px 28px 24px;

    z-index: 2;

    box-shadow:
        0 10px 25px rgba(0,0,0,.12),
        0 2px 8px rgba(0,0,0,.08);

    animation: wcptModalIn .18s ease-out;
}

/* Animation */
@keyframes wcptModalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button */
.wcpt-unsaved-close {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 32px;
    height: 32px;

    border: none;
    border-radius: 50%;

    background: transparent;

    color: #888;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    transition: all .15s ease;
}

.wcpt-unsaved-close:hover {
    background: #f4f4f4;
    color: #222;
}

/* Heading */
.wcpt-unsaved-box h2 {
    margin: 0 0 14px;

    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;

    color: #1d1d1d;

    letter-spacing: -0.02em;
}

/* Body text */
.wcpt-unsaved-box p {
    margin: 0;

    font-size: 15px;
    line-height: 1.65;

    color: #555;
}

/* Actions */
.wcpt-unsaved-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 28px;
}

/* Shared button styles */
.wcpt-unsaved-actions button {
    height: 42px;

    padding: 0 18px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .08s ease;
}

.wcpt-unsaved-actions button:active {
    transform: translateY(1px);
}

/* Secondary button */
.wcpt-unsaved-stay {
    background: #fff;

    border: 1px solid #ddd;

    color: #333;
}

.wcpt-unsaved-stay:hover {
    background: #f7f7f7;
    border-color: #ccc;
}

/* Primary button */
.wcpt-unsaved-leave {
    background: #1b1717;

    border: 1px solid #1b1717;

    color: #fff;
}

.wcpt-unsaved-leave:hover {
    background: #2a2424;
    border-color: #2a2424;
}

/* Mobile */
@media (max-width: 480px) {

    .wcpt-unsaved-box {
        padding: 24px 20px 20px;
    }

    .wcpt-unsaved-actions {
        flex-direction: column-reverse;
    }

    .wcpt-unsaved-actions button {
        width: 100%;
    }

}