/**
 * Confirm dialog used instead of window.confirm() — matches the Listivo panel
 * palette (see free-forever.css).
 */

.rp-confirm {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(24, 39, 48, .55);
    opacity: 0;
    transition: opacity .15s ease;
}

.rp-confirm--visible {
    opacity: 1;
}

.rp-confirm-open {
    overflow: hidden;
}

.rp-confirm__box {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(24, 39, 48, .25);
    transform: translateY(8px);
    transition: transform .15s ease;
}

.rp-confirm--visible .rp-confirm__box {
    transform: translateY(0);
}

.rp-confirm__box--centered {
    text-align: center;
}

.rp-confirm__box--centered .rp-confirm__actions {
    justify-content: center;
}

/* Warning glyph above the title. */
.rp-confirm__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border: 3px solid #FF9540;
    border-radius: 50%;
    color: #FF9540;
    font-size: 34px;
    font-weight: 700;
    line-height: 58px;
    text-align: center;
}

.rp-confirm__title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #182730;
}

.rp-confirm__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #5b6b76;
}

.rp-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.rp-confirm__button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.rp-confirm__button:focus-visible {
    outline: 2px solid #9ccc65;
    outline-offset: 2px;
}

.rp-confirm__button--cancel {
    border-color: #d5e3ee;
    background: #fff;
    color: #182730;
}

.rp-confirm__button--cancel:hover {
    background: #f7fafc;
    border-color: #b9cddd;
}

/*
 * "Keep" painted as the affirmative choice: on a destructive prompt the safe
 * option should be the one that looks clickable, not the outline afterthought.
 */
.rp-confirm__button--safe,
.rp-confirm__button--safe:hover {
    border-color: transparent;
    color: #fff;
}

.rp-confirm__button--safe {
    background: #9CCC65;
}

.rp-confirm__button--safe:hover {
    background: #4ca54c;
}

.rp-confirm__button--confirm {
    background: #9ccc65;
    color: #fff;
}

.rp-confirm__button--confirm:hover {
    background: #8bbd52;
}

.rp-confirm__button--danger {
    background: #E05B4B;
}

.rp-confirm__button--danger:hover {
    background: #d13520;
}

@media (max-width: 480px) {
    .rp-confirm__actions {
        flex-direction: column-reverse;
    }

    /* Keep the safe (green) button on top rather than under the destructive one. */
    .rp-confirm__box--centered .rp-confirm__actions {
        flex-direction: column;
    }

    .rp-confirm__button {
        width: 100%;
    }
}
