/* Author Component Styles */

.blog-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.blog-author-avatar {
  position: relative;
  flex-shrink: 0;
}

.blog-author-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  transition: border-color 0.2s ease;
  background: linear-gradient(135deg, #5850ec 0%, #818cf8 100%);
}

/* Initials fallback for missing images */
.blog-author-avatar-initials {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5850ec 0%, #818cf8 100%);
  border: 2px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  transition: border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(88, 80, 236, 0.2);
}

.blog-author:hover .blog-author-avatar-initials {
  border-color: #5850ec;
}

.blog-author:hover .blog-author-avatar img {
  border-color: #5850ec;
}

/* Verified badge */
.blog-author-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: #5850ec;
  border-radius: 50%;
  border: 2px solid white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.blog-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.blog-author-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-author-linkedin {
  display: inline-flex;
  align-items: center;
  color: #0a66c2;
  transition: color 0.2s ease, transform 0.2s ease;
}

.blog-author-linkedin:hover {
  color: #004182;
  transform: scale(1.1);
}

.blog-author-linkedin svg {
  width: 16px;
  height: 16px;
}

.blog-author-credentials {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.blog-author-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #9ca3af;
}

.blog-author-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-author-meta-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.blog-author-meta-divider {
  width: 3px;
  height: 3px;
  background-color: #d1d5db;
  border-radius: 50%;
}

/* Alternative compact variant */
.blog-author.blog-author--compact {
  padding: 1rem 0;
  gap: 0.75rem;
}

.blog-author--compact .blog-author-avatar img {
  width: 44px;
  height: 44px;
}

.blog-author--compact .blog-author-avatar::after {
  width: 14px;
  height: 14px;
  background-size: 8px;
}

/* Featured variant with background */
.blog-author.blog-author--featured {
  background: linear-gradient(135deg, #f8f7ff 0%, #f0f4ff 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e0e4ff;
  margin-bottom: 2.5rem;
}

.blog-author--featured .blog-author-avatar img {
  border-color: #c7d2fe;
}

.blog-author--featured:hover .blog-author-avatar img {
  border-color: #5850ec;
}

/* Sources Dropdown */
.blog-author-sources-wrapper {
  position: relative;
}

.blog-author-sources-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.blog-author-sources-toggle:hover {
  background: rgba(88, 80, 236, 0.08);
  color: #5850ec;
}

.blog-author-sources-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.blog-author-sources-chevron {
  transition: transform 0.2s ease;
}

.blog-author-sources-wrapper.open .blog-author-sources-chevron {
  transform: rotate(180deg);
}

.blog-author-sources-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  opacity: 0;
  visibility: hidden;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  min-width: 320px;
  max-width: 400px;
  z-index: 100;
  transition: all 0.2s ease;
}

.blog-author-sources-wrapper.open .blog-author-sources-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.blog-author-sources-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 0.5rem;
}

.blog-author-sources-list::-webkit-scrollbar {
  width: 6px;
}

.blog-author-sources-list::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.blog-author-sources-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.blog-author-sources-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.blog-author-source-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  transition: all 0.15s ease;
}

.blog-author-source-item:hover {
  background: #f3f4f6;
  color: #5850ec;
}

.blog-author-source-number {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #5850ec 0%, #818cf8 100%);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-author-source-text {
  flex: 1;
  font-size: 0.8125rem;
  line-height: 1.4;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-author-source-external {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  fill: #9ca3af;
  margin-top: 2px;
  transition: fill 0.15s ease;
}

.blog-author-source-item:hover .blog-author-source-external {
  fill: #5850ec;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .blog-author {
    gap: 0.75rem;
    padding: 1.25rem 0;
  }
  
  .blog-author-avatar img {
    width: 48px;
    height: 48px;
  }
  
  .blog-author-avatar::after {
    width: 16px;
    height: 16px;
    background-size: 9px;
  }
  
  .blog-author-name {
    font-size: 0.9375rem;
  }
  
  .blog-author-credentials {
    font-size: 0.8125rem;
  }
  
  .blog-author-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .blog-author-sources-dropdown {
    min-width: 280px;
    max-width: calc(100vw - 2rem);
    left: 0;
    transform: translateX(0) scale(0.95);
  }
  
  .blog-author-sources-wrapper.open .blog-author-sources-dropdown {
    transform: translateX(0) scale(1);
  }
}

