/* =====================================================================
   PSC CAD VIEWER — FINAL COMBINED CSS RESTORE BLOCK
   ===================================================================== */

/* -------------------------------------------------------------
   DataTables compact styling override (global)
------------------------------------------------------------- */
.dataTables_wrapper,
.dataTables_wrapper table.dataTable {
    font-size: 11px !important;
}

/* Ensure table fits without horizontal scrolling */
table.dataTable {
    width: 100% !important;
    table-layout: fixed !important;
}

/* The row color blocks for “highlighted” CAD rows used in PSC system */
.HighlightRedRow,
.HighlightRedRow td {
    background-color: rgb(255, 100, 100) !important;
}

.HighlightGreenRow,
.HighlightGreenRow td {
    background-color: LightGreen !important;
}

/* =========================
   CAD GRID LAYOUT & STYLING
   (restored from original CSS)
   ========================== */

/* Base CAD grid */
#gridCAD {
    /*table-layout: fixed;*/ /* was commented in your original */
    width: 100%;
}

    /* Column widths / alignment */
    #gridCAD th:nth-child(1) {
        width: 5%;
    }

    #gridCAD tr {
        height: 12px;
        line-height: 12px; /* match row height */
    }

    #gridCAD th:nth-child(2),
    #gridCAD td:nth-child(2) {
        text-align: center;
    }

    #gridCAD th:nth-child(6) {
        text-align: center;
    }

    #gridCAD td:nth-child(6) {
        text-align: left;
    }

    #gridCAD th:nth-child(7),
    #gridCAD td:nth-child(7) {
        text-align: center;
    }

    /* Cell font/spacing */
    #gridCAD th,
    #gridCAD td {
        font-size: 10px;
        padding: 2px 5px;
        white-space: nowrap;
    }

    /* Zebra striping with gradient */
    #gridCAD tbody tr:nth-child(even) {
        background: linear-gradient(to bottom, #F2FAFF, #B3D4FF);
    }

    /* Sticky, styled header */
    #gridCAD thead th {
        position: sticky;
        top: 0;
        z-index: 100;
        background: linear-gradient(to bottom, #F2FAFF, #B3D4FF);
        font-weight: bold;
        color: #333;
        text-shadow: 1px 1px 1px #fff;
    }

/* If you use this helper class anywhere */
.cad-cell-with-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* General gridview wrapper (if used) */
.gridview-wrapper table {
    border-collapse: collapse;
    width: 100%;
}

.gridview-wrapper th,
.gridview-wrapper td {
    border: 1px solid #000;
    padding: 8px;
}

/* Flex layout inside CAD cells (CAD # + button) */
.cellWrapper {
    display: flex;
    justify-content: space-between; /* push content & button apart */
}

.cellContent,
.cellButton {
    flex-shrink: 0; /* prevent content from being squashed */
}

/* Call-type highlight colors */
.red-cell {
    background-color: rgb(255, 100, 100);
    color: black;
}

.green-cell {
    background-color: LightGreen;
}

/* Tiny CAD button in the last column */
.CADButton {
    margin-left: auto;
    color: blue;
    height: 15px;
    font-size: 8px;
    line-height: 12px;
    border-radius: 3px;
}

/* jQuery UI dialog button pane next to CAD dialog */
#cadDialog + .ui-dialog-buttonpane {
    padding: 4px 10px;
    height: 15px;
}

/* Map-location icon in CAD details */
#locationIcon {
    font-size: 24px;
    margin-left: 10px;
    color: blue;
}

    #locationIcon:hover {
        color: #0056b3;
    }

/* Info overlay used by CAD page */
#divInformation {
    display: none;
    background-color: lightyellow;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    z-index: 1000;
}
/* =========================
   CAD TOOLBAR ICON STYLING
   ========================= */

/* Style BOTH help + sound icons on load */
.cad-toolbar-icon {
    color: #034af3;
    font-size: 16px;
    cursor: pointer;
}

a:hover .cad-toolbar-icon {
    color: #1d60ff;
}

/****************************************/
/****************************************/
/* ============================
   CAD GRID – FINAL LAYOUT FIX
   ============================ */

#gridCAD {
    table-layout: fixed; /* CRITICAL: stop auto column expansion */
    width: 100%;
}

    /* Enforce predictable column widths */
    #gridCAD th,
    #gridCAD td {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        /* Explicit column sizing (matches your original intent) */
        /*CALL CODE*/
        #gridCAD th:nth-child(1),
        #gridCAD td:nth-child(1) {
            width: 0%;
        }
        /*DISPATCHED*/
        #gridCAD th:nth-child(2),
        #gridCAD td:nth-child(2) {
            width: 10%;
        }
        /*INITIAL CALL TYPE*/
        #gridCAD th:nth-child(3),
        #gridCAD td:nth-child(3) {
            width: 20%;
        }
        /*CALL CODE FINAL-NO DISPLAY*/
        #gridCAD th:nth-child(4),
        #gridCAD td:nth-child(4) {
            width: 0%;
        }
        /*CURRENT CALL TYPE*/
        #gridCAD th:nth-child(5),
        #gridCAD td:nth-child(5) {
            width: 20%;
        }
        /*LOCTION*/
        #gridCAD th:nth-child(6),
        #gridCAD td:nth-child(6) {
            width: 22%;
        }
        /*AGENCY*/
        #gridCAD th:nth-child(7),
        #gridCAD td:nth-child(7) {
            width: 7%;
            text-align: center;
        }
        /*AREA*/
        #gridCAD th:nth-child(8),
        #gridCAD td:nth-child(8) {
            width: 6%;
            text-align: center;
        }
