/* ── Highlights widget ────────────────────────────────────────────────────── */

.widget-highlights {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.widget-highlights > .-title-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.widget-highlights > .-title-bar > .-label {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.widget-highlights .-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 24px;
  min-height: 0;
}

.widget-highlights .-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 32px 20px;
  text-align: center;
}

.widget-highlights .-empty > .-label {
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--slate-600);
  margin: 0;
}

.widget-highlights .-empty > .-sub {
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  color: var(--fg-3);
  margin: 0;
}

.widget-highlights .-group {
  padding: 10px 18px 4px;
}

.widget-highlights .-group + .-group {
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
  padding-top: 14px;
}

.widget-highlights .-group > .-label {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--fg-3);
  margin-bottom: 8px;
}

.widget-highlights .-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget-highlights .-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 6px;
  margin: 0 -6px;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
}

.widget-highlights .-item:hover {
  background: var(--slate-50);
}

.widget-highlights .-item:hover > .-delete { opacity: 1; }

.widget-highlights .-item > .-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--hl-bg);
}

.widget-highlights .-item > .-text {
  font-family: var(--font-serif);
  font-size: var(--fs-14);
  line-height: var(--lh-snug);
  color: var(--ink);
  flex: 1;
}

.widget-highlights .-item > .-insert,
.widget-highlights .-item > .-delete {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.widget-highlights .-item:hover > .-insert,
.widget-highlights .-item.-attached > .-insert { opacity: 1; }

.widget-highlights .-item.-attached > .-insert {
  color: var(--slate-500);
}

.widget-highlights .-item > .-insert:hover {
  color: var(--fg-1);
  background: var(--slate-100);
}

.widget-highlights .-item > .-delete:hover {
  color: var(--danger);
  background: rgba(194, 85, 61, 0.08);
}
