/* Image and Media Components */

/* Book Covers */
.book-cover {
  width: var(--cover-width-md);
  height: var(--cover-height-md);
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
}

/* Only apply hover effects to linked covers */
a .book-cover:hover,
a .book-cover-placeholder:hover {
  transform: scale(1.02);
}

/* Remove hover effects from non-linked covers */
div .book-cover:hover,
div .book-cover-placeholder:hover {
  transform: none;
}

/* Book Cover Placeholders */
.book-cover-placeholder {
  width: var(--cover-width-md);
  height: var(--cover-height-md);
  background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-hover));
  border: var(--border-width-sm) dashed var(--color-border-primary);
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: var(--font-size-xs);
  text-align: center;
  gap: var(--space-xs);
}

/* Author and series portraits in the sidebar cards */
.author-image-container,
.series-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.author-portrait,
.series-portrait {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
  width: 120px;
  height: 120px;
}

.author-photo,
.series-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Header covers */
.title-cover-container,
.series-cover-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.title-cover-image {
  max-width: 200px;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal);
}

.series-cover-image {
  width: var(--cover-width-md);
  height: var(--cover-height-md);
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
}

/* No Cover Icons and Text */
.no-cover-icon {
  font-size: var(--font-size-2xl);
  opacity: 0.5;
}

.no-cover-text {
  font-size: var(--font-size-xs);
}

.no-cover-large-icon {
  font-size: var(--font-size-5xl);
  opacity: 0.3;
}

.no-cover-large-text {
  font-size: var(--font-size-base);
  opacity: 0.5;
}

/* Mobile Responsive Images */
@media (max-width: 768px) {
  .series-cover-image {
    width: var(--cover-width-sm);
    height: var(--cover-height-sm);
  }

  .author-portrait,
  .series-portrait {
    width: 100px;
    height: 100px;
  }
}