/* Be sure to update the version in the inclusion file to break the caching */
/*PICO Overrides*/
:root {
    /*--pico-font-family-sans-serif: "Roboto Mono", system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, var(--pico-font-family-emoji);*/
    /*--pico-font-family-monospace: "JetBrains Mono", monospace;*/
    --pico-font-family-sans-serif: Inter, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, var(--pico-font-family-emoji);
    --pico-font-size: 87.5%;
    /* Original: 100% */
    --pico-line-height: 1.25;
    /* Original: 1.5 */
    --pico-form-element-spacing-vertical: 0.5rem;
    /* Original: 1rem */
    --pico-form-element-spacing-horizontal: 1.0rem;
    /* Original: 1.25rem */
    --pico-border-radius: 0.375rem;
    /* Original: 0.25rem */
    --pill-radius: 0.25rem;

    /*Custom Variables*/
    --pill-padding: 1px 4px;
    --inventory-good-background: var(--pico-color-azure-100);
    --inventory-good-color: var(--pico-color-azure-950);
    --inventory-location-background: var(--pico-color-violet-150);
    --inventory-location-color: var(--pico-color-violet-850);
    --inventory-container-background: var(--pico-color-jade-150);
    --inventory-container-color: var(--pico-color-jade-850);
    --inventory-manifest-background: var(--pico-color-amber-150);
    --inventory-manifest-color: var(--pico-color-amber-850);
    --action-save-background: var(--pico-color-green-150);
    --action-save-color: var(--pico-color-green-850);
    --action-cancel-background: var(--pico-color-red-150);
    --action-cancel-color: var(--pico-color-red-850);
    --action-warning-background: var(--pico-color-yellow-150);
    --action-warning-color: var(--pico-color-yellow-850);
}


@media (min-width: 576px) {
    :root {
        --pico-font-size: 87.5%;
        /* Original: 106.25% */
    }
}

@media (min-width: 768px) {
    :root {
        --pico-font-size: 87.5%;
        /* Original: 112.5% */
    }
}

@media (min-width: 1024px) {
    :root {
        --pico-font-size: 87.5%;
        /* Original: 118.75% */
    }
}

@media (min-width: 1280px) {
    :root {
        --pico-font-size: 87.5%;
        /* Original: 125% */
    }
}

@media (min-width: 1536px) {
    :root {
        --pico-font-size: 87.5%;
        /* Original: 131.25% */
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    --pico-font-weight: 600;
    /* Original: 700 */
}

article {
    border: 1px solid var(--pico-muted-border-color);
    /* Original doesn't have a border */
    border-radius: calc(var(--pico-border-radius) * 2);
    /* Original: var(--pico-border-radius) */
}

/* Form fields: 8px radius everywhere (Pico default is --pico-border-radius, and 5rem pills for search) */
input:not([type="checkbox"], [type="radio"], [type="range"]),
select,
textarea,
[role="search"] {
    --pico-border-radius: 8px;
}

/* Pico hard-codes 5rem outer corners on [role="search"] children instead of reading --pico-border-radius */
[role="search"] > :is(input, select, textarea):first-child {
    border-top-left-radius: var(--pico-border-radius);
    border-bottom-left-radius: var(--pico-border-radius);
}

[role="search"] > :is(input, select, textarea):last-child {
    border-top-right-radius: var(--pico-border-radius);
    border-bottom-right-radius: var(--pico-border-radius);
}

article > footer {
    border-radius: calc(var(--pico-border-radius) * 2);
    /* Original: var(--pico-border-radius) */
}

/* Site Layout */
[x-cloak] {
    display: none !important;
}

/* Show elements only on small screens (width < 1080px) */
.small-screen-only {
    display: none;
}

@media (max-width: 1079px) {
    .small-screen-only {
        display: block;
    }

    .large-screen-only {
        display: none !important;
    }
}

/* Show elements only on large screens (width >= 1080px) */
@media (min-width: 1080px) {
    .small-screen-only {
        display: none !important;
    }

    .large-screen-only {
        display: block;
    }
}

/* Top Nav + Mega Menu */
.site-nav {
    /* neutral grey/silver palette for nav + mega menu; mixed from text color so it follows light/dark theme */
    --nav-accent: var(--pico-contrast);
    --nav-tint: color-mix(in srgb, var(--pico-color) 8%, transparent);
    --nav-surface: color-mix(in srgb, var(--pico-color) 4%, var(--pico-background-color));
    --nav-rule: color-mix(in srgb, var(--pico-color) 22%, transparent);
    --nav-focus: color-mix(in srgb, var(--pico-color) 35%, transparent);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--pico-background-color);
    border-bottom: 1px solid var(--pico-muted-border-color);
    margin: 0 calc(var(--pico-spacing) * -1) var(--pico-spacing);
    padding: 0 var(--pico-spacing);
}

.site-nav > nav {
    position: relative;
    z-index: 1002;
}

.site-nav > nav > ul:first-child {
    min-width: 0;
}

.site-nav__logo {
    display: flex;
    align-items: center;
}

/* Outlook-style app launcher: full-height tile flush to the left edge, opts out of Pico's global button styles */
.site-nav > nav > ul:first-child > li:has(.site-nav__trigger) {
    align-self: stretch;
    display: flex;
    padding: 20px;
    /* cancel .site-nav gutter; ul:first-of-type already pulls back nav-element-spacing-horizontal */
    margin-left: calc(var(--pico-nav-element-spacing-horizontal) - var(--pico-spacing));
}

/* logo sits right against the tile so the icon's left and right gaps match */
.site-nav > nav > ul:first-child > li:has(.site-nav__trigger) + li {
    padding-left: 0;
}

.site-nav__trigger {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    font-size: 1.25rem;
    color: var(--pico-muted-color);
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}

.site-nav__trigger:hover {
    color: var(--nav-accent);
    background-color: var(--nav-tint);
}

.site-nav__trigger[aria-expanded="true"] {
    color: var(--nav-accent);
    background-color: var(--nav-tint);
}

.site-nav__trigger:focus-visible {
    outline: 2px solid var(--nav-focus);
    outline-offset: -2px;
}

/* Home page "get started" callout pointing users at the menu button */
.nav-intro {
    border-left: 4px solid var(--pico-primary);
}

.nav-intro h4 {
    margin-bottom: 0.25rem;
}

.nav-intro p {
    margin-bottom: 0;
}

/* inline chip mimicking the menu button */
.nav-intro__icon {
    display: inline-block;
    margin: 0 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--pico-border-radius);
    background-color: var(--nav-tint);
    color: var(--nav-accent);
}

/* Shake the menu icon periodically while the callout is on the page */
body:has(.nav-intro) .site-nav__trigger:not([aria-expanded="true"], :hover) > i {
    animation: tilt-n-move-shaking 7s ease-in-out 0.8s infinite;
}

/* 7s cycle = 1s shake (0-14.3%) + 6s rest; CSS has no per-iteration delay */
@keyframes tilt-n-move-shaking {
  0% { transform: translateX(0) }
  3.6% { transform: translateY(-2px) }
  5% { transform: translateY(-2px) rotate(17deg) }
  7.9% { transform: translateY(-2px) rotate(-17deg) }
  9.3% { transform: translateY(-2px) rotate(17deg) }
  10.7% { transform: translateY(-2px) rotate(-17deg) }
  14.3%, 100% { transform: translateY(0) rotate(0) }
}

@media (prefers-reduced-motion: reduce) {
    body:has(.nav-intro) .site-nav__trigger > i {
        animation: none;
    }
}

.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1001;
    background: var(--nav-surface);
    border-top: 2px solid var(--nav-rule);
    border-bottom: 1px solid var(--pico-muted-border-color);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
    max-height: calc(100vh - var(--mega-menu-top, 4rem));
    max-height: calc(100dvh - var(--mega-menu-top, 4rem));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mega-menu__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--pico-spacing) * 1.25) calc(var(--pico-spacing) * 1.5);
}

.mega-menu__filter {
    --pico-form-element-active-border-color: var(--nav-rule);
    --pico-form-element-focus-color: var(--nav-focus);
    margin-bottom: calc(var(--pico-spacing) * 1.25);
}

/* Evernote-style 4 equal columns: links flow through the first 3, the 4th holds Recent Pages */
.mega-menu__columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: calc(var(--pico-spacing) * 2);
    align-items: start;
}

.mega-menu__sections {
    grid-column: 1 / span 3;
    columns: 3;
    column-gap: calc(var(--pico-spacing) * 2);
}

.mega-menu__section {
    break-inside: avoid;
    margin-bottom: calc(var(--pico-spacing) * 1.75);
}

.mega-menu__empty {
    grid-column: 1 / span 3;
}

.mega-menu__aside {
    grid-column: 4;
    grid-row: 1 / span 2;
    min-height: 1px;
}

.mega-menu__heading {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pico-muted-color);
    margin-bottom: 0.75rem;
}

.mega-menu__heading .fa-fw {
    margin-right: 0.25rem;
}

.mega-menu ul {
    margin: 0;
    padding: 0;
}

.mega-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu li[hidden],
.mega-menu section[hidden] {
    display: none !important;
}

.mega-menu li a {
    display: block;
    padding: 0.4rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: var(--pico-border-radius);
    color: var(--pico-color);
    text-decoration: none;
}

/* flag a link with SiteMapLink(new_until="YYYY-MM-DD") in frontend/navigation.py */
.nav-new-badge {
    margin-left: 0.35rem;
    font-size: 0.5rem;
    /* faded fill + solid ring; element opacity would fade the ring too */
    color: var(--pico-color-green-300);
    opacity: 0.8;
    vertical-align: middle;
}

.mega-menu li a:hover,
.mega-menu li a:focus-visible {
    background: var(--nav-tint);
    color: var(--nav-accent);
}

.mega-menu li a[aria-current="page"] {
    color: var(--nav-accent);
    font-weight: 600;
}

/* Recent Pages (4th column) */
.mega-menu__aside {
    padding-left: calc(var(--pico-spacing) * 2);
    border-left: 1px solid var(--pico-muted-border-color);
}

.mega-menu__recents li a {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.mega-menu__recent-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Full-title tooltip on cut-off recents: wrap within the link's width so it can't overflow the menu's edge */
.mega-menu__recents [data-tooltip]::before {
    width: max-content;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

.mega-menu__recent-count {
    flex: none;
    color: var(--pico-muted-color);
    font-size: 0.75em;
}

.mega-menu__recents .mega-menu__heading {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

/* Small, light "Clear" action in the Recent Pages heading */
.mega-menu__recents-clear {
    margin: 0 0 0 auto;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: var(--pico-muted-color);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
    opacity: 0.6;
    cursor: pointer;
}

.mega-menu__recents-clear:hover,
.mega-menu__recents-clear:focus-visible {
    opacity: 1;
    text-decoration: underline;
    background: none;
    color: var(--pico-muted-color);
}

.mega-menu__recents-empty {
    color: var(--pico-muted-color);
    margin: 0;
}

/* While filtering: drop the headings and flow matching links through the same 3 columns */
.mega-menu.is-filtering .mega-menu__section,
.mega-menu.is-filtering .mega-menu__section > ul {
    display: contents;
}

.mega-menu.is-filtering .mega-menu__sections .mega-menu__heading {
    display: none;
}

/* Recents keep their heading while filtering */
.mega-menu.is-filtering .mega-menu__recents {
    display: block;
}

.mega-menu.is-filtering .mega-menu__recents > ul {
    display: block;
}

.mega-menu.is-filtering .mega-menu__sections li {
    break-inside: avoid;
}

.mega-menu__empty {
    color: var(--pico-muted-color);
    margin: 0;
}

/* key for the "new" dot, only rendered when a link is flagged */
.mega-menu__legend {
    padding-top: calc(var(--pico-spacing) * 0.75);
    border-top: 1px solid var(--nav-rule);
    color: var(--pico-muted-color);
    font-size: 0.8rem;
}

.mega-menu__legend .nav-new-badge {
    margin: 0 0.35rem 0 0;
}

.mega-menu__backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.3);
}

html.mega-menu-open {
    overflow: hidden;
}

@media (max-width: 1079px) {
    .mega-menu {
        position: fixed;
        top: var(--mega-menu-top, 4rem);
        bottom: 0;
        max-height: none;
    }

    .mega-menu__inner {
        padding: var(--pico-spacing);
    }

    .mega-menu__filter {
        position: sticky;
        top: 0;
        z-index: 1;
        background-color: var(--pico-form-element-background-color);
        /* 16px avoids iOS zoom-on-focus */
        font-size: 16px;
    }

    .mega-menu__columns {
        grid-template-columns: 1fr;
    }

    .mega-menu__sections,
    .mega-menu__empty,
    .mega-menu__aside {
        grid-column: 1;
        grid-row: auto;
    }

    .mega-menu__sections {
        columns: 1;
    }

    /* Recents first on mobile, capped at 4 */
    .mega-menu__aside {
        order: -1;
        padding-left: 0;
        border-left: none;
        padding-bottom: var(--pico-spacing);
        margin-bottom: calc(var(--pico-spacing) * 1.25);
        border-bottom: 1px solid var(--pico-muted-border-color);
    }

    .mega-menu__recents li:nth-child(n + 5) {
        display: none;
    }

    .mega-menu li a {
        padding: 0.65rem 0.5rem;
    }
}

/* Text Colors - Semantic */
.text-primary {
    color: var(--pico-primary) !important;
}

.text-secondary {
    color: var(--pico-secondary) !important;
}

.text-success {
    color: var(--pico-ins-color) !important;
}

.text-neon {
    color: var(--pico-color-lime-50) !important;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.text-danger,
.text-error {
    color: var(--pico-del-color) !important;
}

.text-warning {
    color: var(--pico-color-amber-500) !important;
}

.text-info {
    color: var(--pico-color-azure-500) !important;
}

.text-muted {
    color: var(--pico-muted-color) !important;
}

button.btn-error,
[type="submit"].btn-error {
    --pico-primary-background: var(--pico-del-color);
    --pico-primary-border: var(--pico-del-color);
    --pico-primary-hover-background: var(--pico-color-red-600);
    --pico-primary-hover-border: var(--pico-color-red-600);
    --pico-primary-underline: transparent;
}

button.btn-warning,
[type="submit"].btn-warning {
    --pico-primary-background: var(--pico-color-amber-500);
    --pico-primary-border: var(--pico-color-amber-500);
    --pico-primary-hover-background: var(--pico-color-amber-600);
    --pico-primary-hover-border: var(--pico-color-amber-600);
    --pico-primary-underline: transparent;
}

/* same green as the save action badge (.pill-badge-save) */
button.btn-save,
[type="submit"].btn-save {
    --pico-primary-background: var(--action-save-background);
    --pico-primary-border: var(--action-save-background);
    --pico-primary-hover-background: var(--pico-color-green-200);
    --pico-primary-hover-border: var(--pico-color-green-200);
    --pico-primary-inverse: var(--action-save-color);
    --pico-primary-underline: transparent;
}

.button-row {
    display: inline-flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.button-row form {
    margin: 0;
}

button.btn-sm,
[type="submit"].btn-sm,
a[role="button"].btn-sm {
    width: auto;
    display: inline-block;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    margin: 0;
}

button.icon-only,
[type="submit"].icon-only {
    padding: 0.35rem 0.55rem;
    line-height: 1;
}

.destination-pin-link {
    text-decoration: none;
    font-size: 1.1rem;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.font-mono, h1, h2, h3, h4, h5, h6 {
    font-family: var(--pico-font-family-monospace) !important;
    font-weight: 200 !important;
}

h1 {
    font-size: 1.2rem;
    text-decoration: underline color-mix(in srgb, var(--pico-color) 70%, transparent);
    text-underline-offset: 6px;
    padding-bottom: 6px;
}

/* Table Overflow control - ~doesn't work with container fluid~*/

.overflow-auto > table th:first-child,
.overflow-auto > table td:first-child {
    position: sticky;
    left: 0;
    background: var(--pico-background-color);
}

.overflow-auto > table {
    font-size: 0.875rem;
}

.overflow-auto > table td, figure table th {
    /*padding: 0.5rem;*/
}

/*General Styles*/
.menu {
    width: 250px;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

#close-menu-button {
    width: 0;
    height: 0;
    position: absolute;
    z-index: -1;
}

.divider {
    margin: 2px 12px;
    background: grey;
    height: 1px;
}

.nowrap {
    text-wrap: nowrap;
}

.pt-color {
    color: #0068b9;
}

.pd-color {
    color: #d00e00;
}

.rh-color {
    color: #006104;
}

@media (prefers-color-scheme: dark) {
    .pt-color {
        color: #6db0ff;
    }

    .pd-color {
        color: #ff8f90;
    }

    .rh-color {
        color: #1fffb5;
    }

    :root {
        --inventory-good-background: var(--pico-color-azure-100);
        --inventory-good-color: var(--pico-color-azure-950);
        --inventory-location-background: var(--pico-color-violet-150);
        --inventory-location-color: var(--pico-color-violet-850);
        --inventory-container-background: var(--pico-color-jade-150);
        --inventory-container-color: var(--pico-color-jade-850);
        --inventory-manifest-background: var(--pico-color-amber-150);
        --inventory-manifest-color: var(--pico-color-amber-850);
        --action-save-background: var(--pico-color-green-150);
        --action-save-color: var(--pico-color-green-850);
        --action-cancel-background: var(--pico-color-red-150);
        --action-cancel-color: var(--pico-color-red-850);
        --action-warning-background: var(--pico-color-yellow-150);
        --action-warning-color: var(--pico-color-yellow-850);
    }
}

form a {
    margin-bottom: auto;
}

/* Transit Lot Allocations edit page (transit_detail_lot_allocations.html) */
.lot-allocation-weight {
    width: 8.5rem;
    margin: 0 !important;
    text-align: right;
}

.inventory-table td form button {
    margin: 0;
    padding: 0.3rem 0.55rem;
}

.lot-allocation-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.lot-allocation-add-form > button {
    margin-top: 1.6rem;
}

@media (max-width: 768px) {
    .lot-allocation-add-form {
        grid-template-columns: 1fr;
    }

    .lot-allocation-add-form > button {
        margin-top: 0;
    }
}

@media print {
    /* Hide elements not needed for printing */
    .no-print,
    .print\:hidden {
        display: none !important;
    }
}

/* Tom-select dark mode */
@media (prefers-color-scheme: dark) {
    .ts-wrapper.multi .ts-control,
    .ts-wrapper .ts-control {
        background-color: var(--pico-form-element-background-color);
        color: var(--pico-color);
        border-color: var(--pico-form-element-border-color);
    }

    .ts-wrapper .ts-control input {
        color: var(--pico-color);
    }

    .ts-dropdown,
    .ts-dropdown-content {
        background-color: var(--pico-dropdown-background-color, var(--pico-card-background-color));
        border-color: var(--pico-form-element-border-color);
        color: var(--pico-color);
    }

    .ts-dropdown .option,
    .ts-dropdown .optgroup-header,
    .ts-dropdown .no-results,
    .ts-dropdown .create {
        background-color: transparent;
        color: var(--pico-color);
    }

    .ts-dropdown .active,
    .ts-dropdown [data-selectable].option:hover {
        background-color: var(--pico-primary);
        color: var(--pico-primary-inverse);
    }

    .ts-dropdown [data-selectable] .highlight {
        background-color: var(--pico-primary-focus);
        color: var(--pico-primary-inverse);
    }

    .ts-wrapper.multi .ts-control .item {
        background-color: var(--pico-primary);
        color: var(--pico-primary-inverse);
        border-color: var(--pico-primary);
    }
}

/* Used with active check boxes / widget */
.light-only {
    display: none;
}

.dark-only {
    display: block;
}

@media (prefers-color-scheme: light) {
    .light-only {
        display: block;
    }

    .dark-only {
        display: none;
    }
}

/*Pagination styles*/
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-go-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}


a[aria-current="page"] {
    font-weight: bold;
}

@media (max-width: 576px) {
    .pagination-pages {
        gap: 0.25rem;
    }

    .pagination-pages .page-number:not(.current-page):not(:first-child):not(:last-child) {
        display: none;
    }

    .pagination-pages .ellipsis {
        display: none;
    }

    .pagination-go-form {
        margin-left: 0.5rem;
        margin-top: 0;
    }

    .pagination-go-form label {
        display: none;
    }
}


/* Class to trigger the animation */
.fade-out {
    animation: fadeOut 2s ease-in forwards; /* 2s duration, stays hidden after */
}

/* Keyframes definition */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        /* Optional: can also set display: none at 100% to remove it from flow */
    }
}


/* Collapse borders for consistent rendering */
.alt-borders {
    border-collapse: collapse;
}

/* Apply bottom border on even rows only */
.alt-borders tbody tr:nth-child(even) td,
.alt-borders tbody tr:nth-child(even) th {
    border-bottom: var(--pico-border-width) solid var(--pico-table-border-color);
}

/* Ensure odd rows have no bottom border */
.alt-borders tbody tr:nth-child(odd) td,
.alt-borders tbody tr:nth-child(odd) th {
    border-bottom: none;
}


/* to enable light-dark() */

:root {
    color-scheme: light dark;
}

.yes-badge {
    color: light-dark(var(--pico-color-jade-750), var(--pico-color-jade-50));
    background-color: light-dark(var(--pico-color-jade-50), var(--pico-color-jade-700));
    border-radius: 0.3rem;
    display: inline-block;
    padding: 5px;
}

.no-badge {
    color: light-dark(var(--pico-color-red-750), var(--pico-color-red-50));
    background-color: light-dark(var(--pico-color-red-50), var(--pico-color-red-700));
    border-radius: 0.3rem;
    display: inline-block;
    padding: 5px;
}

.processing-time-badge {
    color: light-dark(var(--pico-color-jade-750), var(--pico-color-jade-50));
    background-color: light-dark(var(--pico-color-jade-50), var(--pico-color-jade-700));
    border-radius: 0.375rem;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-weight: bold;
}

.pause-time-badge {
    color: light-dark(var(--pico-color-slate-600), var(--pico-color-slate-300));
    background-color: light-dark(var(--pico-color-slate-100), var(--pico-color-slate-800));
    border-radius: 0.375rem;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-weight: normal;
}

/* Tabs (c-locationtabs) */
/* tabs scroll sideways when they don't fit (phones) rather than widening the page */
nav.tabs {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.tabs ul {
    flex: none;
    flex-wrap: nowrap;
    display: inline-flex;
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0.25rem;
    gap: 0.25rem;
    background: var(--pico-code-background-color);
    border: var(--pico-border-width) solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
}

/* Pico pulls a nav's first/last <ul> outward with negative margins; inside the scrolling tab bar that
   overhang made the scrollbar show even when the tabs fit (e.g. the location tabs' Picklist group) */
nav.tabs ul:first-of-type,
nav.tabs ul:last-of-type {
    margin-left: 0;
    margin-right: 0;
}

.tabs li {
    margin: 0;
    flex: none;
    white-space: nowrap;
}

.tabs li a,
.tabs li {
    display: inline-block;
    padding: 0.4rem 1rem;
    text-decoration: none;
    font-weight: var(--pico-font-weight, 500);
    color: var(--pico-muted-color);
    border-radius: calc(var(--pico-border-radius) - 0.15rem);
}

.tabs li a:hover {
    color: var(--pico-color);
    background: var(--pico-card-background-color);
}

.tabs li.active a {
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
}

.tabs li.active a:hover {
    background: var(--pico-primary-hover-background);
}

.tabs li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toolbar (c-toolbar / c-toolbar.action) */
.toolbar {
    width: 100%;
    display: inline-block;
}

.toolbar-align-right > .toolbar-actions {
    justify-content: flex-end;
}

/* narrow screens: an empty Actions dropdown keeps its space but isn't shown */
.toolbar-dropdown:not(:has(.toolbar-action)) {
    visibility: hidden;
}

.toolbar-align-right > .toolbar-dropdown {
    display: flex;
    justify-content: flex-end;
}

/* split toolbar (c-toolbar's "left" slot): left group at the left edge, the default slot's group at the right */
.toolbar-split {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.toolbar-split > .toolbar-actions:not(.toolbar-actions-left),
.toolbar-split > .toolbar-dropdown {
    margin-left: auto;
}

/* narrow screens: the left group follows the right group in the dropdown, after a divider */
.toolbar-divider {
    list-style: none;
    margin: 0.25rem 0;
    border-top: var(--pico-border-width) solid var(--pico-muted-border-color);
}

.toolbar-actions {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toolbar-action {
    list-style: none;
    margin: 0;
}

a.toolbar-action-button,
button.toolbar-action-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    margin: 0;
    width: 100%;
    white-space: nowrap;
}

.toolbar-action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-action-icon {
    flex: 0 0 auto;
    width: 1.25em;
    text-align: center;
}

/* icon_badge slot (e.g. c-icon.location): a colored square instead of a plain icon */
.toolbar-action-icon .pill-badge {
    margin: 0;
    font-size: 0.8em;
    line-height: 1.4;
}

.toolbar-action-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop (>=1080px): row of fixed-size icon-over-label buttons */
/* keep the toolbar's height even with no actions, so pages/tabs don't shift */
.toolbar > .toolbar-actions {
    min-height: 4.5rem;
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.toolbar > .toolbar-actions .toolbar-action-button {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 5.5rem;
    height: 4.5rem;
    text-align: center;
    border-radius: var(--pico-border-radius);
    white-space: normal;
}

.toolbar > .toolbar-actions .toolbar-action-button:hover:not(:disabled) {
    background: var(--pico-secondary-background);
}

.toolbar > .toolbar-actions .toolbar-action-icon {
    flex: 0 0 auto;
    width: auto;
    height: 1.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar > .toolbar-actions .toolbar-action-label {
    flex: 0 0 auto;
    font-size: 0.65rem;
    line-height: 1.1;
    height: calc(0.75rem * 1.1 * 2);
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    align-items: flex-start;
    overflow: hidden;
}

/* Mobile (<1080px): native <details>/<summary> dropdown, icon+label inline */
.toolbar-dropdown {
    position: relative;
}

.toolbar-summary {
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
}

.toolbar-summary::-webkit-details-marker {
    display: none;
}

.toolbar-dropdown .toolbar-actions {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 10;
    min-width: 180px;
    background: var(--pico-background-color);
    border: var(--pico-border-width) solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    box-shadow: var(--pico-box-shadow, 0 4px 12px rgba(0, 0, 0, 0.15));
    padding: 0.25rem;
}

.pill-badge {
    display: inline-block;
    padding: var(--pill-padding);
    margin: 0 2px;
    border-radius: var(--pill-radius);
    text-align: center;
}

.pill-badge-location-border {
    border: 2px solid var(--inventory-location-background);
}

.pill-badge-container-border {
    border: 2px solid var(--inventory-container-background);
}

.pill-badge-good {
    background: var(--inventory-good-background);
    color: var(--inventory-good-color);
}

/* icon square of the save action (c-toolbar.action.save) */
.pill-badge-save {
    background: var(--action-save-background);
    color: var(--action-save-color);
}

/* icon square of the cancel action (c-toolbar.action.cancel) */
.pill-badge-cancel {
    background: var(--action-cancel-background);
    color: var(--action-cancel-color);
}

/* icon square of the warning action (c-toolbar.action.warning) */
.pill-badge-warning {
    background: var(--action-warning-background);
    color: var(--action-warning-color);
}

.pill-badge-neutral {
    background: var(--pico-muted-border-color);
    color: var(--pico-muted-color);
}

.pill-badge-location {
    background: var(--inventory-location-background);
    color: var(--inventory-location-color);
}

.pill-badge-container {
    background: var(--inventory-container-background);
    color: var(--inventory-container-color);
}

.pill-badge-manifest {
    background: var(--inventory-manifest-background);
    color: var(--inventory-manifest-color);
}

.widget-row {
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    margin-bottom: 1rem;
}


.line-edit-field {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.line-edit-field label {
    margin-bottom: 0;
    white-space: nowrap;
}

.line-edit-field .line-edit-input {
    width: 9rem;
    margin-bottom: 0;
    text-align: right;
}

.widget-square {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    text-align: center;
    margin: 16px 4px;
}

.widget-square-link {
    color: inherit;
    text-decoration: none;
}

.widget-square-link:hover .widget-square {
    text-decoration: underline;
}

.widget-square-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.widget-square-badge:has(.seal-number-badge) {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.warning-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--pico-color-amber-500);
    border-radius: var(--pico-border-radius);
    background: var(--pico-color-amber-50);
    color: var(--pico-color-amber-950);
}

.error-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--pico-del-color);
    border-radius: var(--pico-border-radius);
    background: var(--pico-color-red-50);
    color: var(--pico-color-red-950);
}

.error-banner p:last-child,
.error-banner ol:last-child {
    margin-bottom: 0;
}

.copy-text {
    cursor: pointer;
    border-bottom: 1px dashed var(--pico-muted-border-color);
}

.seal-number-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 2px 10px;
    border-radius: 9999px;
    background: var(--inventory-good-background);
    color: var(--inventory-good-color);
    border: 1px solid var(--inventory-good-color);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.widget-good {
    border-radius: var(--pill-radius);
    background: var(--inventory-good-background);
    color: var(--inventory-good-color);
}

.widget-container {
    border-radius: var(--pill-radius);
    background: var(--inventory-container-background);
    color: var(--inventory-container-color);
}


.widget-square-value {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    padding: 8px;
}

.widget-square-compact {
    min-width: 96px;
    max-width: 120px;
    margin: 6px 3px;
}

.widget-square-compact .widget-square-value {
    font-size: 1.25rem;
    padding: 4px;
}

/* Barcode variant of .widget-square (c-widget.barcode): the bars sit on a white card so they scan in either theme */
.widget-barcode {
    gap: 6px;
    padding: 12px;
}

.widget-barcode-image {
    display: block;
    width: 100%;
    max-width: 280px;
    padding: 6px 10px;
    background: #fff;
    color: #000;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.widget-barcode .barcode-svg {
    display: block;
    width: 100%;
    height: 64px;
}

.widget-barcode-text {
    font-family: var(--pico-font-family-monospace);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
}

.widget-square-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.widget-square-grid .widget-square-compact {
    min-width: 0;
    max-width: none;
    width: 100%;
    margin: 0;
}

.widget-rectangle {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.widget-rectangle-footer {
    margin-top: auto;
    padding-top: 4px;
}

.widget-rectangle-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.widget-rectangle-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.title-background {
    display: inline-block;
    background-color: #f5f5f0;
    color: #000;
    padding: 1px 4px;
    border-radius: var(--pill-radius);
}

.no-border-force {
    border: none !important;
}

.inventory-table a {
    font-weight: 600;
}

.inventory-table-decorate-first-row tr:first-child {
    border-bottom: 0.2rem solid grey;
}

.inventory-table-eager-first-row tr > th:first-child,
.inventory-table-eager-first-row tr > td:first-child {
    width: 100%;
}

.inventory-table-eager-first-row tr > th:not(:first-child),
.inventory-table-eager-first-row tr > td:not(:first-child) {
    text-wrap: nowrap;
}

.inventory-table-sectioned {
    border-collapse: separate;
    border-spacing: 0 0.6rem;
}

.inventory-table-section {
    border-top: 1px solid #d4d4d4;
    border-bottom: 1px solid #d4d4d4;
}

@media (prefers-color-scheme: dark) {
    .inventory-table-section {
        border-color: #3a3a3a;
    }
}

/* Inventory location pages: room below the last row so its row menu (c-inventory.tree.actions) can open downward */
#location-main {
    padding-bottom: 12rem;
}

/* Picklist select (c-inventory.table.picklist_toggle): an outlined button, filled with the container colour once picked */
.picklist-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
    max-height: 2rem;
    margin: 0;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
    /* unselected: an empty square with a clearly visible outline */
    border: 2px solid var(--pico-form-element-border-color);
    border-radius: var(--pico-border-radius);
    background: transparent;
    box-shadow: none;
    color: var(--pico-muted-color);
    cursor: pointer;
}

/* unselected is an empty square: the check keeps its space (same size either way) but isn't shown */
.picklist-toggle:not(.is-picked) i {
    visibility: hidden;
}

.picklist-toggle:hover,
.picklist-toggle:focus-visible {
    border-color: var(--pico-muted-color);
    color: var(--pico-color);
    background: transparent;
}

.picklist-toggle.is-picked,
.picklist-toggle.is-picked:hover,
.picklist-toggle.is-picked:focus-visible {
    border-color: var(--inventory-container-color);
    background: var(--inventory-container-background);
    color: var(--inventory-container-color);
}

/* Favorite star on the dashboard rows: an invisible button, only the star shows (outlined / solid) */
.favorite-toggle,
.favorite-toggle:hover,
.favorite-toggle:focus,
.favorite-toggle:active {
    width: auto;
    margin: 0 0.4rem 0 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    color: var(--pico-muted-color);
    line-height: 1;
}

/* inherit, not var(--pico-color): Pico redefines --pico-color inside buttons (white in light mode) */
.favorite-toggle:hover,
.favorite-toggle:focus-visible {
    color: inherit;
}

.favorite-toggle.is-favorite,
.favorite-toggle.is-favorite:hover,
.favorite-toggle.is-favorite:focus-visible {
    color: inherit;
}

/* Mark as Picked Up: the "move the containers to the carrier" option, highlighted */
.carrier-move-option {
    border-left: 4px solid var(--pico-primary-background);
    background: var(--pico-primary-focus);
    padding: 0.75rem 1rem;
}

.carrier-move-option label {
    font-weight: 600;
}

/* Manifest Set Origin / Set Destination: destination type toggle, compact Select / Resolve / Current, and the missing-Location notes */
.destination-kinds {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.route-pick-form {
    margin: 0;
}

.route-pick,
a.route-pick[role="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 6.5rem;
    height: 2.25rem;
    margin: 0;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1;
}

.route-pick.is-current {
    border: var(--pico-border-width) solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    color: var(--pico-muted-color);
    gap: 0.35rem;
}

.destination-warning {
    display: block;
    color: var(--pico-muted-color);
}

.destination-warning.is-blocking {
    color: var(--pico-del-color);
}

/* Manifest line editor: the container search's results get half a screen reserved, so the page doesn't jump as
   results come and go while typing */
input.line-edit-search {
    margin-bottom: 1rem;
}

.line-edit-search-area {
    min-height: 50vh;
}

/* Consolidated Inventory tree (inventory_location_tree.html) */
.inventory-tree-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.25rem 1rem;
    margin-bottom: 0.5rem;
}

.inventory-tree-row {
    height: 32px;
}

.inventory-tree-faded {
    opacity: 0.35;
}

.inventory-tree-caret {
    display: inline-block;
    width: 1rem;
}

.inventory-tree-actions {
    position: relative;
}

.inventory-tree-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--pico-border-radius);
}

.inventory-tree-actions > a:hover,
.inventory-tree-actions > a:focus-visible,
.inventory-tree-actions > a[aria-expanded="true"] {
    background: var(--pico-secondary-background);
    color: var(--pico-secondary-inverse);
}

.inventory-tree-actions ul {
    position: absolute;
    right: 0;
    z-index: 10;
    margin: 0;
    padding: 0.25rem 0;
    min-width: 12rem;
    list-style: none;
    text-align: left;
    background: var(--pico-dropdown-background-color);
    border: var(--pico-border-width) solid var(--pico-dropdown-border-color);
    border-radius: var(--pico-border-radius);
    box-shadow: var(--pico-dropdown-box-shadow);
}

.inventory-tree-actions li {
    list-style: none;
    padding: 0;
    text-align: left;
}

/* menu sits in a right-aligned cell; keep every option (links and form buttons) left-aligned */
.inventory-tree-actions li a,
.inventory-tree-actions li button {
    text-align: left;
    justify-content: flex-start;
}

/* POST actions (e.g. Dispose) in the row menu look like the link items */
.inventory-tree-action-form {
    margin: 0;
}

.inventory-tree-action-form button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    /* match the link options instead of Pico's button typography */
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    text-align: left;
    white-space: nowrap;
}

.inventory-tree-action-form button > span {
    text-decoration: underline;
    text-decoration-color: var(--pico-primary-underline);
    text-underline-offset: var(--pico-text-underline-offset);
}

.inventory-tree-action-form button:hover,
.inventory-tree-action-form button:focus-visible {
    background: var(--pico-dropdown-hover-background-color);
}

/* every option: fixed-width icon square + label, so the labels line up */
.inventory-tree-actions li .pill-badge {
    flex: none;
    width: 1.75em;
    margin: 0;
    font-size: 0.75em;
    text-decoration: none;
}

.inventory-tree-actions li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

/* Inventory Location Type indicator pills (c-inventory.type_indicator) */
.type-pill {
    font-size: 0.7rem;
    padding: 0.08rem 0.3rem;
    border-radius: var(--pill-radius);
    white-space: nowrap;
}

/*Hub*/
.hub-color {
    color: #365314;
    background: #ecfccb;
}

/*Satellite*/
.sat-color {
    color: #4c1d95;
    background: #ede9fe;
}

/*Transit, Vendor*/
.trn-color,
.ven-color{
    color: #0c4a6e;
    background: #e0f2fe;
}

/*Customer*/
.cus-color {
    color: #164e63;
    background: #cffafe;
}


/*.scr-color {*/
/*    color: #7c2d12;*/
/*    background: #ffedd5;*/
/*}*/

/*Scrap*/
.scr-color {
    color: #7f1d1d;
    background: #fee2e2;
}

@media (prefers-color-scheme: dark) {
    .stk-color {
        color: #d9f99d;
        background: #1a2e05;
    }

    .srd-color {
        color: #fdba74;
        background: #431407;
    }

    .tra-color {
        color: #7dd3fc;
        background: #082f49;
    }

    .sld-color {
        color: #c4b5fd;
        background: #2e1065;
    }

    .sup-color {
        color: #67e8f9;
        background: #083344;
    }

    .scr-color {
        color: #f99d9d;
        background: #1a2e05;
    }
}

.row-actions-cell {
    width: 8.5rem;
    text-align: right;
    white-space: nowrap;
}

.minor-opacity {
    opacity: 0.7;
}

/* Toast notifications (e.g. picklist move confirmations) */
.toast-notify {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
    border-left: 4px solid var(--pico-ins-color);
}

/* Transit Manifest route-line status timeline */
.manifest-timeline {
    margin: 1.5rem 0 2.25rem;
}

.manifest-timeline-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
}

.manifest-timeline-track::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 1.75rem;
    right: 1.75rem;
    height: 2px;
    background: var(--pico-muted-border-color);
    z-index: 0;
}

.manifest-timeline-track::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 1.75rem;
    height: 2px;
    background: var(--pico-color-jade-550);
    z-index: 1;
    width: calc((100% - 3.5rem) * var(--mt-progress) / var(--mt-steps, 4));
    transition: width 0.3s ease;
}

.manifest-timeline-stop {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    text-align: center;
}

.manifest-timeline-stop .mt-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pico-background-color);
    border: 2px solid var(--pico-muted-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--pico-muted-color);
}

.manifest-timeline-stop.mt-done .mt-node {
    border-color: var(--pico-color-jade-550);
    background: var(--pico-color-jade-550);
    color: var(--pico-contrast-inverse, #fff);
}

.manifest-timeline-stop.mt-current .mt-node {
    border-color: var(--pico-color-orange-550);
    background: var(--pico-background-color);
    color: var(--pico-color-orange-550);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--pico-color-orange-550) 22%, transparent);
}

/* Transit timeline: its Dispute stop (only shown while disputed) is marked red rather than orange */
.manifest-timeline-stop.mt-dispute.mt-current .mt-node {
    border-color: var(--pico-color-red-550);
    color: var(--pico-color-red-550);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--pico-color-red-550) 22%, transparent);
}

.manifest-timeline-stop .mt-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pico-color);
}

.manifest-timeline-stop:not(.mt-done):not(.mt-current) .mt-label {
    color: var(--pico-muted-color);
    font-weight: 500;
}

.manifest-timeline-stop .mt-stamp {
    font-size: 0.72rem;
    color: var(--pico-muted-color);
    line-height: 1.4;
}

.manifest-timeline-stop.mt-current .mt-stamp {
    color: var(--pico-color-orange-550);
}

.manifest-timeline-stop .mt-substamp {
    display: block;
    opacity: 0.8;
}

@media (max-width: 720px) {
    .manifest-timeline-track {
        flex-wrap: wrap;
        row-gap: 1.5rem;
        column-gap: 0.5rem;
    }
    .manifest-timeline-track::before,
    .manifest-timeline-track::after {
        display: none;
    }
    .manifest-timeline-stop {
        flex: 0 0 30%;
    }
}

.widget-rectangle-title {
    font-weight: 600;
    background: none;
    padding: 0 0 0.5rem;
    margin: 0 0 0.5rem;
    border-bottom: var(--pico-border-width) solid var(--pico-muted-border-color);
}

.widget-rectangle-compact {
    display: inline-block;
    min-width: 14rem;
}

.widget-rectangle-compact .widget-rectangle-list {
    font-size: 0.85rem;
    gap: 0.4rem;
}

.transit-route {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.transit-route-stop {
    flex: 1;
    height: 100px;
}

.transit-route-stop .widget-square-value {
    font-size: 1.15rem;
    word-break: break-word;
}

.transit-route-arrow {
    flex: 0 0 auto;
    color: var(--pico-muted-color);
    font-size: 0.9rem;
}

.timestamps-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}
/* Transit route cells: each stop is cut to --route-stop-max with an ellipsis; the full name is in the
   wrapping [data-tooltip] (kept outside the clipped span so the tooltip isn't cut off). Fonts are monospace,
   so ch is exactly one character. */
.route-stop {
    --route-stop-max: 16ch;
    display: inline-block;
    max-width: var(--route-stop-max);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
