/* CourseOS · Notes System
   Full-screen overlay with symbol palette and auto-saving editor.
   Designed for ADHD/Autism: minimal chrome, clear focus, no distractions. */

.notes-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 11000;
  display: none;
  flex-direction: column;
  max-width: var(--max-width);
  margin: 0 auto;
}

.notes-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header */
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.notes-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
}

.notes-course-tag {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
}

.notes-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
}

.notes-save-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-safe);
}

/* New note button */
.notes-new-btn {
  margin: 12px 16px;
  padding: 12px;
  background: var(--color-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.notes-new-btn:active {
  opacity: 0.8;
}

/* Empty state */
.notes-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Notes list */
.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
}

.notes-list-item {
  padding: 12px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.1s;
}

.notes-list-item:active {
  background: var(--gray-100);
}

.notes-list-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notes-list-preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-list-meta {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 6px;
}

/* Symbol palette */
.notes-symbol-palette {
  flex-shrink: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--bg-secondary, var(--gray-50, #F8F8F8));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.notes-symbol-group {
  margin-bottom: 6px;
}

.notes-symbol-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.notes-symbol-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.notes-symbol-btn {
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 16px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.notes-symbol-btn:active {
  background: var(--color-red);
  color: #fff;
  border-color: var(--color-red);
}

/* Editor textarea */
.notes-editor {
  flex: 1;
  width: 100%;
  padding: 16px;
  border: none;
  outline: none;
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  resize: none;
  -webkit-overflow-scrolling: touch;
}

.notes-editor::placeholder {
  color: var(--gray-300);
}

/* Bottom bar */
.notes-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.notes-delete-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--color-red);
  cursor: pointer;
  padding: 4px 8px;
}

.notes-char-count {
  font-size: 11px;
  color: var(--text-muted);
}
