/* Flags panel — integrated into the deal-editor expanded row.
   Scoped under .fp-* so it cannot collide with the SPA's existing
   class names. Reuses the SPA's CSS variables (--t1, --t2, --t3, --acc,
   --border) defined in index.html. */

.fp-mount {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e5e7eb);
}

.fp-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
}
.fp-head h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--t3, #6b7280); font-weight: 600; margin: 0;
}
.fp-head .fp-count { color: var(--t2, #4b5563); font-weight: 400; margin-left: 6px; }

.fp-head .fp-add-toggle {
  font: inherit; font-size: 12px; padding: 4px 10px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 4px;
  background: transparent; color: var(--t2, #4b5563); cursor: pointer;
}
.fp-head .fp-add-toggle:hover { color: var(--t1, #111827); border-color: var(--t3, #6b7280); }

.fp-list { display: flex; flex-direction: column; gap: 6px; }
.fp-empty { color: var(--t3, #6b7280); font-size: 12px; padding: 6px 0; font-style: italic; }

.fp-flag {
  padding: 8px 10px; border: 1px solid var(--border, #e5e7eb);
  border-radius: 4px; background: #fafafa;
}
.fp-flag-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fp-flag-headline { font-weight: 600; font-size: 13px; color: var(--t1, #111827); }
.fp-flag-comment {
  margin: 4px 0 0; font-size: 12px; color: var(--t2, #4b5563);
  white-space: pre-wrap; word-break: break-word;
}
.fp-flag-meta { margin-top: 6px; font-size: 11px; color: var(--t3, #6b7280); }
.fp-flag-actions { margin-top: 6px; display: flex; gap: 6px; }
.fp-flag-actions button {
  font: inherit; font-size: 11px; padding: 2px 8px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 3px;
  background: white; color: var(--t2, #4b5563); cursor: pointer;
}
.fp-flag-actions button:hover { color: var(--t1, #111827); border-color: var(--t3, #6b7280); }
.fp-flag-actions button:disabled { opacity: 0.5; cursor: not-allowed; }

.fp-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  white-space: nowrap;
}
.fp-badge-deal { background: rgba(37,99,235,.10); color: #2563eb; }
.fp-badge-task { background: rgba(22,163,74,.10); color: #16a34a; }
.fp-badge-signal { background: rgba(124,58,237,.10); color: #7c3aed; }
.fp-badge-sev-low { background: rgba(22,163,74,.10); color: #16a34a; }
.fp-badge-sev-medium { background: rgba(202,138,4,.12); color: #ca8a04; }
.fp-badge-sev-high { background: rgba(220,38,38,.10); color: #dc2626; }

/* Add form (hidden until toggled open) */
.fp-form {
  display: none; margin-top: 10px; padding: 10px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 4px;
  background: white;
}
.fp-form.open { display: block; }
.fp-row {
  display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px;
  align-items: center; margin-bottom: 6px; font-size: 12px;
}
.fp-row label { color: var(--t2, #4b5563); }
.fp-row input, .fp-row select, .fp-row textarea {
  width: 100%; padding: 4px 8px; font: inherit; font-size: 12px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 3px;
  color: var(--t1, #111827); background: white;
}
.fp-row textarea { min-height: 50px; resize: vertical; }
.fp-form .fp-type-only { display: none; }
.fp-form .fp-type-only.fp-active { display: grid; }
.fp-form-actions { margin-top: 8px; display: flex; justify-content: flex-end; gap: 6px; }
.fp-form-actions button {
  font: inherit; font-size: 12px; padding: 4px 12px;
  border-radius: 3px; border: 1px solid;
  cursor: pointer;
}
.fp-form-actions .fp-submit {
  background: var(--acc, #2563eb); color: white; border-color: var(--acc, #2563eb);
}
.fp-form-actions .fp-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.fp-form-actions .fp-cancel {
  background: transparent; color: var(--t2, #4b5563); border-color: var(--border, #e5e7eb);
}
.fp-err { color: #dc2626; font-size: 12px; margin-top: 6px; }
