/* public/styles/tree-facts.css — owned by views/tree-facts.js. Shared styles live in base.css (do not edit base.css from a view).
   Every selector is prefixed .tree-facts- so it cannot collide with other views. */

/* Two-column "label → value" grid (one column on phones) */
.tree-facts-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px;
  padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.tree-facts-row {
  display: grid; grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr); align-items: center; gap: 10px;
  min-height: 46px; padding: 4px 0; border-bottom: 1px solid var(--line);
}
/* 14 rows in two columns → the last two rows sit on the bottom line */
.tree-facts-row:nth-last-child(-n + 2) { border-bottom: 0; }
.tree-facts-key { color: var(--muted); font-size: 0.88rem; line-height: 1.25; }
.tree-facts-val { min-width: 0; display: flex; align-items: center; }
.tree-facts-select { width: auto; max-width: 100%; min-width: 9rem; }
.tree-facts-field { max-width: 100%; }

/* Claude's advice */
.tree-facts-advice { margin-top: 18px; }
.tree-facts-advice-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: var(--touch); margin-bottom: 4px; }
.tree-facts-advice-title { display: inline-flex; align-items: center; gap: 6px; font-size: 1.02rem; }
.tree-facts-advice-form {
  display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; padding: 10px 12px;
  background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius-sm);
}
.tree-facts-advice-form textarea { min-height: 84px; resize: vertical; }
.tree-facts-advice-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tree-facts-advice-list { display: flex; flex-direction: column; gap: 8px; }
.tree-facts-advice-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: start;
  padding: 8px 10px 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.tree-facts-advice-date { margin-top: 4px; }
.tree-facts-advice-text { font-size: 0.95rem; line-height: 1.45; }
.tree-facts-advice-empty { padding: 6px 2px; }

/* Footer: source + verified */
.tree-facts-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.tree-facts-source { min-width: 0; overflow-wrap: anywhere; }
.tree-facts-source-key { font-weight: 600; }

@media (max-width: 640px) {
  .tree-facts-grid { grid-template-columns: 1fr; padding: 2px 12px; column-gap: 0; }
  .tree-facts-row { grid-template-columns: minmax(6.5rem, 36%) minmax(0, 1fr); min-height: 44px; }
  .tree-facts-row:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .tree-facts-row:last-child { border-bottom: 0; }
  .tree-facts-select { width: 100%; min-width: 0; }
  .tree-facts-advice-sub { display: none; }
  .tree-facts-advice-item { grid-template-columns: minmax(0, 1fr) auto; }
  .tree-facts-advice-date { grid-column: 1; margin-top: 0; justify-self: start; }
  .tree-facts-advice-text { grid-column: 1; }
  .tree-facts-advice-item .icon-btn { grid-column: 2; grid-row: 1 / span 2; }
}
