/* ── CARD ── */
.idea-card {
  display: grid; grid-template-columns: 28px 1fr 1fr;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 10px; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.15s;
}
.idea-card:focus-within { border-color: var(--border-strong); }
.idea-card.dragging { opacity: 0.35; }
.idea-card.drag-over { box-shadow: 0 -3px 0 0 var(--teal); }

/* ── DRAG HANDLE ── */
.drag-handle {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: grab; padding: 0 6px; border-right: 1px solid var(--border);
  background: var(--bg); transition: background 0.15s;
  user-select: none; -webkit-user-select: none; align-self: stretch;
}
.drag-handle:hover { background: #ede9e2; }
.drag-handle:active { cursor: grabbing; }
.drag-handle .dot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.drag-handle .dot-grid span {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-faint); display: block; transition: background 0.15s;
}
.drag-handle:hover .dot-grid span { background: var(--text-muted); }

/* ── LEFT CELL (idea) ── */
.cell-left { border-right: 1px solid var(--border); position: relative; min-height: 90px; align-self: stretch; }
.cell-left-click { position: absolute; inset: 0; cursor: text; z-index: 1; }
.cell-left-inner { position: absolute; inset: 0; padding: 16px 14px 16px 10px; display: flex; gap: 10px; align-items: flex-start; }

.idea-num { font-size: 11px; color: var(--text-faint); padding-top: 4px; min-width: 16px; flex-shrink: 0; z-index: 2; position: relative; }
.idea-ta {
  flex: 1; width: 100%; height: 100%;
  font-family: 'Lora', serif; font-size: 16px; line-height: 1.65;
  color: var(--text); border: none; background: transparent;
  resize: none; outline: none; overflow: hidden;
  position: relative; z-index: 2; min-height: 58px;
}
.idea-ta::placeholder { color: var(--text-faint); font-style: italic; }

/* ── RIGHT CELL ── */
.cell-right { padding: 14px 16px; display: flex; flex-direction: column; gap: 0; }

.section-block { margin-bottom: 10px; }
.section-block:last-child { margin-bottom: 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.section-title { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.section-title .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.swap-btn {
  font-family: 'Inter', sans-serif; font-size: 10px; color: var(--text-faint);
  background: transparent; border: none; cursor: pointer; padding: 2px 5px;
  border-radius: 4px; transition: color 0.12s, background 0.12s;
  display: flex; align-items: center; gap: 3px;
}
.swap-btn:hover { color: var(--text-muted); background: var(--bg); }

/* ── REASON ROWS ── */
.reason-row { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 5px; position: relative; }

.reason-row.pending-delete .reason-ta {
  text-decoration: line-through; color: var(--text-faint);
  background: var(--bg) !important; border-color: var(--border) !important;
  pointer-events: none;
}
.reason-row.pending-delete .del-row { display: none; }

/* undo countdown UI */
.undo-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-top: 4px; }
.undo-btn {
  font-family: 'Inter', sans-serif; font-size: 11px; color: var(--blue);
  background: var(--blue-light); border: 1px solid var(--blue-mid);
  border-radius: 4px; padding: 2px 7px; cursor: pointer; white-space: nowrap;
}
.countdown-ring { width: 18px; height: 18px; flex-shrink: 0; }
.countdown-ring circle { fill: none; stroke: var(--border); stroke-width: 2.5; }
.countdown-ring .progress {
  stroke: var(--coral); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.1s linear;
}

.reason-ta {
  flex: 1; width: 100%;
  font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.6;
  color: var(--text); border: 1px solid transparent; background: transparent;
  border-radius: var(--radius-sm); padding: 5px 8px;
  resize: none; outline: none; overflow: hidden; min-height: 32px;
  transition: background 0.15s, border-color 0.15s;
}
.reason-ta.why-ta::placeholder { color: var(--coral-mid); }
.reason-ta.why-ta:hover, .reason-ta.why-ta:focus { background: var(--coral-light); border-color: var(--coral-mid); }
.reason-ta.pro-ta::placeholder { color: var(--blue-mid); }
.reason-ta.pro-ta:hover, .reason-ta.pro-ta:focus { background: var(--blue-light); border-color: var(--blue-mid); }

.del-row {
  width: 22px; height: 22px; border: none; background: transparent; cursor: pointer;
  color: var(--text-faint); font-size: 13px; display: flex; align-items: center;
  justify-content: center; border-radius: 4px; flex-shrink: 0; margin-top: 4px;
}
.del-row:hover { color: var(--danger); background: var(--danger-bg); }

.add-row-btn {
  font-family: 'Inter', sans-serif; font-size: 11px; background: transparent;
  border: none; cursor: pointer; padding: 2px 6px; border-radius: 4px;
  transition: background 0.12s; display: inline-flex; align-items: center; gap: 4px;
}
.add-why-btn { color: var(--coral); }
.add-why-btn:hover { background: var(--coral-light); }
.add-pro-btn-sm { color: var(--blue); }
.add-pro-btn-sm:hover { background: var(--blue-light); }

.divider { height: 1px; background: var(--border); margin: 10px 0; }

.show-pros-btn {
  font-family: 'Inter', sans-serif; font-size: 11px; color: var(--blue);
  background: var(--blue-light); border: 1px solid var(--blue-mid); border-radius: 99px;
  padding: 3px 10px; cursor: pointer; align-self: flex-start;
  transition: background 0.15s; margin-top: 6px;
}
.show-pros-btn:hover { background: #d5e8f8; }

/* ── CARD FOOTER ── */
.card-footer {
  border-top: 1px solid var(--border); grid-column: 1 / -1;
  padding: 6px 16px; display: flex; justify-content: flex-end;
}
.del-card-btn {
  font-family: 'Inter', sans-serif; font-size: 11px; color: var(--text-faint);
  background: transparent; border: none; cursor: pointer; padding: 3px 8px;
  border-radius: 4px; transition: color 0.15s, background 0.15s;
}
.del-card-btn:hover { color: var(--danger); background: var(--danger-bg); }
