/* =====================================================
   SHARED CONFIRMATION DIALOG
   -----------------------------------------------------
   Used by the _ConfirmModal partial + confirm-modal.js — the replacement for
   window.confirm().

   Namespaced .wv-confirm, NOT .wv-modal: user-management.css already owns
   .wv-modal / .wv-modal-overlay for the dialogs on State Defaults, System
   Defaults and Contaminants. Reusing that name blanked those dialogs (their
   panel inherited display:none) and left this one mis-sized on any page that
   loads user-management.css.
===================================================== */

.wv-confirm {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.wv-confirm.is-open {
    display: flex;
}

.wv-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(3px);
}

.wv-confirm-panel {
    position: relative;
    width: min(430px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px 28px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .3);
    text-align: center;
    animation: wv-confirm-in .18s ease-out;
}

@keyframes wv-confirm-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
}

.wv-confirm-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #eef4ff;
    color: #2563eb;
    font-size: 24px;
}

.wv-confirm.is-danger .wv-confirm-icon {
    background: #fef2f2;
    color: #dc2626;
}

.wv-confirm-panel h2 {
    margin: 0 0 8px;
    color: #0b1b4d;
    font-size: 20px;
    font-weight: 800;
}

.wv-confirm-panel p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.wv-confirm-panel p:empty {
    display: none;
}

.wv-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.wv-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: background .16s ease, border-color .16s ease, opacity .16s ease;
}

.wv-confirm-btn-secondary {
    border-color: #d8e0ec;
    background: #fff;
    color: #334155;
}

.wv-confirm-btn-secondary:hover {
    background: #f8fafc;
}

.wv-confirm-btn-primary {
    background: #2563eb;
    color: #fff;
}

.wv-confirm-btn-primary:hover {
    background: #1d4ed8;
}

.wv-confirm.is-danger .wv-confirm-btn-primary {
    background: #dc2626;
}

.wv-confirm.is-danger .wv-confirm-btn-primary:hover {
    background: #b91c1c;
}

.wv-confirm-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .25);
}

/* The confirm button keeps working while the page posts or navigates. */
.wv-confirm-btn.is-loading {
    cursor: progress;
    opacity: .85;
}

.wv-confirm-btn.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wv-confirm-spin .7s linear infinite;
}

@keyframes wv-confirm-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 520px) {
    .wv-confirm-actions {
        flex-direction: column-reverse;
    }

    .wv-confirm-btn {
        width: 100%;
    }
}
