/* app-components.css — Extracted from app.js runtime CSS injection (M3 fix) */

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8);
}

.video-toolbar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--surface-1);
}

.btn-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.bookmarks-section {
  padding: var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.bookmarks-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.bookmarks-header h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--primary);
  color: white;
  border-radius: 10px;
}

.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 200px;
  overflow-y: auto;
}

.bookmark-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.bookmark-item:hover {
  background: var(--surface-3);
}

.bookmark-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--primary);
  min-width: 50px;
}

.bookmark-note {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-delete {
  padding: 2px 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.bookmark-delete:hover {
  color: var(--error);
  background: var(--error-surface);
}

.export-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.study-notes-preview {
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.study-notes-header h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-1) 0;
}

.study-notes-header p {
  margin: 0 0 var(--space-2) 0;
}

.study-notes-content {
  max-height: 200px;
  overflow-y: auto;
}

.study-notes-markdown {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  margin: 0;
  padding: var(--space-2);
  background: var(--surface-1);
  border-radius: var(--radius-sm);
}

/* Bookmark type selector */
.bookmark-type-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.bookmark-type-selector {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-width: 280px;
  animation: scaleIn 0.2s ease;
}

.bookmark-type-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-3) 0;
  color: var(--foreground);
}

.bookmark-type-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.bookmark-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.bookmark-type-option:hover {
  border-color: var(--primary);
  background: var(--glow-primary);
}

.bookmark-type-option--yellow:hover { border-color: #eab308; }
.bookmark-type-option--blue:hover { border-color: #3b82f6; }
.bookmark-type-option--green:hover { border-color: #22c55e; }
.bookmark-type-option--orange:hover { border-color: #f97316; }

.bookmark-type-option-icon {
  font-size: 24px;
}

.bookmark-type-option-label {
  font-size: var(--text-xs);
  font-weight: 500;
}

.bookmark-type-option-key {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.bookmark-type-hint {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  text-align: center;
}

/* Bookmark modal */
.bookmark-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.bookmark-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-width: 320px;
  max-width: 90vw;
  animation: scaleIn 0.2s ease;
}

.bookmark-modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.bookmark-icon {
  font-size: 24px;
}

.bookmark-icon--yellow { color: #eab308; }
.bookmark-icon--blue { color: #3b82f6; }
.bookmark-icon--green { color: #22c55e; }
.bookmark-icon--orange { color: #f97316; }

.bookmark-item-icon {
  font-size: 14px;
}

.bookmark-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bookmark-modal-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
}

.bookmark-modal-timestamp {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.bookmark-modal-note-group {
  margin-bottom: var(--space-4);
}

.bookmark-modal-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.bookmark-modal-textarea {
  width: 100%;
  resize: vertical;
}

.bookmark-modal-buttons {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}
