/* Notes panel: highlights, exports and spaced review (see highlights-ui.js). */
.round-btn { position: relative; }
.notes-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
}
.notes-badge[hidden] { display: none; }
.hl-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.hl-tab { flex: 1; }
.hl-tab[aria-selected="true"] { background: var(--control-hover); font-weight: 600; }
.hl-add, .hl-export { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hl-item { padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid #e8c547; border-radius: 10px; }
.hl-item.hl-green { border-left-color: #4caf7d; }
.hl-item.hl-blue { border-left-color: var(--accent-2); }
.hl-item.hl-pink { border-left-color: #e86fa7; }
.hl-quote { margin: 0 0 8px; font-family: var(--reader-font, serif); line-height: 1.5; overflow-wrap: anywhere; }
.hl-status { margin: 0 0 8px; font-size: 0.82rem; color: var(--muted); }
.hl-note-label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 2px; }
.hl-note { width: 100%; box-sizing: border-box; resize: vertical; }
.hl-actions { display: flex; gap: 8px; margin-top: 8px; }
.hl-del { margin-left: auto; }
.rv-count { font-size: 1.1rem; margin: 4px 0 8px; }
.rv-source { text-align: center; }
.rv-sitting .panel { position: static; transform: none; width: auto; max-width: none; box-shadow: none; }
@media (max-width: 640px) {
  .hl-add button, .hl-export button, .hl-export select { flex: 1 1 auto; }
}
.hl-export select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--control); color: var(--text); font: inherit; }

/* Annotating a section after its quiz */
.panel-annotate { width: 100%; max-width: none; }
.annot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.annot-count { color: var(--muted); font-size: 0.85rem; }
.annot-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 4px; }
.annot-colors { display: flex; gap: 8px; }
.annot-swatch { width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; border-radius: 50%; border: 2px solid var(--border); background: #e8c547; }
.annot-swatch.hl-green { background: #4caf7d; }
.annot-swatch.hl-blue { background: var(--accent-2); }
.annot-swatch.hl-pink { background: #e86fa7; }
.annot-swatch[aria-checked="true"] { border-color: var(--text); box-shadow: none; outline: 2px solid var(--text); outline-offset: 2px; }
.annot-colors-small .annot-swatch { width: 22px; height: 22px; min-width: 22px; min-height: 22px; }
.annot-status { margin: 4px 0 10px; }
.annot-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.annot-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--reader-font, serif); font-size: 1.05rem; line-height: 1.7; user-select: text; }
.stage.overlay-wide .annot-text { max-height: 52vh; overflow-y: auto; } /* the text scrolls in its box so Done stays in view */
.annot-mark { color: inherit; background: #e8c54766; border-radius: 3px; cursor: pointer; }
.annot-mark.hl-green { background: #4caf7d66; }
.annot-mark.hl-blue { background: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.annot-mark.hl-pink { background: #e86fa766; }
.annot-mark-open { outline: 2px solid var(--accent); outline-offset: 1px; }
.annot-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.annot-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.annot-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.annot-item { padding: 10px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; }
.annot-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.annot-remove { min-width: 32px; min-height: 32px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.annot-note { overflow: hidden; resize: none; }
.annot-foot { position: sticky; bottom: 0; padding-top: 10px; background: var(--card, var(--bg)); }
@media (max-width: 720px) {
  .annot-cols { grid-template-columns: 1fr; }
}

/* ---------- Notes: underline tabs, cards, empty state ---------- */
.hl-tabs { gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.hl-tab { flex: 0 0 auto; min-height: 44px; padding: 8px 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font: inherit; }
.hl-tab:hover { background: var(--control); color: var(--text); }
.hl-tab[aria-selected="true"] { background: transparent; color: var(--text); border-bottom-color: var(--accent-2); font-weight: 600; }
.hl-empty { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px dashed var(--border); border-radius: 10px; }
.hl-empty span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.rv-count { margin: 0 0 6px; font-size: 1.1rem; }
.rv-count .stat-num { font-size: 2.2rem; line-height: 1; margin-right: 6px; }
.hl-tags { margin-top: 6px; }
.hl-tag-input { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--control); color: inherit; font: inherit; font-size: 0.9rem; }
