/* Floating lesson notes — scoped; does not alter global tutorial styles */

.notes-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid var(--border, #30363d);
  border-radius: 999px;
  background: var(--surface, #161b22);
  color: var(--text, #c9d1d9);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.notes-fab:hover {
  border-color: var(--accent, #58a6ff);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.notes-fab:focus-visible {
  outline: 2px solid var(--accent, #58a6ff);
  outline-offset: 2px;
}

.notes-fab.has-notes {
  border-color: var(--green, #3fb950);
}

.notes-fab-icon {
  font-size: 18px;
  line-height: 1;
}

.notes-fab-dot {
  color: var(--green, #3fb950);
  font-size: 20px;
  line-height: 1;
}

.notes-fab-label {
  font-size: 13px;
}

.notes-overlay {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.notes-overlay[hidden] {
  display: none;
}

.notes-modal {
  width: 100%;
  max-width: 560px;
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, #30363d);
  border-radius: 10px;
  background: var(--surface, #161b22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.notes-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, #30363d);
}

.notes-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #c9d1d9);
}

.notes-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border, #30363d);
  border-radius: var(--radius, 6px);
  background: var(--surface-2, #21262d);
  color: var(--text-muted, #8b949e);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.notes-modal-close:hover {
  color: var(--text, #c9d1d9);
  border-color: var(--accent, #58a6ff);
}

.notes-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.notes-textarea {
  width: 100%;
  min-height: 220px;
  flex: 1;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border, #30363d);
  border-radius: var(--radius, 6px);
  background: var(--bg, #0d1117);
  color: var(--text, #c9d1d9);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.55;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--accent, #58a6ff);
}

.notes-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted, #8b949e);
  cursor: pointer;
  user-select: none;
}

.notes-checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #58a6ff);
  cursor: pointer;
}

.notes-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
}

.notes-btn {
  padding: 10px 16px;
  border: 1px solid var(--border, #30363d);
  border-radius: var(--radius, 6px);
  background: var(--surface-2, #21262d);
  color: var(--text, #c9d1d9);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.notes-btn:hover {
  border-color: var(--accent, #58a6ff);
}

.notes-btn-primary {
  background: var(--accent, #58a6ff);
  border-color: var(--accent, #58a6ff);
  color: #0d1117;
}

.notes-btn-primary:hover {
  filter: brightness(1.05);
}

.notes-toast {
  position: fixed;
  right: 20px;
  bottom: 132px;
  z-index: 9002;
  padding: 10px 14px;
  border-radius: var(--radius, 6px);
  background: var(--surface-2, #21262d);
  border: 1px solid var(--green, #3fb950);
  color: var(--green, #3fb950);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.notes-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .notes-fab-label {
    display: none;
  }

  .notes-fab {
    padding: 14px;
    border-radius: 50%;
  }

  .notes-modal {
    max-height: 95vh;
  }
}
