/* Notes: the single control row above the documents (course tabs, filter,
   quiet upload strip) and course headings. Overrides notes-grid.css. */

/* ---------- Notes: one control row above the documents ---------- */
.docs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin: var(--sp-1) 0 var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
/* The search box and the upload strip share one centre line and wrap
   under each other in a narrow column instead of widening the page
   (issue #16 F-73). */
.docs-bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; max-width: 100%; }
.docs-bar-right .dropzone { margin: 0; padding: var(--sp-1) var(--sp-3); max-width: 100%; }
.docs-bar-right .doc-filter { flex: 1 1 160px; max-width: 200px; min-width: 0; }

.course-tabs { display: flex; gap: var(--sp-0); flex-wrap: wrap; }
.course-tab {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  /* A long course label (a code with no short name) wraps inside its tab
     instead of widening the page (issue #16 F-02, review fix R1). */
  max-width: 100%;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.course-tab:hover { color: var(--text); }
.course-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
/* Full tab colour: at opacity .65 the 11px count fell to 2.7:1 (review R4). */
.course-tab-n { font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }

/* The course filter above a list (Homework, Review, Question Bank, Study
   Guide): the same underline tabs, 16px clear of what sits above and below
   (issue #16 F-66, F-78). */
.course-filter { margin-bottom: var(--sp-4); }
* + .course-filter { margin-top: var(--sp-4); }
.course-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
}
.course-filter-row > .course-filter { margin: 0; }

.doc-filter { width: 200px; }

/* Upload is a quiet strip, not a dashed banner across the page. */
.dropzone {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  cursor: pointer;
  white-space: nowrap;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); color: var(--accent); }
.dropzone.busy { opacity: 0.7; }

.course-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin: var(--sp-4) 0 var(--sp-2);
}
.course-head-n { font-size: var(--fs-2xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }

.ask-scope {
  margin-left: var(--sp-2);
  font-weight: 400;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
