/* General Selectors */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  height: 100%;
  font-size: 16px;
  font-family: "Montserrat";
  /* Grid Selectors */
  display: grid;
  grid-template-columns: 5fr 1fr;
  grid-template-rows: 70px auto 40px;
  grid-template-areas:
    "header header"
    "main aside"
    "footer footer";
  gap: 0.75rem;
  background-color: #c6ebc5;
}

button {
  border: none;
  cursor: pointer;
}

/* Header Selectors */
header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2.5rem 0;
  background-color: #e8efcf;
}

.header-title {
  text-transform: uppercase;
  margin-left: 1rem;
  word-spacing: 0.75rem;
}

.nav-right {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 40%;
  height: 100%;
}

li {
  list-style: none;
  width: 150px;
  padding: 0.5rem 1rem;
  text-align: center;
  border-radius: 5px;
  background-color: rgba(68, 197, 68, 0.61);
  transition: all ease-out 0.5s;
  cursor: pointer;
} 

li:last-child {
  width: 180px;
  padding: .5rem;
}

li:hover {
  background-color: #14c38e;
  color: #fff;
  transform: scaleX(1.1);
}

li:hover a {
  color: #fff;
}

a {
  text-decoration: none;
  font-weight: bold;
  color: black;
}

/* Main Selectors */
main {
  grid-area: main;
  width: 100%;
  border-radius: 0 10px 10px 0;
  background-color: rgba(202, 196, 196, 0.637);
}

.button-icon-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem;
}

.add-new-book {
  font-weight: bold;
  width: 150px;
  margin-left: 45%;
  border-radius: 15px;
  padding: 0.5rem;
  background-color: #14c38e;
}

.add-new-book:hover {
  transition: all ease-out 0.5s;
  transform: scaleX(1.1);
  color: #fff;
}

.fa-plus {
  margin-right: 0.5rem;
}

.info-icon {
  display: none;
}

.my-books-row,
.best-sellers-row,
.recommendations-row {
  display: grid;
  justify-content: flex-start;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem 0.25rem;
  margin: 0.5rem 2rem;
  padding: 0.75rem 0;
}

.row-title {
  margin: 1rem 2rem;
}

.delete-box {
  display: flex;
  justify-content: flex-end;
}

.delete-book {
  width: 30px;
  height: 30px;
  margin-left: 0.5rem;
  border-radius: 5px;
  background-color: rgba(255, 0, 0, 0.555);
  transition: all ease-out 0.5s;
}

.delete-book:hover {
  transform: scale(1.1);
}

.book-card {
  margin-right: 1rem;
  border-radius: 10px;
  box-shadow: 3px 3px 10px green;
  width: 250px;
  padding: 1rem;
  position: relative;
  z-index: 8;
  background-color: #faf8f8e3;
}

.book-card:hover {
  transform: scale(1.05);
  transition: all ease-out 0.5s;
}

.book-card > * {
  margin-bottom: 0.35rem;
}

.book-card p {
  text-align: right;
}

.title,
.author,
.pages,
.genre {
  display: flex;
  justify-content: space-between;
}

.button-read {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

.read-check {
  width: 75px;
  padding: 0.25rem 0;
  border-radius: 15px;
  background-color: rgba(68, 197, 68, 0.61);
  transition: all ease-out 0.5s;
  color: #fff;
}

.read-check:hover {
  background-color: #14c38e;
  transform: scaleX(1.1);
}

span {
  margin-right: 0.5rem;
  font-weight: 800;
}

/* Aside Selectors */
aside {
  grid-area: aside;
  padding: 1rem;
  font-size: 1.25rem;
  border-radius: 10px 0 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
  background-color: #14c38e;
}

aside p {
  margin-top: 0.5rem;
}

.x-icon-div-aside {
  display: none;
}

#x-icon-aside {
  display: none;
}

/* Footer Selectors */
footer {
  grid-area: footer;
  text-align: center;
  padding: 0.5rem 2.5rem;
  background-color: #e8efcf;
}

/* Form Selectors */
.form {
  display: none;
  width: 300px;
  padding: 1.5rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #e8efcf;
  border-radius: 10px;
  z-index: 10;
}

#form-btn {
  width: 150px;
  padding: 0.25rem 0;
  border-radius: 15px;
  background-color: rgba(9, 65, 9, 0.61);
  transition: all ease-out 0.5s;
  margin-left: 2.75rem;
  margin-top: 1rem;
  padding: 0.5rem 0;
}

.form-title {
  margin: 1rem 0;
  text-transform: uppercase;
  color: rgb(0, 10, 0);
}

#form-btn:hover {
  background-color: #14c38e;
  transform: scaleX(1.1);
  color: #fff;
}

input,
select {
  width: 90%;
  margin: 0.5rem 0;
  border: none;
  border-radius: 5px;
  height: 20px;
  padding-left: 7px;
  background-color: rgba(202, 196, 196, 0.637);
}

input::placeholder {
  color: #000000a4;
}

input:focus {
  transform: scale(1.05);
}

input:valid {
  box-shadow: 3px 3px 10px green;
}

input:user-invalid {
  box-shadow: 3px 3px 10px red;
}

input[type="checkbox"] {
  margin: 0.5rem;
  width: auto;
  box-shadow: none;
}

.span-form {
  padding-left: 3px;
  color: red;
}

.x-icon {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.fa-xmark:hover {
  transition: all ease-out 0.3s;
  transform: scale(1.7);
  cursor: pointer;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9;
}

/*Media queries*/
@media (max-width: 1300px) {
  .nav-right {
    width: 60%;
  }
}

@media (max-width: 1100px) {
  aside {
    display: none;
  }
  body {
    /* Grid Selectors */
    display: grid;
    grid-template-columns: 5fr 1fr;
    grid-template-rows: 70px auto 40px;
    grid-template-areas:
      "header header"
      "main main"
      "footer footer";
  }
  .info-icon {
    display: inline-block;
  }
}

@media (max-width: 900px) {
  body {
    grid-template-rows: auto auto 40px;
  }
  header {
    flex-direction: column;
    padding-bottom: 0.5rem;
  }

  .nav-right {
    margin-top: 0.5rem;
    justify-content: space-between;
    width: 100%;
  }
  .my-books-row,
  .best-sellers-row,
  .recommendations-row {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  }
  .book-card {
    width: 90%;
  }
}

@media (max-width: 620px) {
  header {
    padding: 0.5rem;
  }
  .my-books-row,
  .best-sellers-row,
  .recommendations-row {
    margin: 0.5rem;
  }
  .book-card {
    width: 260px;
    margin: 0 auto;
  }
  li {
    width: auto;
    font-size: 0.75rem;
    padding: 0.5rem 0.5rem;
  }
  .add-new-book {
    margin: 0.5rem;
  }
  li:last-child {
  width: 150px;
}
}
