﻿/* =========================================================
   waitoverlay.css
   Universal Processing Overlay System
   Works with modal, card, page, grid, etc.
   ========================================================= */

/* Parent container must have position: relative */
.wait-container {
    position: relative;
}

/* Overlay (default: covers its container) */
.wait-overlay {
    position: absolute;
    inset: 0; /* top/right/bottom/left */

    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.60);
    backdrop-filter: blur(1px);
    z-index: 9999;
    /* ✅ IMPORTANT: block clicks */
    pointer-events: auto;
    /* ✅ Better user feedback */
    cursor: wait;
}

/* Screen overlay mode: true middle of screen */
.wait-overlay.wait-screen {
    position: fixed;
    inset: 0;
    z-index: 20000; /* above modals/backdrops */
}

/* Hidden state */
.wait-hidden {
    display: none !important;
}

/* Optional smooth fade */
.wait-overlay.fade-in {
    animation: waitFade 0.15s ease-in-out;
}

@keyframes waitFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ✅ Keep SweetAlert above wait overlays */
.swal2-container {
    z-index: 30000 !important;
}


/* =========================================
   Salary Calculation Loading Overlay
========================================= */

.salary-calc-loading {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
}

.salary-calc-loading-card {
    width: min(420px, 92vw);
    background: #ffffff;
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
    text-align: center;
}

.salary-calc-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 16px auto;
    border: 5px solid #e5e7eb;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: salarySpin 0.85s linear infinite;
}

@keyframes salarySpin {
    to {
        transform: rotate(360deg);
    }
}

.salary-calc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
}

.salary-calc-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}