/* Fashion Nova fulfillment foresight strip -- see orders-fn-foresight.js.
   Dense cards, one per active plan, colored by risk_level so an urgent
   FN control is visible on the live warehouse page without opening the
   separate React Neet FnDue view. */
.fnf-strip {
  padding: 6px 8px;
  margin-bottom: 8px;
  background: var(--bg1);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  font-size: 0.72rem;
  line-height: 1.4;
}
.fnf-strip.fnf-disconnected { border-color: var(--red); }
.fnf-strip.fnf-stale { border-color: var(--yellow); }
.fnf-empty { color: var(--fg2); }

.fnf-strip-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 6px;
}
.fnf-title { font-weight: 700; color: var(--fg1); }
.fnf-count {
  padding: 1px 6px; border-radius: 3px;
  background: var(--bg2); color: var(--fg2);
  font-size: 0.68rem; white-space: nowrap;
}
.fnf-count-urgent { color: var(--red); }
.fnf-count-attention { color: var(--yellow); }
.fnf-count-clear { color: var(--green); }
.fnf-count-automation { color: var(--yellow); }
.fnf-count-stale { background: rgba(156,124,32,0.14); color: var(--yellow); font-weight: 700; }

.fnf-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 320px);
  gap: 6px; overflow-x: auto; padding-bottom: 2px;
}
.fnf-priority { margin-bottom: 4px; }

/* Ordinary tracking controls collapse behind a native disclosure -- always
   visible, but not weighted equal to the needs-you/automation-exception
   cards above. */
.fnf-tracking-details { margin-top: 2px; }
.fnf-tracking-summary {
  list-style: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--bg2);
  color: var(--fg2);
  font-size: 0.68rem; font-weight: 600;
  user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.fnf-tracking-summary::-webkit-details-marker { display: none; }
.fnf-tracking-summary::before { content: '\25B8'; font-size: 0.6rem; }
.fnf-tracking-details[open] > .fnf-tracking-summary::before { content: '\25BE'; }
.fnf-tracking-details .fnf-list { margin-top: 6px; }
.fnf-card {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 220px; max-width: 320px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg2);
  border-left: 3px solid var(--fg2);
}
.fnf-urgent { border-left-color: var(--red); }
.fnf-attention { border-left-color: var(--yellow); }
.fnf-clear { border-left-color: var(--green); }
.fnf-card.fnf-automated-exception { border-left-color: var(--yellow); }

.fnf-card-head {
  display: flex; align-items: center; gap: 6px;
}
.fnf-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--fg2); }
.fnf-urgent .fnf-dot { background: var(--red); }
.fnf-attention .fnf-dot { background: var(--yellow); }
.fnf-clear .fnf-dot { background: var(--green); }
.fnf-card.fnf-automated-exception .fnf-dot { background: var(--yellow); }
.fnf-pos { font-weight: 700; color: var(--fg0); }
.fnf-risk { margin-left: auto; color: var(--fg2); font-size: 0.68rem; }

.fnf-card-meta {
  display: flex; gap: 8px; color: var(--fg2); font-size: 0.68rem;
}
.fnf-label { color: var(--fg1); font-weight: 600; }
.fnf-note { color: var(--fg2); font-size: 0.68rem; }

/* The summary is always visible; full plan notes are one disclosure away. */
details.fnf-strip { padding: 0; }
details.fnf-strip > .fnf-strip-head {
  cursor: pointer;
  list-style: none;
  min-height: 36px;
  padding: 6px 10px;
  margin-bottom: 0;
  gap: 6px;
}
details.fnf-strip > .fnf-strip-head::-webkit-details-marker { display: none; }
details.fnf-strip > .fnf-strip-head::before { content: '\25B8'; }
details.fnf-strip[open] > .fnf-strip-head::before { content: '\25BE'; }
details.fnf-strip > .fnf-priority,
details.fnf-strip > .fnf-tracking-details,
details.fnf-strip > .fnf-empty { margin: 0 8px 6px; }
details.fnf-strip .fnf-list {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  grid-auto-columns: auto;
}
details.fnf-strip .fnf-card { min-width: 0; max-width: none; overflow-wrap: anywhere; }
details.fnf-strip .fnf-card-meta { flex-wrap: wrap; }
details.fnf-strip .fnf-note { color: var(--fg1); }
