html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}


.image-container {
    position: relative;
    display: inline-block;
}

.thumb-image {
    max-width: 100px;
    max-height: 100px;
    cursor: pointer; /* Show pointer cursor on hover */
}

/* Overlay background */
.full-size-image-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 10%;
    width: 90%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow: auto; /* Enable scrolling if image is larger than viewport */
}

    /* Center the full-size image */
    .full-size-image-overlay .full-size-image {
        max-width: 90%;
        max-height: 90%;
        border: 1px solid #ccc;
        background-color: #fff;
    }

/* Show the overlay when hovering over the image container */
.image-container:hover .full-size-image-overlay {
    display: flex;
}

.input-error {
    border: 2px solid red;
}


.modal-dialog {
    max-width: 80vw !important;
    background-color: #f7f7f7 !important;
}

.modal-header {
    background-color: #e9ecef;
}

.modal-body {
    background-color: #e9ecef;
}


.box-button {
    display: inline-block;
    padding: 15px 20px;
    border: 2px solid #007bff;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #007bff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .box-button:hover {
        background-color: #007bff;
        color: #ffffff;
        box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    }


.tire {
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px;
    margin: 5px;
    text-align: center;
    width: 80px;
    background-color: #f8f9fa;
}

.axle-row {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.tire-label {
    font-weight: bold;
}


table tr.bad {
    background-color: #e50000;
}


.modal.show .modal-dialog {
    z-index: 99;
}

.modal-backdrop.show {
    z-index: 0;
}




@media screen and (max-width: 768px) {
    .navbar > .container, .navbar > .container-fluid, .navbar > .container-lg, .navbar > .container-md, .navbar > .container-sm, .navbar > .container-xl, .navbar > .container-xxl {
        display: flex;
        flex-wrap: inherit;
        align-items: center;
        justify-content: left;
    }
}

/* ===========================================================================
   Phone-portrait mobile pass (Sep 2026, v2 — reflow)
   Scoped to narrow screens; desktop/tablet layouts are unchanged. The dense
   ops pages (Live / Planning) render each run as a wide multi-column table
   ("card"). On a phone those overflow the screen and force left/right
   scrolling, so here we (a) harden the toolbars/button-groups so they wrap
   instead of running off-screen, and (b) REFLOW the run cards into stacked
   label:value rows that fit the width. Labels come from the data-label="…"
   attributes on each value cell (added in the Live/Planning markup); the
   original column-header row is hidden on mobile. Verified at 390px width.
   =========================================================================== */
@media screen and (max-width: 576px) {
    /* Reclaim width. `article.content` out-specifies the per-page inline
       `.content { margin:1rem }` on Live, so the gutters really shrink. */
    article.content { margin: .35rem !important; padding: .5rem .55rem !important; }
    .content.px-4 { padding-left: .55rem !important; padding-right: .55rem !important; }
    .page-container { padding: 0 !important; }

    .table-responsive { -webkit-overflow-scrolling: touch; }

    /* --- Toolbars: wrap every flex toolbar + button group; drop fixed widths --- */
    .content .d-flex { flex-wrap: wrap !important; }
    .content .btn-group { flex-wrap: wrap; margin-left: 0 !important; }
    .content .ms-auto { margin-left: 0 !important; }
    .content [style*="min-width:140px"] { min-width: 0 !important; }

    /* Location-filter chips: flow several per row instead of one-per-line. */
    .content .btn-group[aria-label="Location filters"] { display: flex !important; flex-wrap: wrap; gap: .3rem; width: 100%; }
    .content .btn-group[aria-label="Location filters"] > * { flex: 0 0 auto !important; }
    .content .btn-group[aria-label="Location filters"] .d-inline-block { min-width: 0 !important; margin: 0 !important; }
    .content .btn-group[aria-label="Location filters"] .btn { font-size: .8rem; }

    /* 16px stops iOS Safari from auto-zooming on field focus; comfy tap targets. */
    .content input, .content select, .content textarea { font-size: 16px; }
    .content .btn { min-height: 36px; }
    .content h3 { font-size: 1.2rem; }
    .content .card-body { padding: .6rem; }

    /* --- Run cards (Live + Planning): reflow table -> stacked label:value --- */
    .table-ops-3d,
    .table-ops-3d > tbody,
    .table-ops-3d > tbody > tr { display: block; width: 100%; }
    .table-ops-3d {
        box-shadow: none; border: 1px solid #c9d9e6; border-radius: 12px;
        margin-bottom: 1rem; background: #fff; overflow: hidden;
    }
    /* Hide the column-header row; each value cell carries its own inline label. */
    .table-ops-3d > tbody > tr:first-child { display: none; }
    .table-ops-3d > tbody > tr > td {
        display: flex; align-items: center; gap: .6rem; width: 100% !important;
        border: 0 !important; border-bottom: 1px solid #eef2f6 !important;
        padding: .3rem .6rem; background: transparent !important;
    }
    .table-ops-3d > tbody > tr > td::before {
        content: attr(data-label); flex: 0 0 88px;
        font-weight: 600; font-size: .72rem; color: #0d3c55;
    }
    .table-ops-3d > tbody > tr > td:not([data-label])::before,
    .table-ops-3d > tbody > tr > td[data-label=""]::before { content: none; }
    .table-ops-3d input, .table-ops-3d select { flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%; }

    /* Status-bar and legs rows span all columns: full width, no label prefix. */
    .table-ops-3d > tbody > tr > td[colspan] { display: block; }
    .table-ops-3d > tbody > tr > td[colspan]::before { content: none; }

    /* Legs detail table: stack each leg into a labeled mini-card. Column labels
       are injected by position (nth-child) so NO markup changes are needed and
       the desktop live view is untouched. Replaces the cramped horizontal
       scroll that was hard to read on a phone. */
    .leg-table-3d thead { display: none; }
    .leg-table-3d, .leg-table-3d tbody, .leg-table-3d tr, .leg-table-3d td { display: block; width: 100%; }
    .leg-table-3d tr { border: 1px solid #c9d9e6; border-radius: 10px; margin-bottom: .6rem; padding: .15rem .25rem; }
    .leg-table-3d td { border: 0 !important; display: flex; align-items: center; gap: .5rem; padding: .2rem .4rem; white-space: normal; }
    .leg-table-3d td::before { flex: 0 0 92px; font-weight: 600; font-size: .7rem; color: #0d3c55; }
    .leg-table-3d td:nth-child(1)::before { content: "Dispatch Date"; }
    .leg-table-3d td:nth-child(2)::before { content: "Dispatch Time"; }
    .leg-table-3d td:nth-child(3)::before { content: "Depart #"; }
    .leg-table-3d td:nth-child(4)::before { content: "Depart Name"; }
    .leg-table-3d td:nth-child(5)::before { content: "Arrive #"; }
    .leg-table-3d td:nth-child(6)::before { content: "Arrive Name"; }
    .leg-table-3d td:nth-child(7)::before { content: "Miles"; }
    .leg-table-3d td:nth-child(8)::before { content: "Est Arr"; }
    .leg-table-3d td:nth-child(9)::before { content: "Arrived"; }
    .leg-table-3d td:nth-child(10)::before { content: "Actual Arr"; }
    .leg-table-3d td:nth-child(11)::before { content: ""; }
    .leg-table-3d input, .leg-table-3d select { flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%; }

    /* --- Modals --- */
    .modal { padding: .5rem !important; }
    .modal-dialog { max-width: 96vw !important; }
    .modal-content { max-height: calc(100vh - 1rem); }
}
