/* ---------- Literature review board (4 columns) ---------- */

:root {
  --lit-journal: #5a7fb5;
  --lit-conference: #c99a3e;
  --lit-book: #4f9e82;
  --lit-thesis: #9463ad;
  --lit-report: #4796a3;
  --lit-website: #c06a52;
  --lit-other: #8a8a8a;
}

.literature-scroll {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.lit-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  padding: 10px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--hairline);
}

.lit-toolbar-btn {
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lit-toolbar-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.lit-toolbar-hint {
  font-size: 11px;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lit-toolbar-hint.is-visible {
  opacity: 1;
}

.lit-board {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(160px, 220px) minmax(260px, 1.3fr) minmax(260px, 1.3fr);
  min-width: 900px;
}

.lit-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--hairline);
}

.lit-col:last-child {
  border-right: none;
}

.lit-col-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lit-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px 20px;
}

/* ---------- Topic / subtopic list items (shared) ---------- */

.lit-item {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  padding: 2px 4px 2px 10px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lit-item:hover {
  background: rgba(17, 17, 17, 0.045);
}

.lit-item.is-selected {
  background: rgba(17, 17, 17, 0.08);
}

.lit-item-text {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 2px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink);
  outline: none;
  overflow-wrap: break-word;
}

.lit-item.is-selected .lit-item-text {
  font-weight: 500;
}

.lit-item-remove {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lit-item:hover .lit-item-remove {
  opacity: 1;
}

.lit-item-remove:hover {
  background: rgba(17, 17, 17, 0.08);
  color: var(--ink);
}

.lit-add-row {
  margin-top: 6px;
}

.lit-add-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px dashed var(--hairline);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lit-add-btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.lit-add-input {
  width: 100%;
  border: 1px solid var(--ink-soft);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}

.lit-empty-hint {
  padding: 10px 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Reference type legend ---------- */

.lit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: flex-end;
}

.lit-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-soft);
}

.lit-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* ---------- contenteditable placeholders (shared by refs + notes columns) ---------- */

.lit-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-soft);
  opacity: 0.65;
}

/*
 * Reference cards (column 3) and the notes editor (column 4) are styled
 * in styles/literature-refs.css, loaded right after this file.
 */

@media (max-width: 720px) {
  .lit-board {
    min-width: 720px;
  }
}
