/**
 * Study Notes Panel Styles
 * Personal annotations and bookmarks UI
 */

.study-notes-panel {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: linear-gradient(135deg, var(--bg-card), rgba(13, 13, 21, 0.98));
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.study-notes-panel.visible {
  right: 0;
}

/* Panel Header */
.study-notes-panel .panel-header {
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.study-notes-panel .panel-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Panel Content */
.study-notes-panel .panel-content {
  padding: 1.5rem;
}

/* Notes List */
.notes-list {
  margin-bottom: 2rem;
}

.note-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.note-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(-4px);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.note-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.note-actions {
  display: flex;
  gap: 0.5rem;
}

.edit-note-btn,
.delete-note-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.edit-note-btn:hover {
  background: rgba(212, 175, 55, 0.2);
}

.delete-note-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.note-content {
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.note-tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.note-tags-display .tag {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-style: italic;
}

/* Add Note Form */
.add-note-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

.add-note-form textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.add-note-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(0, 0, 0, 0.3);
}

.note-tags {
  margin: 1rem 0;
}

.note-tags input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.note-tags input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(0, 0, 0, 0.3);
}

.btn-primary {
  width: 100%;
  background: var(--accent-color);
  border: none;
  color: var(--bg-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Bookmark Button */
.bookmark-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent-color);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  z-index: 999;
}

.bookmark-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.bookmark-btn.bookmarked {
  background: #10b981;
}

/* Highlight Colors */
.highlight {
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.highlight:hover {
  opacity: 0.8;
}

.highlight.yellow {
  background: rgba(250, 204, 21, 0.3);
  border-bottom: 2px solid rgba(250, 204, 21, 0.6);
}

.highlight.green {
  background: rgba(34, 197, 94, 0.3);
  border-bottom: 2px solid rgba(34, 197, 94, 0.6);
}

.highlight.blue {
  background: rgba(59, 130, 246, 0.3);
  border-bottom: 2px solid rgba(59, 130, 246, 0.6);
}

.highlight.pink {
  background: rgba(236, 72, 153, 0.3);
  border-bottom: 2px solid rgba(236, 72, 153, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
  .study-notes-panel {
    width: 100%;
    right: -100%;
  }

  .study-notes-panel.visible {
    right: 0;
  }

  .bookmark-btn {
    bottom: 1rem;
    right: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .study-notes-panel,
  .note-card,
  .btn-primary {
    transition: none;
  }
}

/* Focus States */
.add-note-form textarea:focus-visible,
.note-tags input:focus-visible,
.btn-primary:focus-visible,
.bookmark-btn:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}
