/**
 * PRORD Modal Styles
 *
 * Reusable alert/confirm popup.
 *
 * @package RedPro
 */

/* ─── Overlay ───────────────────────────────────────────── */
.prord-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.prord-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ─── Modal Box ─────────────────────────────────────────── */
.prord-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 100%;
    padding: 32px 28px 24px;
    position: relative;
    text-align: center;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.25s ease;
}

.prord-modal-overlay.is-open .prord-modal {
    transform: scale(1) translateY(0);
}

/* ─── Close Button ──────────────────────────────────────── */
.prord-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #999;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.prord-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.prord-modal-close:focus {
    outline: 2px solid #0a66c2;
    outline-offset: 2px;
}

.prord-modal-close:focus:not(:focus-visible) {
    outline: none;
}

/* ─── Icon ──────────────────────────────────────────────── */
.prord-modal-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.prord-modal-icon svg {
    width: 48px;
    height: 48px;
}

/* ─── Title ─────────────────────────────────────────────── */
.prord-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #191919;
    margin: 0 0 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─── Message ───────────────────────────────────────────── */
.prord-modal-message {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─── Action Buttons ────────────────────────────────────── */
.prord-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.prord-modal-btn {
    padding: 10px 28px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-width: 100px;
}

.prord-modal-btn:focus {
    outline: 2px solid #0a66c2;
    outline-offset: 2px;
}

.prord-modal-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Confirm button (primary). */
.prord-modal-confirm-btn {
    background: #0a66c2;
    color: #fff;
    border-color: #0a66c2;
}

.prord-modal-confirm-btn:hover {
    background: #004182;
    border-color: #004182;
}

/* Confirm button danger variant. */
.prord-modal-confirm-btn.is-danger {
    background: #cc1016;
    border-color: #cc1016;
}

.prord-modal-confirm-btn.is-danger:hover {
    background: #a10d12;
    border-color: #a10d12;
}

.prord-modal-confirm-btn.is-danger:focus {
    outline-color: #cc1016;
}

/* Confirm button success variant. */
.prord-modal-confirm-btn.is-success {
    background: #0f9d58;
    border-color: #0f9d58;
}

.prord-modal-confirm-btn.is-success:hover {
    background: #0b7a42;
    border-color: #0b7a42;
}

/* Cancel button (secondary). */
.prord-modal-cancel-btn {
    background: transparent;
    color: #666;
    border-color: #d0d0d0;
}

.prord-modal-cancel-btn:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #bbb;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
    .prord-modal {
        padding: 24px 20px 20px;
    }

    .prord-modal-actions {
        flex-direction: column-reverse;
    }

    .prord-modal-btn {
        width: 100%;
    }
}