/* Bulk Forecast Override CSV import + Active Overrides tag/status controls.
   spec/PLAN_bulk_forecast_override_upload.md. Globbed into :app (no per-view
   link tag — see design-system §19). Keeps these surfaces inline-style-free. */

.foi-intro {
  margin-bottom: 16px;
  color: var(--muted, #64748b);
  line-height: 1.6;
}

.foi-callout {
  background: var(--surface-alt, #f8f7f5);
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.foi-pre {
  margin: 8px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 6px;
  padding: 10px;
  overflow-x: auto;
}

.foi-cols {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 8px;
}

.foi-cols th,
.foi-cols td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color, #eee);
  vertical-align: top;
}

.foi-warn {
  color: var(--accent-red, #c0392b);
  font-weight: 600;
}

.foi-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}

.foi-file-input {
  max-width: 400px;
}

.foi-progress {
  margin-top: 24px;
}

.foi-spin-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foi-progress-track {
  margin-top: 8px;
  background: #e5e5e5;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

/* Width is driven by the poll controller (JS) on first fetch — starts empty so
   no inline style is needed on the server-rendered element. */
.foi-progress-bar {
  background: var(--accent-red, #c0392b);
  height: 100%;
  width: 0;
  transition: width 0.3s;
}

.foi-hidden {
  display: none;
}

/* --- Active Overrides toolbar additions (Import button + status links) --- */
.foi-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.foi-status-links {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.foi-status-links .foi-status-link.is-active {
  font-weight: 700;
  text-decoration: underline;
}

.foi-tag-chip {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--surface-alt, #eef2f7);
  color: var(--muted, #475569);
  white-space: nowrap;
}

.foi-recent-error {
  color: var(--accent-red, #c0392b);
  font-size: 0.85rem;
}

/* Deep-link scope banner — shown when the list is filtered to one product via
   the product Forecast tab's Override-header jump link (?product_id=). */
.foi-product-scope {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface-alt, #eef2f7);
  border: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
  color: var(--ink, #1a1a1a);
}
.foi-product-scope .foi-product-scope-clear { margin-left: auto; }
