/* ═══════════════════════════════════════════════ */
/*  PRE-PLANNING TAB                               */
/* ═══════════════════════════════════════════════ */

/* ─── Section headers ─── */
.pp-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* Center card titles in pre-planning tab (same pattern as plan tab) */
#panel-preplanning .card-header {
  position: relative;
}

#panel-preplanning .card-header .card-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ─── Research summary cards ─── */
.pp-research-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.pp-research-card:last-child {
  border-bottom: none;
}

.pp-research-card:hover {
  background: transparent;
}

.pp-research-card-body {
  flex: 1;
  min-width: 0;
}

.pp-research-topic {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: var(--transition);
}

.pp-research-card:hover .pp-research-topic {
  text-decoration: underline;
}

.pp-research-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 2px;
}

.pp-research-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ─── Impact analysis ─── */
.pp-impact-section {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pp-impact-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pp-impact-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.pp-impact-text ul,
.pp-impact-text ol {
  margin: 4px 0;
  padding-left: 20px;
}

.pp-impact-text p {
  margin: 4px 0;
}

.pp-impact-text code {
  background: rgba(0, 0, 0, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.82rem;
}

.pp-impact-text table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  font-size: 0.82rem;
}

.pp-impact-text th,
.pp-impact-text td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}

.pp-impact-text th {
  background: var(--bg-input);
  font-weight: 600;
}

.pp-impact-text tr:hover {
  background: var(--bg-hover);
}

.pp-impact-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 0;
}

/* ─── Discussions ─── */
.pp-discussion-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--bg-input);
  transition: var(--transition);
}

.pp-discussion-item.pp-resolved {
  opacity: 0.55;
}

.pp-discussion-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.pp-discussion-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.4;
  min-width: 0;
}

.pp-discussion-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ─── Gate actions ─── */
.pp-gate-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pp-gate-actions textarea {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 50px;
  width: 100%;
  transition: var(--transition);
}

.pp-gate-actions textarea:focus {
  border-color: var(--border-active);
}

/* ─── Inline comment trigger ─── */
.pp-comment-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.72rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.pp-comment-btn:hover {
  border-color: var(--border-active);
  color: var(--accent);
}

/* ─── Inline comment form ─── */
.pp-inline-comment-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pp-inline-comment-form input {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  flex: 1;
  transition: var(--transition);
}

.pp-inline-comment-form input:focus {
  border-color: var(--border-active);
}
