/* Opt-in heatmap for lookup results and saved overviews only. */
.lookup-heatmap { --heat-strong: #c9ebd1; --heat-current: #e2f2e4; --heat-aging: #faedda; --heat-none: #f0f2f4; }
.lookup-heatmap-summary { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; }
.lookup-heatmap-summary > div { flex: 1 1 210px; display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid #e3e7eb; border-radius: 8px; }
.lookup-heatmap-summary strong { color: #155b35; font-size: 1.6rem; }
.lookup-heatmap-summary span { color: #586474; font-size: .85rem; }
.lookup-heatmap-guide { padding: 8px 16px 12px; color: #586474; font-size: .85rem; }
.lookup-heatmap-guide > span { margin: 0 18px; }
.lookup-heatmap .parts-table {
    font-family: Inter, system-ui, sans-serif; font-size: 13px;
    font-variant-numeric: tabular-nums; border-collapse: collapse;
}
.lookup-heatmap .parts-table-container { border-color: #e4e7eb; }
.lookup-heatmap .parts-table thead th {
    background: #f7f8fa !important; border-left: 0 !important; border-right: 0 !important;
    border-bottom: 1px solid #d9dee5; color: #475467;
    font-size: 12px; font-weight: 600; line-height: 1.35; padding: 8px 10px;
    box-shadow: none;
}
.lookup-heatmap .parts-table thead th.lookup-inventory { box-shadow: inset 0 2px #b2cbb8; }
.lookup-heatmap .parts-table thead th.lookup-trading { box-shadow: inset 0 2px #c4d4c8; }
.lookup-heatmap .parts-table thead th.lookup-sourcing { box-shadow: inset 0 2px #d4dace; }
.lookup-heatmap .parts-table thead th.lookup-reference { box-shadow: inset 0 2px #d9dee5; }
.lookup-heatmap .parts-table tbody tr td {
    background: #fff !important; border-bottom: 1px solid #e4e7eb;
    border-left: 0; border-right: 0; padding: 8px 10px;
    vertical-align: top; line-height: 1.4; color: #344054;
}
.lookup-heatmap .parts-table tbody tr:nth-child(even) td { background: #fafbfc !important; }
.lookup-heatmap .heat-strong { --heat-fill: var(--heat-strong); }
.lookup-heatmap .heat-current { --heat-fill: var(--heat-current); }
.lookup-heatmap .heat-aging { --heat-fill: var(--heat-aging); }
.lookup-heatmap .heat-none { --heat-fill: var(--heat-none); }
.lookup-heatmap .parts-table tbody tr td.heat-cell { background: var(--heat-fill) !important; color: #24332b; }
.lookup-heatmap .parts-table tbody tr:hover td { box-shadow: inset 0 0 0 999px #172b4d06; }
.lookup-heatmap .parts-table .clickable-cell:hover { opacity: 1; }
.lookup-heatmap .parts-table tbody tr td.heat-cell > div {
    gap: 3px !important; align-items: flex-start;
}
.lookup-heatmap .heat-cell .badge {
    align-self: flex-start; width: fit-content; min-width: 0;
    background: #3440540a !important; color: #596579 !important;
    border: 0; border-radius: 4px; padding: 1px 5px;
    font-size: 10px !important; font-weight: 500; line-height: 1.4;
}
.lookup-heatmap .heat-cell .badge-count,
.lookup-heatmap .heat-cell .ils-badge,
.lookup-heatmap .heat-cell .stock-badge {
    display: inline-flex; align-items: center; gap: 4px;
    align-self: flex-start; width: fit-content; min-width: 0;
    background: transparent !important; color: #24332b !important;
    border: 0; border-radius: 0; padding: 0;
    font-size: 13px; font-weight: 600; line-height: 1.4;
}
.lookup-heatmap .heat-cell .ils-badge-preferred { font-size: 11px; font-weight: 500; color: #596579 !important; }
.lookup-heatmap .heat-cell small,
.lookup-heatmap .heat-cell .text-muted { color: #667085 !important; font-size: 10px !important; font-weight: 400; }
.lookup-heatmap .heat-cell .date-indicator { gap: 4px; white-space: nowrap; }
.lookup-heatmap .heat-cell .date-dot { width: 5px; height: 5px; }
.lookup-heatmap .heat-cell .mt-1 { margin-top: 3px !important; }
.lookup-heatmap .heat-cell .lookup-customer-history {
    display: flex; align-items: center; gap: 4px; width: fit-content;
    max-width: 100%; margin-top: 5px; padding: 2px 5px;
    border-left: 2px solid #2970ff; border-radius: 3px;
    background: #edf4ffb3; color: #175cd3;
    font-size: 10px; font-weight: 600; line-height: 1.4;
}
.lookup-heatmap .heat-cell .lookup-customer-history svg { flex: 0 0 auto; }
.lookup-heatmap .heat-cell .lookup-customer-history span { color: #175cd3; }
.lookup-heatmap .heat-cell .lookup-alternative-history {
    display: inline-flex; vertical-align: middle; margin-left: 6px;
    color: #175cd3; line-height: 1;
}
.lookup-heatmap .heat-cell .badge-count.badge-muted,
.lookup-heatmap .parts-table tbody tr td.lookup-empty { color: #a6afb9 !important; font-weight: 400; }
.lookup-heatmap .parts-table tbody tr td.lookup-empty .badge-count { color: inherit !important; }
.lookup-heatmap .heat-cell .bi-building,
.lookup-heatmap .heat-cell .bi-star-fill,
.lookup-heatmap .heat-cell .bi-arrow-left-right { color: #596579 !important; font-size: 11px !important; }
.lookup-heatmap .heat-cell.heat-none .stock-badge i { color: #98a2b3 !important; }
.lookup-heatmap .parts-table tbody tr td.heat-cell :is(div, span)[style*="color"] { color: #24332b !important; }
.lookup-heatmap .parts-table tbody tr:has(.badge.bg-primary) td:nth-child(2) { border-left: 3px solid #0ea5e9; }
.lookup-heatmap-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 16px; color: #586474; font-size: .8rem; border-top: 1px solid #e4e7ec; }
.lookup-heatmap-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lookup-heatmap-legend small { margin-left: auto; }
.lookup-heatmap .heat-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--heat-fill); }
