/** Add css rules here for your application. */
:root {
    --ots-blue-50: #e7eaed;
    --ots-blue-100: #d0d4db;
    --ots-blue-200: #b8bec9;
    --ots-blue-300: #a0a9b7;
    --ots-blue-400: #717e94;
    --ots-blue-500: #12284c;
    --ots-blue-600: #0f2241;
    --ots-blue-700: #0e1e39;
    --ots-blue-800: #0b182e;
    --ots-blue-900: #081222;
    --ots-blue-focus: #2e4f86;
    --ots-surface: #ffffff;
    --ots-surface-muted: #f7fbff;
    --ots-surface-strong: #eaf5ff;
    --ots-border: #cfe4f8;
    --ots-text: #0f172a;
    --ots-text-muted: #52637a;
    --ots-selection-bg: rgba(46, 79, 134, 0.12);
    --ots-selection-border: rgba(46, 79, 134, 0.42);
    --ots-selection-text: #0e1e39;
    --ots-hover-bg: rgba(46, 79, 134, 0.08);
    --ots-shadow: rgba(15, 23, 42, 0.2);
    --ots-tree-surface: rgba(255, 255, 255, 0.78);
    --ots-tree-border: rgba(18, 40, 76, 0.14);
    --ots-tree-row-route-mix: 22%;
    --ots-tree-row-route-hover-mix: 30%;
    --ots-tree-selected-bg: #dbe7f7;
    --ots-tree-selected-border: #2e4f86;
    --ots-tree-selected-ring: rgba(46, 79, 134, 0.42);
}

html.dark,
body.dark,
[data-theme="dark"],
[data-bs-theme="dark"] {
    --ots-blue-50: #e7eaed;
    --ots-blue-100: #d0d4db;
    --ots-blue-200: #b8bec9;
    --ots-blue-300: #a0a9b7;
    --ots-blue-400: #717e94;
    --ots-blue-500: #12284c;
    --ots-blue-600: #0f2241;
    --ots-blue-700: #0e1e39;
    --ots-blue-800: #0b182e;
    --ots-blue-900: #081222;
    --ots-blue-focus: #90b4f8;
    --ots-surface: #111827;
    --ots-surface-muted: #0f172a;
    --ots-surface-strong: rgba(144, 180, 248, 0.16);
    --ots-border: #24435f;
    --ots-text: #e5edf7;
    --ots-text-muted: #a9b9cc;
    --ots-selection-bg: rgba(144, 180, 248, 0.16);
    --ots-selection-border: rgba(144, 180, 248, 0.52);
    --ots-selection-text: #e5edf7;
    --ots-hover-bg: rgba(144, 180, 248, 0.10);
    --ots-shadow: rgba(0, 0, 0, 0.42);
    --ots-tree-surface: rgba(15, 23, 42, 0.56);
    --ots-tree-border: rgba(169, 185, 204, 0.18);
    --ots-tree-row-route-mix: 34%;
    --ots-tree-row-route-hover-mix: 44%;
    --ots-tree-selected-bg: #1f3a5f;
    --ots-tree-selected-border: #90b4f8;
    --ots-tree-selected-ring: rgba(144, 180, 248, 0.58);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ots-blue-focus: #90b4f8;
        --ots-surface: #111827;
        --ots-surface-muted: #0f172a;
        --ots-surface-strong: rgba(144, 180, 248, 0.16);
        --ots-border: #24435f;
        --ots-text: #e5edf7;
        --ots-text-muted: #a9b9cc;
        --ots-selection-bg: rgba(144, 180, 248, 0.16);
        --ots-selection-border: rgba(144, 180, 248, 0.52);
        --ots-selection-text: #e5edf7;
        --ots-hover-bg: rgba(144, 180, 248, 0.10);
        --ots-shadow: rgba(0, 0, 0, 0.42);
        --ots-tree-surface: rgba(15, 23, 42, 0.56);
        --ots-tree-border: rgba(169, 185, 204, 0.18);
        --ots-tree-row-route-mix: 34%;
        --ots-tree-row-route-hover-mix: 44%;
        --ots-tree-selected-bg: #1f3a5f;
        --ots-tree-selected-border: #90b4f8;
        --ots-tree-selected-ring: rgba(144, 180, 248, 0.58);
    }
}

html.light,
body.light,
[data-theme="light"],
[data-bs-theme="light"] {
    --ots-blue-focus: #2e4f86;
    --ots-surface: #ffffff;
    --ots-surface-muted: #f7fbff;
    --ots-surface-strong: #eaf5ff;
    --ots-border: #cfe4f8;
    --ots-text: #0f172a;
    --ots-text-muted: #52637a;
    --ots-selection-bg: rgba(46, 79, 134, 0.12);
    --ots-selection-border: rgba(46, 79, 134, 0.42);
    --ots-selection-text: #0e1e39;
    --ots-hover-bg: rgba(46, 79, 134, 0.08);
    --ots-shadow: rgba(15, 23, 42, 0.2);
    --ots-tree-surface: rgba(255, 255, 255, 0.78);
    --ots-tree-border: rgba(18, 40, 76, 0.14);
    --ots-tree-row-route-mix: 22%;
    --ots-tree-row-route-hover-mix: 30%;
    --ots-tree-selected-bg: #dbe7f7;
    --ots-tree-selected-border: #2e4f86;
    --ots-tree-selected-ring: rgba(46, 79, 134, 0.42);
}

.redBackground {
    background-color: red;
}

.yellowBackground {
    background-color: yellow;
}

.greenBackground {
    background-color: green;
}

.paddedHorizontalPanel {
    padding-left: 20px;
}

.material-icons.md-18 {
    font-size: 18px;
}

.material-icons.md-24 {
    font-size: 24px;
}

.material-icons.md-36 {
    font-size: 36px;
}

.material-icons.md-48 {
    font-size: 48px;
}

.material-icons.md-dark {
    color: rgba(77, 82, 88, 0.54);
}

.material-icons.md-dark.md-inactive {
    color: rgba(77, 82, 88, 0.26);
}

.waterGoTextBox {
    background-image: url('images/WaterGo.png');
    background-repeat: no-repeat;
    background-position: right;
    padding-right: 5px;
}

.fieldGoTextBox {
    background-image: url('images/FieldGo18.png');
    background-repeat: no-repeat;
    background-position: right;
    padding-right: 5px;
}

.font-awesome .fa {
    font-family: "Font Awesome 5 Free", Open Sans, serif;
}

i.fa-filter.filter-icon-active {
    color: #FF7F50 !important;
}

.filter-popup {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 10px;
}

.filter-popup-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 150px;
}

.filter-button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.violations-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.violations-table thead th {
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 12px;
    white-space: nowrap;
    background: #f8fafc;
}

.violations-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    color: #0f172a;
}

.violations-table tbody tr:nth-child(odd) td {
    background: #fcfdff;
}

/* helpers */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
}

.wrap {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* severity badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.6;
    color: #fff;
}

.badge[data-sev="BLOCKING"] {
    background: #ef4444;
}

.badge[data-sev="WARN"] {
    background: #f59e0b;
    color: #111827;
}

.badge[data-sev="INFO"] {
    background: #3b82f6;
}

.badge[data-sev="UNKNOWN"] {
    background: #111827;
}

.icon-link {
    margin-left: 8px;
    color: #374151;
    text-decoration: none;
}

.icon-link:hover {
    color: #111827;
}

.notyf__toast {
    border-radius: 0.75rem !important; /* ≈ 12px */
    overflow: hidden;
}

.notyf-loading-spinner {
    animation: notyf-loading-spin 0.85s linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    display: inline-block;
    height: 16px;
    width: 16px;
}

@keyframes notyf-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-table {
    padding: 40px;
    text-align: center;
    color: #8a8a8a;
}

.empty-table-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: #b5b5b5;
}

.empty-table-title {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.empty-table-description {
    font-size: 13px;
    line-height: 1.4;
    color: #777;
    max-width: 420px;
    margin: 0 auto;
}

.ots-tooltip {
    background: rgba(0,0,0,0.88);
    color: #fff;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    z-index: 999999;
}

.ots-tooltip::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(0,0,0,0.88);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.jsonViewerHost {
    display: block;
    margin-bottom: 18px;
}

.jsonViewerHost json-viewer {
    display: block;
    max-height: 340px;
    overflow: auto;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;

    --background-color: #ffffff;
    --color: #111827;
    --font-family: Consolas, Monaco, monospace;
    --font-size: 12px;
    --line-height: 1.45;
    --indent-size: 0.75em;
    --string-color: #0f766e;
    --number-color: #b45309;
    --boolean-color: #1d4ed8;
    --null-color: #7c3aed;
    --property-color: #374151;
    --preview-color: #6b7280;
    --highlight-color: #dc2626;
}

.ticket-dispute-pending-row {
    background-color: #fff4e8 !important;
}

.mapShiftTree .mapShiftTreeRow {
    background: var(--ots-tree-surface);
    border: 1px solid transparent;
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--ots-text);
    margin: 1px 0;
    padding: 4px 7px;
}

.mapShiftTree .mapShiftTreeRow:hover {
    background: var(--ots-hover-bg);
    border-color: var(--ots-tree-border);
}

.mapShiftTree .mapShiftTreeTransportRow {
    background: color-mix(in srgb, var(--map-shift-route-color, var(--ots-blue-focus)) var(--ots-tree-row-route-mix), var(--ots-surface));
    border-color: color-mix(in srgb, var(--map-shift-route-color, var(--ots-blue-focus)) 55%, transparent);
    box-shadow: inset 4px 0 0 var(--map-shift-route-color, var(--ots-blue-focus));
    padding-left: 9px;
}

.mapShiftTree .mapShiftTreeTransportRow:hover {
    background: color-mix(in srgb, var(--map-shift-route-color, var(--ots-blue-focus)) var(--ots-tree-row-route-hover-mix), var(--ots-surface));
    border-color: color-mix(in srgb, var(--map-shift-route-color, var(--ots-blue-focus)) 74%, transparent);
}

.mapShiftTree .mapShiftTreeRowSelected {
    background: var(--ots-tree-selected-bg) !important;
    border-color: var(--ots-tree-selected-ring) !important;
    box-shadow: inset 5px 0 0 var(--ots-tree-selected-border), 0 0 0 1px var(--ots-tree-selected-ring);
    color: var(--ots-selection-text) !important;
    font-weight: 600;
}

.mapShiftTree .mapShiftTreeTransportRow.mapShiftTreeRowSelected {
    background: color-mix(in srgb, var(--map-shift-route-color, var(--ots-blue-focus)) 18%, var(--ots-tree-selected-bg)) !important;
    box-shadow: inset 5px 0 0 var(--map-shift-route-color, var(--ots-tree-selected-border)), 0 0 0 1px var(--ots-tree-selected-ring);
}

.entityGraphQuickLinksPopup {
    --entity-graph-ots-blue: var(--ots-blue-focus);
    --entity-graph-ots-blue-dark: var(--ots-selection-text);
    --entity-graph-ots-blue-soft: var(--ots-selection-bg);
    --entity-graph-ots-blue-border: var(--ots-selection-border);
    --entity-graph-surface: var(--ots-surface);
    --entity-graph-surface-muted: var(--ots-surface-muted);
    --entity-graph-surface-strong: var(--ots-surface-strong);
    --entity-graph-border: var(--ots-border);
    --entity-graph-text: var(--ots-text);
    --entity-graph-muted: var(--ots-text-muted);
    --entity-graph-shadow: var(--ots-shadow);
    background: var(--entity-graph-surface);
    border: 1px solid var(--entity-graph-border);
    border-radius: 7px;
    box-shadow: 0 14px 32px var(--entity-graph-shadow);
    max-height: 460px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    padding: 8px;
    width: 360px;
    z-index: 10000;
}

.entityGraphQuickLinksPopup .popupContent {
    max-height: 444px;
    overflow: hidden;
}

.entityGraphQuickLinksMenu {
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 444px;
    overflow: hidden;
    width: 100%;
}

.entityGraphQuickLinksHeader {
    background: linear-gradient(90deg, var(--entity-graph-surface-strong), var(--entity-graph-surface-muted));
    border-left: 3px solid var(--entity-graph-ots-blue);
    border-radius: 4px;
    color: var(--entity-graph-ots-blue-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-top: 4px;
    padding: 6px 10px 5px;
    text-transform: uppercase;
}

.entityGraphQuickLinksRow {
    border-radius: 5px;
}

.entityGraphQuickLinksItem {
    background: transparent;
    border: 0;
    border-radius: 5px;
    box-sizing: border-box;
    cursor: pointer;
    display: grid;
    gap: 2px;
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.entityGraphQuickLinksItem:hover,
.entityGraphQuickLinksItem:focus {
    background: var(--entity-graph-ots-blue-soft);
    outline: none;
}

.entityGraphQuickLinksType {
    color: var(--entity-graph-muted);
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.entityGraphQuickLinksLabel {
    color: var(--entity-graph-text);
    font-size: 13px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entityGraphQuickLinksActionMenu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px 8px 30px;
}

.entityGraphQuickLinksActionButton {
    background: var(--entity-graph-surface);
    border: 1px solid var(--entity-graph-border);
    border-radius: 5px;
    color: var(--entity-graph-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    padding: 6px 8px;
}

.entityGraphQuickLinksActionButton:hover,
.entityGraphQuickLinksActionButton:focus {
    background: var(--entity-graph-ots-blue-soft);
    border-color: var(--entity-graph-ots-blue-border);
    color: var(--entity-graph-ots-blue-dark);
    outline: none;
}

.entityGraphQuickLinksMore {
    color: var(--entity-graph-muted);
    font-size: 12px;
    font-style: italic;
    padding: 6px 10px;
}

.entityGraphQuickLinksSpinner {
    animation: spin 0.7s linear infinite;
    border: 2px solid var(--entity-graph-border);
    border-radius: 50%;
    border-top-color: var(--entity-graph-ots-blue);
    display: inline-block;
    height: 10px;
    margin-right: 8px;
    vertical-align: -1px;
    width: 10px;
}
