.library {
  font-family: "Nunito", sans-serif;
}

.library h3 {
  color: var(--decoration-secondary);
}

.library .genrefilter {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.3rem;
  row-gap: 0.3rem;
}

.library .genrefilter {
  margin-bottom: 1rem;
}

.library .genrefilter a {
  opacity: 1; /* Default opacity for all links */
}

/* Styles for when there is an active genre */
.library .genrefilter.has-active a {
  opacity: 0.4; /* Reduced opacity for all links when there's an active genre */
}

.library .genrefilter.has-active a.active {
  opacity: 1; /* Full opacity for the active link */
}

.library .genrefilter a:hover {
  opacity: 1; /* Full opacity on hover */
}

.library .currently-reading-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0rem 0rem 2rem 0rem;
}

.library .currently-reading {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  align-content: flex-start;
  justify-content: space-between;
  padding: 0rem 1rem;
  background-color: var(--bg-2);
  border-radius: 16px;
  border: 1px solid var(--bg-3);
}

.library .currently-reading .currently-reading-book {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-3);
}

.library .currently-reading .currently-reading-book:last-child {
  border-bottom: none;
}

.library .days-reading {
  line-height: 1.5;
  border-top: 10px solid red;
  display: flex;
  flex-direction: column;
  gap: 0.2;
  align-content: flex-start;
  align-items: center;
  min-width: 50px;
  padding: 8px 0px 4px 0px;
  background-color: var(--bg);
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--bg-3); /* Mimics a 2px solid green border */
}

.library .meta-data {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
}

@media screen and (max-width: 480px) {
  .library .currently-reading .currently-reading-book {
    align-items: start;
    justify-content: start;
  }

  .library .meta-data {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.5rem;
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  .library .days-reading {
    background-color: var(--bg-3);
    box-shadow: 0 0 0 1px var(--tx-3);
  }
}

.library .days-reading .number {
  font-size: 1.2rem;
  line-height: 1;
}

.library .days-reading .label {
  font-size: 0.6rem;
  color: var(--tx-3);
}

.library ul {
  margin: 0px;
}

.library li {
  list-style-type: none;
  border-bottom: 1px solid var(--bg-2);
  margin-bottom: 0px;
}

.library li a {
  text-decoration: none !important;
}

.title-and-count {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  align-content: start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.book {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 14px 0px;
  text-decoration: none;
  transition: border-left-width 0.2s ease-out, padding-left 0.2s ease-out;
  padding-left: 0rem;
  border-left: 0px solid transparent;
  padding-right: 1rem;
  padding-left: 0rem;
  gap: 0.5rem;
}

.book span {
  color: var(--tx);
}

.book:hover {
  background-color: var(--bg-2);
  border-left: 8px solid var(--bg-3);
  padding-left: 1rem;
}

.fav {
  background: linear-gradient(
    to right,
    rgba(255, 238, 0, 0.2),
    transparent 60%
  );
  border-left: 2px solid gold;
  padding-left: 0.8rem;
}

.fav:hover {
  border-left: 8px solid gold !important;
}

.fav .author {
  color: var(--tx) !important;
  opacity: 0.7;
}

.genre-rating-wrapper {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  transition-property: transform;
  transition-duration: 0.2s; /* Adjust duration as needed */
  transition-timing-function: ease-out; /* Or another timing function */
  align-items: flex-start;
}
.book:hover .genre-rating-wrapper {
  transform: translateX(0.5rem);
}

li:last-child {
  border-bottom: none;
}

.title-and-author {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  align-items: baseline;
  flex-grow: 1;
  margin-bottom: 0rem;
  line-height: normal;
}

/* .title-and-author .book-title {
  font-size: 0.8rem;
} */

.author {
  color: var(--tx-3) !important;
  font-size: 0.8rem;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}

.selected-genre {
  color: var(--tx-3);
}

@media screen and (max-width: 480px) {
  .book {
    flex-direction: column;
  }
  .title-and-author {
    flex-direction: column;
    gap: 0.2rem;
  }
}
