/* Notes Styles */

/* Notes List */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Note Card */
.note-card {
  background-color: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease-in-out;
}

.note-card:hover {
  box-shadow: var(--shadow-md);
}

.note-card-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.note-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.note-title-link {
  text-decoration: none;
  color: inherit;
}

.note-title-link:hover .note-title {
  color: var(--color-primary);
}

.note-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.note-badges {
  display: flex;
  gap: var(--spacing-xs);
  flex-shrink: 0;
}

.note-author {
  margin: var(--spacing-xs) 0 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.note-card-body {
  padding: var(--spacing-md);
}

.note-preview {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 0.9375rem;
}

.note-card-footer {
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.note-date i {
  margin-right: 0.25rem;
}

/* Note Show View */
.note-show-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.note-header {
  margin-bottom: var(--spacing-lg);
}

.note-name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.note-header-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.note-meta {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--spacing-sm);
  align-items: center;
}

.note-author-badge,
.note-date-badge {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.note-author-badge i,
.note-date-badge i {
  margin-right: 0.25rem;
}

/* Note Content Container */
.note-content-container {
  background-color: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
}

.note-content {
  padding: var(--spacing-lg);
  line-height: 1.7;
  font-size: 1rem;
  color: var(--color-text);
}

.note-content h1,
.note-content h2,
.note-content h3,
.note-content h4,
.note-content h5,
.note-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--color-text);
}

.note-content h1:first-child,
.note-content h2:first-child,
.note-content h3:first-child {
  margin-top: 0;
}

.note-content p {
  margin-bottom: 1em;
}

.note-content ul,
.note-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.note-content li {
  margin-bottom: 0.5em;
}

.note-empty-content {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-muted);
}

.note-empty-content i {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.note-empty-content p {
  margin: var(--spacing-sm) 0;
}

/* Note Generation History */
.note-generation-history {
  background-color: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.note-generation-history h3 {
  margin: 0 0 var(--spacing-md) 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.generation-requests-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.generation-request-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background-color: var(--color-background);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.gr-purpose {
  font-weight: 500;
  color: var(--color-text);
}

.gr-date,
.gr-time {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.gr-time {
  margin-left: auto;
}

/* Note Actions */
.note-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
}

/* Badge Variants for Source */
.badge-source.badge-ai {
  background-color: var(--color-info);
  color: var(--color-white);
}

.badge-source.badge-user {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.badge-source.badge-collaborative {
  background-color: var(--color-purple, #6f42c1);
  color: var(--color-white);
}

/* Note Status Badges */
.badge-status.badge-draft {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.badge-status.badge-developing {
  background-color: var(--color-warning);
  color: var(--color-text);
}

.badge-status.badge-ready {
  background-color: var(--color-success);
  color: var(--color-white);
}

.badge-status.badge-converted {
  background-color: var(--color-info);
  color: var(--color-white);
}

.badge-status.badge-archived {
  background-color: var(--color-text-muted);
  color: var(--color-white);
}

/* Note Form */
.note-form {
  max-width: 100%;
}

.note-form .form-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

/* Responsive */
@media (max-width: 768px) {
  .note-show-container {
    padding: 0.75rem;
  }

  .note-title-row {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .note-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .note-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .note-actions {
    flex-direction: column;
  }

  .note-actions .btn {
    width: 100%;
  }
}
