﻿/* Hide the validation badge bubble/icon everywhere */
.dx-invalid-badge {
    display: none !important;
}

/* Optional: also prevent “invalid badge layout” from reserving space */
.dx-show-invalid-badge {
    padding-right: 0 !important;
}
/* Only inside the weight-sheet panel */
.gm-ws-panel .dx-invalid-badge {
    display: none !important;
}

.gm-ws-panel .dx-texteditor.dx-show-invalid-badge {
    padding-right: 0 !important;
}


/* ==========================================================
   Warehouse Intake Layout (WS)
   ========================================================== */

/* Shell sizing */
.gm-ws {
    height: calc(100vh - 170px);
    min-height: 700px;
}

.gm-ws__row {
    height: 100%;
}

.gm-ws__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
    min-width: 0; /* critical for flex overflow */
}

/* Panels */
.gm-ws-panel {
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 6px;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0; /* critical */
}

.gm-ws-panel__body {
    flex: 1;
    min-height: 0;
    min-width: 0; /* critical */
    overflow: hidden; /* prevents grid from spilling out */
}

/* Grid host */
.gm-gridHost {
    height: 100%;
    min-height: 0;
    min-width: 0; /* critical */
}

/* DevExtreme grids fill panel */
#gridTrucksInYard,
#gridOpenCerts,
#gridClosedCerts,
#gridLoads {
    height: 100%;
}

/* Ensure datagrid respects container width */
.dx-datagrid {
    max-width: 100%;
}


/* =========================
   New Intake Truck UI
   ========================= */

.gm-newtruck__title {
    font-weight: 800;
    font-size: 1.15rem;
}

/* Scale display box */
.gm-scaleBox {
    border: 2px solid rgba(0,0,0,.22);
    border-radius: 10px;
    padding: 12px;
}

/* One-line scale row: Choose Scale | Scale Name | Status | Weight (lbs) */
.gm-scaleBox__line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.gm-scaleBox__pickBtn {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    padding: 6px 10px;
    border-radius: 8px;
}

.gm-scaleBox__name {
    border: 1px solid rgba(0,0,0,.22);
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    text-align: right;
    min-width: 220px;
}

.gm-scaleBox__status {
    font-weight: 800;
    opacity: .85;
    white-space: nowrap;
    font-size: 1rem;
    line-height: 1.1;
}

/* Weight pill matches the scale-name border style */
.gm-scaleBox__weightPill {
    border: 1px solid rgba(0,0,0,.22);
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

/* Keep the numeric part from growing past 999999-width */
.gm-scaleBox__weightVal {
    display: inline-block;
    min-width: 6ch;   /* 999999 */
    max-width: 6ch;
    text-align: right;
}

.gm-scaleBox__uom {
    font-weight: 800;
    opacity: .85;
}

/* Status color rules */
.gm-scaleBox--bad .gm-scaleBox__weightPill {
    background: #c00000;
    color: #ffffff;
}

.gm-scaleBox--motion .gm-scaleBox__weightPill {
    background: #ffd400;
    color: #000000;
}

.gm-scaleBox--ok .gm-scaleBox__weightPill {
    background: #ffffff;
    color: #000000;
}

/* Manual weight */
.gm-scaleBox--manual .gm-scaleBox__weightPill {
    background: lightblue;
    color: #000000;
}


/* Picker slide-down animation */
.gm-scalePicker__listWrap {
    overflow: hidden;
}

.gm-scalePicker__list {
    max-height: 320px;
    overflow: auto;
    animation: gmSlideDown .18s ease-out;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    padding: 10px;
}

@keyframes gmSlideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gm-scalePicker__divider {
    text-align: center;
    font-weight: 800;
    opacity: .6;
    margin: 10px 0;
}

.gm-scalePicker__item {
    margin-bottom: 8px;
}

    .gm-scalePicker__item:last-child {
        margin-bottom: 0;
    }

/* =========================
   New Intake Truck (Split + Cameras)
   ========================= */

.gm-newtruck__split {
    align-items: stretch;
}

.gm-camPanel {
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}

.gm-camStack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gm-camCard {
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.gm-camCard__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(255,255,255,.95);
}

.gm-camCard__title {
    font-weight: 800;
}

.gm-camCard__status {
    font-size: .85rem;
    opacity: .75;
    white-space: nowrap;
}

.gm-camCard__video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    cursor: pointer;
}

/* Make the print button obviously different from Save */
.gm-btnPrint {
    font-weight: 800;
}
