/* eidolon-seed.css — Seed-twin-from-document modal + trigger button.
   Scoped to #btn-seed-twin / #seed-modal / .seed-* so nothing else in
   the UI shifts. Uses the same CSS custom properties (--panel, --amber,
   --border, --muted, --danger) as the rest of Personal so it tracks
   theme switches automatically. */

/* The trigger button uses the existing .btn-portrait class for size +
   alignment; only the icon stroke benefits from a hover tint here. */
#btn-seed-twin:hover { color: var(--amber); border-color: var(--amber-dim); }
#btn-seed-twin:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ── Backdrop ─────────────────────────────────────────────────────── */
.seed-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: none;
}
.seed-modal-backdrop.open { display: block; }

/* ── Modal shell ──────────────────────────────────────────────────── */
.seed-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  background: var(--panel, #1c1c1c);
  border: 1px solid var(--border-hi, #333);
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-ui, system-ui, sans-serif);
  color: var(--text, #e0e0e0);
}
.seed-modal.open { display: flex; }

.seed-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #2a2a2a);
}
.seed-modal-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-hi, #f0f0f0);
}
.seed-close-btn {
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.seed-close-btn:hover { color: var(--amber, #d4a040); }

.seed-modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 12px;
}
.seed-help {
  margin: 0 0 14px;
  color: var(--muted, #999);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ── Form rows ────────────────────────────────────────────────────── */
.seed-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.seed-form-label {
  flex: 0 0 110px;
  color: var(--muted, #999);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.seed-form-row input[type="file"],
.seed-form-row select {
  flex: 1;
  background: var(--input-bg, #111);
  color: var(--text, #e0e0e0);
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 4px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
}
.seed-form-row select:focus,
.seed-form-row input[type="file"]:focus {
  outline: 2px solid var(--amber, #d4a040);
  outline-offset: 1px;
}

/* ── Action buttons ───────────────────────────────────────────────── */
.seed-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.seed-btn-primary {
  background: var(--amber, #d4a040);
  color: #1a1a1a;
  border: 1px solid var(--amber, #d4a040);
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.seed-btn-primary:hover:not(:disabled) {
  background: var(--amber-bright, #e8b14a);
  border-color: var(--amber-bright, #e8b14a);
}
.seed-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.seed-btn-link {
  background: none;
  border: none;
  color: var(--muted, #999);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: underline;
  font-family: inherit;
}
.seed-btn-link:hover { color: var(--amber, #d4a040); }

/* ── Status + summary ─────────────────────────────────────────────── */
.seed-status {
  margin: 10px 0;
  padding: 8px 10px;
  background: var(--input-bg, #111);
  border-left: 2px solid var(--amber, #d4a040);
  font-size: 11.5px;
  color: var(--text, #e0e0e0);
  border-radius: 2px;
}
.seed-status.warn {
  border-left-color: var(--danger, #c0392b);
  color: var(--danger, #c0392b);
}

.seed-summary {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(212, 160, 64, 0.08);
  border: 1px solid var(--amber-dim, rgba(212, 160, 64, 0.4));
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-hi, #f0f0f0);
}

/* ── Preview pane ─────────────────────────────────────────────────── */
.seed-preview {
  margin-top: 14px;
  border-top: 1px solid var(--border, #2a2a2a);
  padding-top: 12px;
}
.seed-preview-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.seed-preview-header strong {
  font-size: 12px;
  color: var(--text-hi, #f0f0f0);
}
.seed-preview-meta {
  font-size: 11px;
  color: var(--muted, #888);
}
.seed-preview-actions {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.seed-obs-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 4px;
  background: var(--input-bg, #111);
}
.seed-obs-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #2a2a2a);
}
.seed-obs-row:last-child { border-bottom: none; }
.seed-obs-row .seed-obs-check {
  margin-top: 3px;
  flex: 0 0 auto;
  cursor: pointer;
}
.seed-obs-label {
  flex: 1;
  cursor: pointer;
  font-weight: normal;
}
.seed-obs-body { display: flex; flex-direction: column; gap: 4px; }

.seed-obs-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.seed-obs-cat {
  background: rgba(212, 160, 64, 0.12);
  color: var(--amber, #d4a040);
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.03em;
}
.seed-obs-conf,
.seed-obs-period { color: var(--muted, #888); }

.seed-obs-content {
  font-size: 12px;
  color: var(--text-hi, #f0f0f0);
  line-height: 1.4;
}
.seed-obs-evidence {
  font-size: 11px;
  color: var(--muted, #999);
  font-style: italic;
  border-left: 2px solid var(--border, #2a2a2a);
  padding-left: 8px;
  line-height: 1.4;
}
.seed-obs-empty {
  padding: 14px 12px;
  font-size: 11.5px;
  color: var(--muted, #888);
  font-style: italic;
  text-align: center;
}

/* ── Mobile breakpoint (Personal is desktop-primary, but the modal
   shouldn't fall over when the window narrows) ────────────────────── */
@media (max-width: 520px) {
  .seed-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .seed-form-label { flex: none; }
}
