/* OI Supplier Diversion Version 1.2 */
/* Changes from v1.0: change Elementor popup to html modal */
/*                  : select button styling */
/* Changes from v1.1: risk-high/risk-low identification */
/* Modal */
.oi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.oi-modal-content {
    background: white;
    padding: 25px;
    border-radius: 5px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
}

/* Table */
.oi-supplier-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.oi-supplier-table th {
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
}

.oi-supplier-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* Highlights */
.oi-savings { color: #4CAF50; font-weight: bold; }
.oi-cost { color: #E53935; font-weight: bold; }

/* Button Styling */
.oi-supplier-table button {
    background: #4CAF50 !important; /* Green */
    color: white !important;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 1 !important; /* Force visibility */
    transition: opacity 0.2s;
}

/* Hover State */
.oi-supplier-table button:hover {
    background: #3e8e41 !important;
    opacity: 0.9 !important;
}

/* Recommended Supplier Button */
.oi-supplier-table tr.recommended button {
    background: #2196F3 !important; /* Blue */
}

/* Table Headers */
.oi-supplier-table th {
    background: #2c3e50; /* Dark blue */
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
}

/* Column Alignment */
.oi-supplier-table td:nth-child(1) { text-align: left; }   /* Supplier */
.oi-supplier-table td:nth-child(2) { text-align: center; } /* Stock */
.oi-supplier-table td:nth-child(3) { text-align: center; } /* Transit */
.oi-supplier-table td:nth-child(4) { text-align: right; }  /* Cost */
.oi-supplier-table td:nth-child(5) { text-align: center; } /* Risk Score */
.oi-supplier-table td:nth-child(5) { text-align: center; } /* Button */

.risk-low { color: #4CAF50; }  /* Green for low risk (<=5) */
.risk-high { color: #E53935; } /* Red for high risk (>5) */