@import url('../../assets-custom/root.css');

/* library page */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Lato&family=Open+Sans&family=Roboto+Condensed:wght@300;400&family=Roboto+Mono:wght@500&family=Space+Grotesk&display=swap');

.offcanvas-body {
  color: white;
}

body {
  background: var(--index-container-body-background-color);
}
.header-container {
  height: 98px !important;
  color: white;
  width: 100% !important;
  background-image: unset;
  background: var(--ea-secondary-color);
  position: sticky;
  top: 0;
  z-index: 10;
}
.library-body {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.library-body-container {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  gap: 15px;
}
.left-library-part {
  width: 15%;
  margin-top: 15px;
  border-radius: 10px;
  position: fixed;
  top: 104px;
  left: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.right-library-part {
  padding-left: 10%;
}
.books-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Space between items */
}

.book-item {
  display: flex;
  flex: 1 1 calc(24% - 10px);
  box-sizing: border-box;
  flex-direction: column;
  cursor: pointer;
  /* background: var(--library-books-item-background-color);
  padding: 16px; */
  gap: 24px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.book-item p {
  font-weight: 200;
  font-size: 13px;
  margin-top: -6px;
  text-align: center;
}
.library-book-info div {
  background: var(--btn-background-color);
  padding: 6px;
  padding-left: 19px;
  padding-right: 19px;
  color: white;
}
@media (max-width: 600px) {
  .book-item {
    display: flex;

    flex: 1 1 100%; /* 1 item per row for smaller screens */
  }
}
.library-book-info {
  width: 100%;
  justify-content: center;
  align-items: center;
}
.book-item-img {
  position: relative;
}
.library-book-info h3 {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: var(--ea-text-color-2);
  max-width: 200px;
}
.book-item-img img {
  width: 100%;
  border-radius: 10px;
  /* margin-top: -24px; */
  box-shadow: 2px 1px 12px rgba(0, 0, 0, 0.3);
}
.library-book-info .read-more-button {
  font-size: 12px;
  margin-top: 0px;
  color: var(--library-read-more-color);
}
.each-cateogry-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  margin-bottom: 1px;
}

/* contentHTML = `
<div class="book-item" onclick="window.open('${book.gameUrl.replaceAll(' ', '%20')}')">
<div class="book-item-img">
  <img src="${book.thumbnailUrl}" alt="${truncateBookTitle(book.title, 28)}" class="img-fluid">
  </div>
  <div class="library-book-info d-flex flex-column">
    <h3>${truncateBookTitle(book.title, 28)}</h3>
    <p>${truncateBookTitle(book.description, 100)}</p>
    <div class="read-more-button">Read More</div>
  </div>
</div>` */
.category .title h1 {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--ea-font-family-type-2) !important;
}
.each-cateogry-title .more-btn {
  background: var(--btn-background-color);
  padding-left: 24px;
  padding-right: 24px;
  color: white;
  margin-top: -38px;
  border-radius: 0;
}
.category {
  margin-top: 80px;
}
.allBooksContainer {
  gap: 18px;
}
.library-header {
  display: flex;
  flex-direction: column;
}

.library-header-img {
  display: none;
}
.library-header-img img {
  width: 100%;
  /* object-fit: cover; */
}
.library-menu-item a {
  color: var(--ea-text-color-1);
  border-bottom: 1px solid #bac0da;
  /* padding-bottom: 12px; */
  background: var(--ea-secondary-color);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  padding: 7px;
}

.library-menu-item:last-child a {
  border-bottom: none;
}
.menu-account {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 13px;
  padding-bottom: 17px;
  padding-top: 17px;
  gap: 17px;
  flex-wrap: wrap;
  margin-bottom: -16px;
}
.menu-account a {
  color: var(--ea-text-color-1);
  border-bottom: 1px solid #bac0da;
  /* padding-bottom: 12px; */
  background: var(--ea-secondary-color);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  /* width: fit-content; */
  padding: 7px;
}
.menu-account div:first-child {
  font-size: 25px;
  font-weight: 700;
}
#menu-categories {
  display: none;
  /* flex-direction: column; */
  justify-content: flex-start;
  padding: 13px;
  height: 100%;

  /* align-items: center; */

  padding-bottom: 17px;
  padding-top: 17px;
  gap: 17px;
  flex-wrap: wrap;
}
.library-menu-item {
  cursor: pointer;
}
.activeCateogryLink a {
  color: var(--ea-text-color-1);
  font-weight: 700;
}

.categories-container {
  /* background: var(--ea-primary-color); */
  border-radius: 20px;
  margin-top: 20px;
}

@media screen and (max-width: 990px) {
  .left-library-part {
    /* position: sticky;
    top: 0;
    left: auto;
    z-index: 10;
    height: auto; */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    flex-direction: column;
    width: 100%;
  }
  .left-library-part.active {
    max-height: fit-content;
    opacity: 1;
    z-index: 10;
    margin-top: -14px;
    width: 100vw;
    margin-left: -14px;
    display: flex;
    overflow: auto;
    padding-bottom: 47px;
    background: #7a7a7a;
    padding-left: 0 !important;
  }

  .right-library-part {
    padding-left: unset;
  }
  .library-body {
    flex-direction: column;
  }
  .menu-account {
    flex-direction: column;
  }
  .navbar-collapse {
    display: none;
  }
}
.menu-account .nav-link {
  display: none;
}
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}
@media (max-width: 990px) {
  #menu-categories {
    flex-direction: column;
  }
  .menu-account {
    flex-direction: column;
  }
  .library-menu-item {
    cursor: pointer;
    width: 100%;
  }
}
@media (max-width: 990px) {
  .each-cateogry-title .more-btn,
  .library-book-info div {
    font-size: 9px;
  }
}
