/* Library Page Component - Specific Styles Only */

.library-page__intro {
  margin-bottom: var(--size-7);
  font-size: var(--font-size-2);
  color: var(--text-2);
}

.library-page__about {
  margin-top: var(--size-8);
  padding-top: var(--size-6);
  border-top: 1px solid var(--surface-3);
}

.library-page__about h2 {
  color: var(--text-1);
  margin-bottom: var(--size-4);
}

.library-page__about p {
  margin-bottom: var(--size-4);
}

.library-page__empty {
  text-align: center;
  padding: var(--size-8) var(--size-4);
  color: var(--text-2);
}

.library__welcome {
  max-width: var(--size-page);
  margin-inline: auto;
  text-align: left;
}


/* Holding Card Component */
.holding-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.holding-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border-radius: var(--radius-2);
  overflow: hidden;
  transition: all 0.2s ease;
  max-width: 300px;
  width: 100%;
}

.holding-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}

.holding-card__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.holding-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.holding-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  border: 1px solid var(--surface-3);
}

.holding-card__content {
  padding: var(--size-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.holding-card__title {
  margin: 0 0 var(--size-2) 0;
  font-size: var(--font-size-2);
  font-weight: var(--font-weight-6);
  line-height: var(--font-lineheight-2);
}

.holding-card__link {
  color: var(--text-1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--size-1);
}

.holding-card__link:hover {
  color: var(--link-color);
  text-decoration: none;
}

.holding-card__meta {
  margin: var(--size-2) 0;
}

.holding-card__excerpt {
  margin: var(--size-2) 0 0 0;
  color: var(--text-2);
  font-size: var(--font-size-1);
  line-height: var(--font-lineheight-3);
  flex: 1;
}

/* Library Book Page Component */
.library-book {
  max-width: 1000px;
  margin: 0 auto;
}

.library-book__hero {
  margin-bottom: var(--size-8);
  padding: var(--size-6) 0;
}

.library-book__hero-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--size-8);
  align-items: start;
}

.library-book__cover {
  text-align: center;
}

.library-book__cover-image {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.library-book__cover-placeholder {
  width: 300px;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--violet-7), var(--violet-5));
  border-radius: var(--radius-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-size-2);
  font-weight: var(--font-weight-6);
  text-align: center;
  padding: var(--size-4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.library-book__details {
  text-align: left;
}

.library-book__title {
  font-size: var(--font-size-fluid-2);
  margin-bottom: var(--size-3);
  color: var(--text-1);
  font-weight: var(--font-weight-7);
  line-height: var(--font-lineheight-1);
}

.library-book__subtitle {
  font-size: var(--font-size-2);
  color: var(--text-2);
  font-style: italic;
  margin-bottom: var(--size-5);
  line-height: var(--font-lineheight-3);
}

.library-book__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-4);
  font-size: var(--font-size-0);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-weight: var(--font-weight-5);
}

.library-book__genre,
.library-book__pages,
.library-book__date {
  padding: var(--size-1) var(--size-3);
  background: var(--surface-2);
  border-radius: var(--radius-round);  /* Full rounded corners for MD3 tags */
  border: none;  /* MD3 tags typically don't have borders */
  color: var(--text-2);
  font-size: var(--font-size-0);
  font-weight: var(--font-weight-5);
}

.library-book__summary {
  margin-bottom: var(--size-8);
  padding: var(--size-6);
  background: var(--surface-2);
  border-radius: var(--radius-3);
  border: 1px solid var(--surface-3);
}

.library-book__summary h2 {
  margin-top: 0;
  margin-bottom: var(--size-4);
  font-size: var(--font-size-3);
}

.library-book__summary-text {
  font-size: var(--font-size-2);
  line-height: var(--font-lineheight-4);
  color: var(--text-1);
}

.library-book__content {
  margin-bottom: var(--size-8);
  font-size: var(--font-size-2);
  line-height: var(--font-lineheight-4);
}

.library-book__toc {
  margin-bottom: var(--size-8);
}

.library-book__toc h2 {
  margin-bottom: var(--size-5);
  font-size: var(--font-size-3);
}

.library-book__chapter-list {
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;

}

.library-book__chapter-item {
  margin-bottom: var(--size-3);
  width: 100%;
  max-width: 100%;
}

.library-book__chapter-link {
  display: flex;
  align-items: center;
  gap: var(--size-4);
  padding: var(--size-4);
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-2);
  text-decoration: none;
  color: var(--text-1);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.library-book__chapter-link:hover {
  background: var(--surface-3);
  border-color: var(--surface-4);
  text-decoration: none;
  color: var(--text-1);
}

.library-book__chapter-number {
  font-size: var(--font-size-0);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-weight: var(--font-weight-5);
  min-width: 80px;
}

.library-book__chapter-title {
  font-size: var(--font-size-1);
  color: var(--text-1);
  font-weight: var(--font-weight-5);
}

.library-book__no-chapters {
  color: var(--text-2);
  font-style: italic;
  text-align: center;
  padding: var(--size-6);
}

.library-book__navigation {
  text-align: center;
  padding-top: var(--size-6);
  border-top: 1px solid var(--surface-3);
}

.library-book__back-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: var(--font-weight-5);
}

.library-book__back-link:hover {
  text-decoration: underline;
}

/* Library Chapter Component */
.library-chapter {
  max-width: var(--size-page);
  margin: 0 auto;
}

.library-chapter__breadcrumb {
  margin-bottom: var(--size-6);
  font-size: var(--font-size-1);
  color: var(--text-2);
  text-align: center;
}

.library-chapter__breadcrumb-link {
  color: var(--link-color);
  text-decoration: none;
}

.library-chapter__breadcrumb-link:hover {
  text-decoration: underline;
}

.library-chapter__breadcrumb-separator {
  margin: 0 var(--size-2);
}

.library-chapter__breadcrumb-current {
  color: var(--text-1);
  font-weight: var(--font-weight-5);
}

.library-chapter__header {
  margin-bottom: var(--size-7);
  text-align: center;
}

.library-chapter__number {
  font-size: var(--font-size-0);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: var(--font-weight-5);
  margin-bottom: var(--size-2);
}

.library-chapter__title {
  font-size: var(--font-size-fluid-2);
  margin: 0;
  color: var(--text-1);
  font-weight: var(--font-weight-7);
  line-height: var(--font-lineheight-1);
}

.library-chapter__content {
  margin-bottom: var(--size-8);
}

.library-chapter__navigation {
  margin-top: var(--size-8);
  padding-top: var(--size-6);
  border-top: 1px solid var(--surface-3);
}

.library-chapter__nav-links {
  display: flex;
  justify-content: space-between;
  gap: var(--size-4);
  margin-bottom: var(--size-5);
}

.library-chapter__nav-link {
  flex: 1;
  display: block;
  padding: var(--size-4);
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-2);
  text-decoration: none;
  color: var(--text-1);
  font-weight: var(--font-weight-5);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.library-chapter__nav-link:hover {
  background: var(--surface-3);
  border-color: var(--surface-4);
  text-decoration: none;
  color: var(--text-1);
}

.library-chapter__nav-link--prev {
  text-align: left;
}

.library-chapter__nav-link--next {
  text-align: right;
}

.library-chapter__back-to-book {
  text-align: center;
}

.library-chapter__book-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: var(--font-weight-5);
}

.library-chapter__book-link:hover {
  text-decoration: underline;
}

/* Chapter Title Component (shared) */
.chapter-title {
  display: flex;
  align-items: center;
  gap: var(--size-3);
  width: 100%;
}

.chapter-title__number {
  flex: none;
  font-size: var(--font-size-0);
  font-weight: var(--font-weight-6);
  color: var(--text-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chapter-title__text {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--size-1);
  font-size: var(--font-size-1);
  font-weight: var(--font-weight-6);
}

/* Section Page Component */
.section-page {
  max-width: var(--size-page);
  margin: 0 auto;
}

.section-breadcrumb {
  margin-bottom: var(--size-5);
  text-align: center;
}

.section-breadcrumb__link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: var(--font-weight-5);
}

.section-breadcrumb__link:hover {
  text-decoration: underline;
}

.section-header {
  margin-bottom: var(--size-7);
  text-align: center;
}

.section-number {
  font-size: var(--font-size-0);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: var(--font-weight-5);
  margin-bottom: var(--size-2);
}

.section-title {
  margin: 0;
  color: var(--text-1);
  font-weight: var(--font-weight-7);
  line-height: var(--font-lineheight-1);
}

.chapter-title--large {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: var(--size-2);
}

.chapter-title--large .chapter-title__number {
  font-size: var(--font-size-0);
  color: var(--text-2);
  margin-bottom: var(--size-1);
}

.chapter-title--large .chapter-title__text {
  font-size: var(--font-size-fluid-2);
  justify-content: center;
  text-align: center;
}

.section-title__icon {
  width: var(--font-size-3);
  height: var(--font-size-3);
  color: var(--text-2);
  flex-shrink: 0;
}

.section-content {
  margin-bottom: var(--size-8);
}

.section-navigation {
  margin-top: var(--size-8);
  padding-top: var(--size-6);
  border-top: 1px solid var(--surface-3);
}

.section-nav-links {
  display: flex;
  justify-content: space-between;
  gap: var(--size-4);
  margin-bottom: var(--size-5);
}

.section-nav-link {
  flex: 1;
  display: block;
  padding: var(--size-4);
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-2);
  text-decoration: none;
  color: var(--text-1);
  font-weight: var(--font-weight-5);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.section-nav-link:hover {
  background: var(--surface-3);
  border-color: var(--surface-4);
  text-decoration: none;
  color: var(--text-1);
}

.section-nav-link--prev {
  text-align: left;
}

.section-nav-link--next {
  text-align: right;
}

.section-back-to-holding {
  text-align: center;
}

.section-holding-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: var(--font-weight-5);
}

.section-holding-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 800px) {
  .library-book__hero-content {
    grid-template-columns: 1fr;
    gap: var(--size-6);
    text-align: center;
  }
  
  .library-book__cover-placeholder,
  .library-book__cover-image {
    max-width: 250px;
    margin: 0 auto;
  }
  
  .library-book__details {
    text-align: center;
  }
  
  .library-book__meta {
    justify-content: center;
  }
  
  .library-chapter__nav-links {
    flex-direction: column;
  }
  
  .library-chapter__nav-link--prev,
  .library-chapter__nav-link--next {
    text-align: center;
  }
}