/**
 * Contributor System Styles
 * Styling for the contributor system components
 */

/* Post Contributors Section */
.post-contributors {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

/* Contributor info after title (simplified) */
.contributor-info-after-title {
  margin: 1rem 0 2rem 0;
  padding: 0;
  background: transparent;
  border: none;
}

.contributor-info-after-title .post-contributors {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* Simple Layout (default) */
.simple-layout .contributors-simple {
  font-size: 0.95rem;
  color: #666;
  margin: 0.5rem 0;
}

.simple-layout .contributor-role-line {
  display: inline-block;
  margin-right: 1rem;
}

.simple-layout .contributor-role-line:last-child {
  margin-right: 0;
}

.simple-layout .contributor-role-line a {
  color: #0d6efd;
  text-decoration: none;
}

.simple-layout .contributor-role-line a:hover {
  text-decoration: underline;
}

/* Compact Layout for Poetry and Prose */
.compact-layout .contributors-inline {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.compact-layout .contributors-inline strong {
  color: #2c3e50;
  font-weight: 600;
}

.compact-layout .contributor-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.compact-layout .contributor-link:hover {
  text-decoration: underline;
  color: #0a58ca;
}

/* Enhanced Layout for Books */
.enhanced-layout .contributors-enhanced {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.enhanced-layout .contributor-role-section {
  margin-bottom: 1rem;
}

.enhanced-layout .role-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
}

.enhanced-layout .contributor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.enhanced-layout .contributor-mini-card {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  transition: box-shadow 0.2s ease;
}

.enhanced-layout .contributor-mini-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.enhanced-layout .contributor-name {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.enhanced-layout .contributor-name a {
  color: #2c3e50;
  text-decoration: none;
}

.enhanced-layout .contributor-name a:hover {
  color: #0d6efd;
}

.enhanced-layout .contributor-mini-bio {
  margin: 0;
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
}

.contributors-by-role {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contributor-role-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.6;
}

.role-label {
  font-weight: 600;
  color: #2c3e50;
  min-width: 80px;
  flex-shrink: 0;
}

.contributor-names {
  flex: 1;
}

.contributor-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.contributor-link:hover {
  text-decoration: underline;
  color: #0a58ca;
}

/* Legacy styles for other components */
.contributors-title {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
}

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.contributor-item {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.contributor-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.contributor-name a {
  color: #0d6efd;
  text-decoration: none;
}

.contributor-name a:hover {
  text-decoration: underline;
}

.contributor-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.role {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.role-tac-gia {
  background: #e3f2fd;
  color: #1565c0;
}

.role-dich-gia {
  background: #f3e5f5;
  color: #7b1fa2;
}

.role-soan-gia {
  background: #e8f5e8;
  color: #2e7d32;
}

.contributor-description {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

/* Inline Contributors (for meta display) */
.inline-contributors {
  margin: 1rem 0;
  font-size: 0.95rem;
}

.contributor-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.contributor-link:hover {
  text-decoration: underline;
}

.contributor-roles {
  color: #6c757d;
  font-style: italic;
}

/* Contributor Cards */
.contributor-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}

.contributor-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contributor-card-header {
  margin-bottom: 1rem;
}

.contributor-card-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
}

.contributor-card-name a {
  color: #2c3e50;
  text-decoration: none;
}

.contributor-card-name a:hover {
  color: #0d6efd;
}

.contributor-card-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contributor-card-description {
  margin-bottom: 1rem;
  color: #6c757d;
  line-height: 1.6;
}

.contributor-card-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 80px;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d6efd;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contributor-card-actions {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
}

.view-works-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.view-works-link:hover {
  text-decoration: underline;
}

/* Contributor Archive Page */
.contributor-archive {
  max-width: 1200px;
  margin: 0 auto;
}

.contributor-header {
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  border: 2px solid #ccc;
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
}

.contributor-intro {
  max-width: 800px;
  margin: 0 auto;
}

.contributor-name {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  font-weight: 300;
}

.contributor-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.contributor-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contributor-stats .stat-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  min-width: 120px;
}

.contributor-stats .stat-number {
  color: #000;
  font-size: 2rem;
}

.contributor-stats .stat-label {
  /* color: rgba(255,255,255,0.8); */
  font-size: 0.9rem;
}

/* Works Sections */
.contributor-works-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.section-title {
  font-size: 1.8rem;
  margin: 0;
  color: #2c3e50;
}

.section-count {
  background: #6c757d;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.work-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.work-title {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
}

.work-title a {
  color: #2c3e50;
  text-decoration: none;
}

.work-title a:hover {
  color: #0d6efd;
}

.work-excerpt {
  color: #6c757d;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.work-meta {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
  font-size: 0.9rem;
}

.work-type {
  background: #e9ecef;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.work-date {
  color: #6c757d;
}

.work-other-contributors {
  margin-top: 0.5rem;
  color: #6c757d;
}

/* No Works Message */
.no-works-message {
  text-align: center;
  padding: 3rem 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 2rem 0;
}

.no-works-message h2 {
  color: #6c757d;
  margin-bottom: 1rem;
}

.no-works-message p {
  color: #6c757d;
  margin-bottom: 2rem;
}

.back-to-library {
  display: inline-block;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 2px solid var(--global-palette-highlight);
  border-radius: 25px;
  transition: all 0.2s ease;
}

.back-to-library:hover {
  background: var(--global-palette-highlight);
  color: white;
}

/* Navigation */
.contributor-navigation {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.other-contributors h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
}

.other-contributors ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.other-contributors li {
  margin-bottom: 0.5rem;
}

.other-contributors a {
  color: #0d6efd;
  text-decoration: none;
}

.other-contributors a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contributor-header {
    padding: 2rem 1rem;
  }

  .contributor-name {
    font-size: 2rem;
  }

  .contributor-stats {
    gap: 1rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .contributors-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .contributor-navigation {
    flex-direction: column;
  }

  .contributor-role-group {
    flex-direction: column;
    gap: 0.25rem;
  }

  .role-label {
    min-width: auto;
  }

  .enhanced-layout .contributor-cards {
    grid-template-columns: 1fr;
  }

  .compact-layout .contributors-inline {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .contributor-stats {
    flex-direction: column;
    align-items: center;
  }

  .contributor-stats .stat-item {
    min-width: 150px;
  }
}
