/* ===== Modal genérico SMITCO — solo CSS/JS, sin frameworks =====
   API: window.PWEBModal.alert / .confirm / .loading / .close
   Mismo lenguaje visual que los modales de Solicitud de Facturas. */

.PWEB_MODAL_backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease, visibility 0.16s ease;
    z-index: 10000;
}

    .PWEB_MODAL_backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

.PWEB_MODAL {
    width: min(460px, calc(100vw - 2rem));
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.PWEB_MODAL_backdrop.is-open .PWEB_MODAL {
    transform: scale(1) translateY(0);
}

.PWEB_MODAL_head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 24px 16px;
    border-bottom: 1px solid #f1f3f5;
}

.PWEB_MODAL_icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.PWEB_MODAL_icon--error {
    background: #ef4444;
}

.PWEB_MODAL_icon--success {
    background: #51a121;
}

.PWEB_MODAL_icon--info {
    background: #64748b;
}

.PWEB_MODAL_icon--confirm {
    background: #d97706;
}

.PWEB_MODAL_title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

.PWEB_MODAL_body {
    padding: 18px 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.PWEB_MODAL_msg {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.6;
    color: #6b7280;
    text-align: center;
}

.PWEB_MODAL_list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .PWEB_MODAL_list li {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 12px;
        border-radius: 8px;
        background: #f6f8f4;
        border: 1px solid #e6e8e3;
        font-size: 0.82rem;
        color: #374151;
        text-align: left;
        line-height: 1.45;
    }

    .PWEB_MODAL_list li i {
        margin-top: 0.15rem;
        flex-shrink: 0;
        font-size: 0.7rem;
        color: #51a121;
    }

.PWEB_MODAL_spinner {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}

.PWEB_MODAL_spinnerRing {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #e6e8e3;
    border-top-color: #51a121;
    animation: pwebModalSpin 0.7s linear infinite;
}

@keyframes pwebModalSpin {
    to {
        transform: rotate(360deg);
    }
}

.PWEB_MODAL_foot {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 6px 24px 22px;
}

.PWEB_MODAL_btn {
    border: 1px solid transparent;
    padding: 9px 26px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    color: #ffffff;
    background: #64748b;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

    .PWEB_MODAL_btn:hover {
        transform: translateY(-1px);
    }

.PWEB_MODAL_btn--primary {
    background: #51a121;
    box-shadow: 0 3px 10px rgba(81, 161, 33, 0.22);
}

    .PWEB_MODAL_btn--primary:hover {
        background: #3d7a19;
        box-shadow: 0 5px 14px rgba(81, 161, 33, 0.3);
    }

.PWEB_MODAL_btn--danger {
    background: #ef4444;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.22);
}

    .PWEB_MODAL_btn--danger:hover {
        background: #dc2626;
        box-shadow: 0 5px 14px rgba(239, 68, 68, 0.3);
    }

.PWEB_MODAL_btn--ghost {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

    .PWEB_MODAL_btn--ghost:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

[hidden] {
    display: none !important;
}
