/* Location status history modal — scripts/directives/statusHistory.js.
   Same card language as the TaskDetails Data Exports panel (.xp-*): Poppins, slate palette. */

.sh-open { display: inline-flex; align-items: center; gap: 6px; }
.sh-open-compact { padding: 0; font-size: 12.5px; font-weight: 600; color: #1d4ed8; }
.sh-open-compact:hover, .sh-open-compact:focus { color: #1e3a5f; text-decoration: underline; }

.sh-modal .modal-content {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    border-radius: 16px; border: 1px solid #e5e7eb; overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}
.sh-head {
    padding: 18px 22px 16px; border-bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1d4ed8 140%); color: #fff;
}
.sh-head .close { color: #fff; opacity: .8; text-shadow: none; font-size: 26px; }
.sh-head .close:hover { opacity: 1; }
.sh-kicker {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #93c5fd;
}
.sh-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; color: #fff; }
.sh-title small { margin-left: 8px; font-size: 12.5px; font-weight: 500; color: #cbd5e1; }
.sh-current { margin-top: 10px; font-size: 13px; color: #e2e8f0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-current strong { color: #fff; }
.sh-current .sh-muted { color: #94a3b8; }

.sh-body { padding: 16px 22px 8px; background: #f8fafc; max-height: 68vh; overflow-y: auto; }
.sh-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.sh-loc { width: auto; max-width: 260px; }
.sh-search { flex: 1 1 200px; width: auto; min-width: 160px; }
.sh-export { display: inline-flex; align-items: center; gap: 6px; }
.sh-export .fa { color: #16a34a; }
.sh-filters { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: #e2e8f0; border-radius: 10px; }
.sh-filter {
    border: 0; background: transparent; border-radius: 8px; padding: 4px 10px;
    font-size: 12px; font-weight: 600; color: #475569;
}
.sh-filter span { margin-left: 3px; font-weight: 500; color: #94a3b8; font-variant-numeric: tabular-nums; }
.sh-filter.on { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.sh-filter:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }

.sh-state { padding: 28px 0; text-align: center; color: #64748b; font-size: 13px; }
.sh-state.is-error { color: #b91c1c; }

/* Timeline */
.sh-list { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.sh-list::before { content: ''; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: #e2e8f0; }
.sh-ev { position: relative; display: flex; gap: 12px; padding: 0 0 12px; }
.sh-dot {
    position: relative; z-index: 1; flex: none; width: 28px; height: 28px; margin-top: 8px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 2px solid #cbd5e1; color: #64748b; font-size: 11px;
}
.sh-ev.is-fwd .sh-dot { border-color: #16a34a; color: #16a34a; }
.sh-ev.is-back .sh-dot { border-color: #d97706; color: #d97706; background: #fffbeb; }
.sh-ev-main {
    flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px;
    background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.sh-ev.is-back .sh-ev-main { border-color: #fcd34d; }
.sh-ev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: #0f172a; }
.sh-loc-name { font-weight: 650; margin-right: 2px; }
.sh-action { font-weight: 600; color: #1e293b; }
.sh-arrow { color: #94a3b8; margin: 0 2px; }
.sh-ev.is-back .sh-arrow { color: #d97706; }
.sh-ev-meta { margin-top: 4px; font-size: 12.5px; color: #475569; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-ev-meta strong { color: #0f172a; font-weight: 600; }
.sh-sep { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }
.sh-role { font-size: 11px; font-weight: 600; color: #334155; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }
.sh-took { color: #64748b; }
.sh-reason {
    margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: #f8fafc; border-left: 3px solid #94a3b8;
    font-size: 12.5px; color: #334155; white-space: pre-wrap;
}
.sh-reason .fa { color: #94a3b8; margin-right: 4px; }

/* Status chips (LocationStatus IDs: 1 New, 2 In Progress, 3 Complete, 4 Submitted, 5 Approved, 6 Reviewed) */
.sh-chip {
    display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 18px;
    background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0;
}
.sh-chip.s-1 { background: #f1f5f9; color: #475569; }
.sh-chip.s-2 { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.sh-chip.s-4 { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.sh-chip.s-5 { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.sh-chip.s-6 { background: #fefce8; color: #a16207; border-color: #fde68a; }
.sh-chip.s-3 { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

.sh-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 6px; padding: 2px 6px; }
.sh-badge.is-back { background: #fef3c7; color: #92400e; }
.sh-badge.is-sql { background: #fee2e2; color: #991b1b; }
.sh-badge.is-backfill { background: #e2e8f0; color: #475569; }

.sh-more { margin-top: 6px; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 600; color: #1d4ed8; }
.sh-more .fa { font-size: 9px; margin-left: 2px; }
.sh-details { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.sh-changes { width: 100%; margin-bottom: 8px; font-size: 12px; }
.sh-changes th { padding: 3px 8px 3px 0; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; text-align: left; }
.sh-changes td { padding: 3px 8px 3px 0; color: #1e293b; border-top: 1px solid #f1f5f9; vertical-align: top; }
.sh-changes td:first-child { color: #475569; white-space: nowrap; }
.sh-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 0; font-size: 12px; }
.sh-dl dt { font-weight: 600; color: #64748b; }
.sh-dl dd { margin: 0; color: #1e293b; overflow-wrap: anywhere; }
.sh-dl code { font-size: 11.5px; color: #334155; background: #f1f5f9; padding: 0 4px; border-radius: 4px; }
.sh-ua { color: #64748b !important; }
.sh-muted { color: #64748b; }

.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; background: #fff; }
.sh-foot .sh-muted { font-size: 12px; text-align: left; }

@media (max-width: 600px) {
    .sh-body { padding: 12px 12px 4px; }
    .sh-head { padding: 14px 16px; }
    .sh-loc, .sh-search { flex: 1 1 100%; max-width: none; }
}
