/* 
*/
img{
  margin: 0 5px;
  width: 20px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  position: relative;
  background-size: cover;
  font-family: sans-serif;
}
main {
  height: 100vh;
}

header {
  padding: 20px 30px;
  box-shadow: 0 0 7px rgb(0, 0, 0, 0.2);
  position:sticky;
  top:0;
  margin-bottom: 100px;
  background:white;
  display: flex;
  z-index:2;
}
header .logo {
  position:relative;
  left:50%;
  transform: translateX(-50%);
  font-family: "Dancing Script",sans;
}
header button {
  background-color: white;
  grid-column: 4/-1;
  margin-left: auto;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  padding: 10px;
  border:solid 1px black;
  &:hover {
    background: black;
    color:white;
  }
}

.booksGrid {
  display: grid;
  padding: 30px 0;
  margin: 0 auto;
  width: 75%;
  gap: 15px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.booksGrid .card,
.booksGrid .addBook {
  padding: 15px;
  border-radius: 5px;
}

main .booksGrid .addBook {
  display: grid;
  align-content: center;
  min-height:400px;
  place-items: center;
  border: dotted 2px rgb(0, 0, 0, 0.4);
  color: grey;
  cursor: pointer;
  transition: .7s;
  &:hover{
    background-color: rgb(0, 0, 0, 0.1);
  }
}

.booksGrid .addBook i {
  font-size: 2rem;
  padding: 30px;
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: solid 4px rgb(0, 0, 0, 0.4);
  border-radius: 50vw;
}


main .booksGrid .card{
  border: solid 1px rgb(0, 0, 0, 0.6);
  min-height: 400px;  
  position:relative;
  animation: fadeIn 500ms ease-in-out;
  display: grid;
}


.card .bottomBorder{
  align-self: end;
}
.card .release{
  position:absolute;
  top:5px;
  right:5px;
}
.booksGrid .title{
    font-family: "Oswald", sans-serif;
    overflow: clip;
    text-wrap: wrap;
    font-size: 3.2rem;
    padding: 25px 0;
}
.booksGrid .card .author{
  text-align: center;
  font-weight: bold;
}
.booksGrid .card .genre{
    width: fit-content;
    text-align: center;
    padding: 5px 10px;
    border-radius: 50vw;
    background-color: #0BA6DF;
    color:white;
    margin: 10px 2px;
      font-family: "Asimovian", sans-serif;
}

.card .release{
  right:5px;
  font-family: "Asimovian", sans;
}

.card .deleteBook{
  display:grid;
  place-items: center;
  background:red;
  z-index: 1;
  border-radius: 50vw;
  width:40px;
  height:40px;
  color:white;
  padding: 5px;
  left:5px;
}
.card .release , .card .deleteBook{
  position: absolute;
  opacity: 0%;
  transition: .6s;
  top:5px;
}
.card:hover .release , .card:hover .deleteBook{
  opacity: 100%;
}

.card .numberOfPages{
  margin: 10px 0;
}
.card .numberOfPages span{
  background: black;
  color:white;
  padding:5px;
}

.card .read{
  background-color: black;
  display:flex;
  gap:5px;
  color:white;
  padding:10px 15px;
  border: none;
  border-radius: 10px;
}
.card .haveRead{
  background-color: #609966!important;
}
/* Dialog */

dialog {
  position: relative;
  top:50%;
  left:50%;
  border: 1px solid rgb(0, 0, 0, 0.6);
  border-radius: 10px;
  padding: 15px 25px;
  transform: translate(-50%,-50%);
}
dialog .dialogTitle {
  font-family: "Oswald", sans-serif;
  font-size: 2.5rem;
  margin: 5px;
}
dialog .closeDialogButton{
  display:grid;
  place-items: center;
  background:#eee;
  z-index: 1;
  border-radius: 5px;
  width:40px;
  height:40px;
  padding: 5px;
  position: absolute;
  right:20px;
  top:20px;
}
dialog form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top:10px;
}
dialog form > div:not(.inline-grid) , dialog form input[type="submit"]{
    grid-column: 1/-1;
}
 form div input,form div select, form div label {
  display: block;
  width: 100%;
  margin: 5px 0;
}
.checkbox input , .checkbox label{
  display: inline;
  width:fit-content;
}
.checkbox{
  display: flex;
  align-items: center;
  gap: 10px;
}
form input{
  padding: 10px;
  outline: transparent;
  font-size: 1.2rem;
  border-radius: 5px;
  border: solid 1px rgb(0, 0, 0, 0.4);
  box-shadow: 0 0 3px rgb(0,0,0,0.1)
}
form input[type="submit"]{
  background: #3396D3;
  color:white;
  border:none;
  
}
form select{
  padding:9px;
  border-radius: 5px;
  font-size:1.2rem;
  outline: transparent;
  border: solid 1px rgb(0, 0, 0, 0.4);
  box-shadow: 0 0 3px rgb(0,0,0,0.1);
}

/* Read and Unread sections */

.booksGrid{
  position: relative;
}
.booksGrid::before{
  content:"Heading";
  top:-50px;
  font-size: 2.7rem;
  left:50%;
  text-wrap: nowrap;
  transform: translateX(-50%);
  position:absolute;
}
.booksGrid::after{
  content: "";
  position:absolute;
  top:8px;
  left:50%;
  transform: translateX(-50%);
  width:70px;
  height: 8px;
  background:#3396D3;
  border-radius: 50vw;
}
.unreadSection{
  padding-bottom: 10em;
}
.readSection::before{
  content: "Books You Have Read";
}
.unreadSection::before{
  content: "Books Still Unread";
}


@media (max-width:800px){
  dialog{
    width:95%;
    margin: 0 auto;
  }
  dialog label{
    font-size: .8rem;
    text-wrap: nowrap;
  }
  .title{
    font-size: 2.8rem!important;
  }
  .card .release , .card .deleteBook{
    opacity:100%;
  }
  .booksGrid::before{
    font-size:2rem;
  }
  
}
@keyframes fadeIn{
  from{
    opacity:0;
  }
  to{
    opacity:1;
  }
}