/* Daily Sales - Application-specific styles */

.highlight {
    background-color: #fff3cd;
    color: #856404;
    font-weight: bold;
}

.varianceneg {
    color: #dc3545;
}

.variancepos {
    color: #198754;
}

.rightline {
    border-right: 1px solid #dee2e6;
}

.doubleline {
    border-bottom: 3px double #000;
}

.due {
    background-color: #d1e7dd;
}

.invoice {
    background-color: #fff9e6;
}

/* Status badges for account status */
.badge.status-new { background-color: #198754; }
.badge.status-active { background-color: #0d6efd; }
.badge.status-inactive { background-color: #ffc107; color: #212529; }
.badge.status-lost { background-color: #dc3545; }

/* Score card table */
#dailySalesTable td {
    padding: 4px 8px;
    font-size: 0.875rem;
}

#dailySalesTable tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* DataTables search box alignment */
.dataTables_filter {
    text-align: left !important;
}

/* DataTables footer alignment */
.dataTables_wrapper tfoot th {
    text-align: right;
    font-weight: bold;
}

/* Select2 width fix inside panels */
.select2-container {
    width: 100% !important;
    min-width: 150px;
}

/* ── Yes/No Toggle Switches ──────────────────────────────────────── */
.switch-field {
    display: flex;
    overflow: hidden;
}

    .switch-field input {
        position: absolute !important;
        clip: rect(0, 0, 0, 0);
        height: 1px;
        width: 1px;
        border: 0;
        overflow: hidden;
    }

    .switch-field label {
        color: #9f9e9e;
        line-height: 1;
        text-align: center;
        padding: 12px 12px;
        margin-right: -1px;
        border: 0.5px solid#ccc;
        transition: all 0.1s ease-in-out;
    }

.mod-skin-dark .switch-field label {
    color: #fff;
    line-height: 1;
    text-align: center;
    padding: 12px 12px;
    margin-right: -1px;
    border: 0.5px solid #ccc;
    transition: all 0.1s ease-in-out;
}

.toggle-bold {
    font-weight: 700;
}

.toggle-sm {
    font-size: 10px;
    min-width: 40px;
    max-width: 150px;
}

.toggle-normal {
    font-size: 14px;
    min-width: 100px;
    max-width: 220px;
}

.toggle-lg {
    font-size: 19px;
    min-width: 250px;
    max-width: 280px;
}

.toggle-xl {
    font-size: 23px;
    min-width: 190px;
    max-width: 360px;
}

.switch-field label:hover {
    cursor: pointer;
}

.orange input:checked + label {
    background-color: #ffe6b5;
    border: 1px solid #ffba31 !important;
    color: #8d6c63;
    box-shadow: none;
    z-index: 1000;
}

.green input:checked + label {
    background-color: #889e07;
    border: 1px solid #889e07;
    color: #FFF;
    box-shadow: none;
    z-index: 1000;
}

.blue input:checked + label {
    background-color: #f6fbfc;
    border: 1px solid #a7d6e5;
    color: #31a9d3;
    box-shadow: none;
    z-index: 1000;
}

.grey input:checked + label {
    background-color: #dcdcdc;
    border: 1px solid #bdbdbd;
    color: #73686d;
    box-shadow: none;
    z-index: 1000;
}

.switch-field label:first-of-type {
    border-radius: 4px 0 0 4px;
}

.switch-field label:last-of-type {
    border-radius: 0 4px 4px 0;
}

.red input:checked + label {
    background-color: #D64045;
    border: 1px solid #D64045;
    color: #FFF;
    box-shadow: none;
    z-index: 1000;
}

/* Yes = green, No = red toggle variant */
.green-red input:first-of-type:checked + label {
    background-color: #889e07;
    border: 1px solid #889e07;
    color: #FFF;
    box-shadow: none;
    z-index: 1000;
}

.green-red input:nth-of-type(2):checked + label {
    background-color: #D64045;
    border: 1px solid #D64045;
    color: #FFF;
    box-shadow: none;
    z-index: 1000;
}

/* Active = green, All/Warning = orange toggle variant */
.green-orange input:first-of-type:checked + label {
    background-color: #889e07;
    border: 1px solid #889e07;
    color: #FFF;
    box-shadow: none;
    z-index: 1000;
}

.green-orange input:nth-of-type(2):checked + label {
    background-color: #ffc107;
    border: 1px solid #ffc107;
    color: #212529;
    box-shadow: none;
    z-index: 1000;
}

/* ── DataTable search box Add button ─────────────────────────────── */
.border-top-right-radius-0 { border-top-right-radius: 0 !important; }
.border-bottom-right-radius-0 { border-bottom-right-radius: 0 !important; }
.border-top-left-radius-0 { border-top-left-radius: 0 !important; }
.border-bottom-left-radius-0 { border-bottom-left-radius: 0 !important; }

/* ── Loading Overlay ─────────────────────────────────────────────── */
#loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    transition: opacity 0.2s ease;
}
