/* ScheduleGrid board — sticky-header schedule table.
   The board is a purpose-built HTML table (not MudDataGrid) because it interleaves full-width banner rows
   (shift headers, shutdown notices, Late Trucks) between data rows while keeping every data column aligned
   down the whole board under one sticky header. See .github/Schedulegrid-Migration-Plan.md B1. */

.schedgrid-wrap {
    overflow-x: visible;
    overflow-y: visible;
    border: 1px solid #dee2e6;
}

.schedgrid {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.8rem;
    white-space: nowrap;
}

.schedgrid thead th {
    position: sticky;
    top: 48px;
    z-index: 1;
    background-color: #343a40;
    color: #fff;
    font-weight: 600;
    padding: 4px 6px;
    border: 1px solid #495057;
    text-align: center;
    white-space: normal;
}

.schedgrid tbody td {
    padding: 3px 6px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.schedgrid tbody tr:hover td {
    background-color: #f1f3f5;
}

/* Full-width banner rows (shift header / shutdown / late trucks). */
.schedgrid tbody tr.schedgrid-banner td {
    font-weight: 700;
    text-align: center;
    padding: 5px 6px;
}

.schedgrid tbody tr.schedgrid-banner-shift td {
    background-color: #4455aa;
    color: #fff;
    font-size: 14px;
    text-align: left;
}

.schedgrid tbody tr.schedgrid-banner-shutdown td {
    background-color: #ffdab9;
    color: #842029;
}

.schedgrid tbody tr.schedgrid-banner-late td {
    background-color: #fff3cd;
    color: #664d03;
    text-align: left;
}

/* Row/cell state highlights (Ref-Doc §9 color legend). */
.schedgrid .sg-standing { color: #198754; font-weight: 600; }   /* standing appointment */
.schedgrid .sg-reserved { color: #dc3545; font-weight: 700; }   /* HoldAppt = RESERVED */
.schedgrid .sg-override-pending { color: #dc3545; }             /* SlotAddedOverride pending approval */
.schedgrid .sg-hold { color: red; }                             /* HoldAppt appointment-time link (red) */
.schedgrid .sg-shutdown-cell { background-color: #f8d7da; }

/* Outbound "Pool Shipment" ship-type cell (legacy pure red background). */
.schedgrid .sg-pool-shipment { background-color: #FF0000; }

/* Commodity / Combined / Joliet special-load labels (legacy red bold). */
.schedgrid .sg-special-label { color: #dc3545; font-weight: 700; display: block; }

/* Joliet DAISY/NEWMANS special-load: yellow cell background + bold label (legacy BackColor = Yellow). */
.schedgrid .sg-joliet-cell { background-color: #ffff00; }
.schedgrid .sg-joliet-label { font-weight: 700; display: block; }

/* Per-row action buttons render under the appointment date/time in the same column (legacy layout). */
.schedgrid .schedgrid-actions {
    margin-top: 4px;
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.schedgrid .schedgrid-cell-actions {
    display: block;
    margin-top: 4px;
}

/* Comment cells hold HTML with highlighting/line breaks — let them wrap instead of forcing a single line. */
.schedgrid tbody td.schedgrid-comment {
    white-space: normal;
    min-width: 140px;
}

/* Order List ("View Orders") dialog — keep the order grid from cramping. */
.schedgrid-order-dialog { min-width: 900px; }
