@use '../settings/colors';
@use '../settings/fonts';
@use '../settings/grid';

.booklist {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  margin: 0 -40px; /* grid trick, has to match box margin */
  h4.book__title {
    font-family: fonts.$font-family-serif;
    @include grid.fluid-type(18px, 20px);
    margin: 0;
    padding: 0;
    font-weight: 400;
  }
  .book {
    display: flex;
    flex: 0 0 auto;
    width: 200px;
    height: 350px;
    margin: 1.5rem 40px;
    align-items: flex-end;
    @media (max-width: 768px) {
      align-items: flex-start;
      height: auto;
    }
    img {
      width: 100%;
      border-bottom: 3px solid white;
      padding-bottom: 3px;
    }
    a {
      text-decoration: none;
    }
    a:hover {
      img {
        border-bottom: 3px solid black;
      }
    }
    &[data-public-domain='false'] {
      img {
        filter: grayscale(1);
        opacity: 0.5;
      }
      a {
        color: colors.$gray;
        opacity: 0.5;
      }
      a:hover {
        color: colors.$black;
        opacity: 1;
        img {
          filter: none;
          opacity: 1;
        }
      }
      img:hover {
        filter: none;
      }
    }
  }
}
