/*Google Font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* CSS reset */
*, *::before, *::after {
    box-sizing: border-box;
}
* {
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
}
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}
input, button, textarea, select {
    font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    hyphens: auto;
}
/* container styles ***********************************************/
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;

}
/* header styles ***********************************************/
.header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.header-title {
    font-size: 8rem;
    border-bottom: 10px solid black;
}
.add-book {
    background-color: hsl(16, 100%, 63%);
    padding: 15px;
    width: 150px;
    border-radius: 100px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.add-book:hover {
    background-color: hsl(16, 100%, 59%);
}
.add-book:active{
    transform: translateY(2px);
}
dialog {
    position: relative;
    margin-left: auto;
    margin-right: auto;
    margin-top: 200px;
    border: 3px solid black;
    border-radius: 5px;
    background-color: whitesmoke;
}
.dialog-div {
    padding: 10px;
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
}
.close-button {
    width: 75px;
    height: 40px;
    margin-left: auto;
    font-size: 1.1rem;
    background-color: hsl(0, 100%, 40%);
    color: white;
}
.close-button:hover {
    background-color: hsl(0, 100%, 70%);
}
.book-form {
    display: grid;
    grid-template-rows: repeat(6,1fr);
    padding: 50px;
}
fieldset {
    padding: 10px;
}
.add-form {
    height: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: 100px;
    background-color: hsl(97, 51%, 52%);
}
.add-form:hover {
    box-shadow: 0 0 10px;
}
.invalid {
    border: 3px solid red;
}
::backdrop {
    background-color: whitesmoke;
    opacity: 0.5;
  }
/* bookshelf styles ***********************************************/
.bookshelf {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 325px));
    grid-auto-rows: minmax(300px , 400px);
    overflow: auto;
    background-image: url(./images/texture-1027559_1920.jpg);
    justify-content: center;
    gap: 1.5rem;
    padding: 20px;
}
.book-card {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    grid-template-rows: 2fr repeat(3,1fr) 2fr;
    background-image: url(./images/waves-7594544_640.png);
    background-size: 100%;
    border: 5px solid black;
    box-shadow: 10px 5px 5px black;
    color: white;
    border-radius: 5px;
    font-weight: 700;
}
p {
    text-align: center;
}
.title {
    grid-column: 1/3;
    font-size: 1.5rem;
    font-weight: 700;
    padding-top: 55px;
}
.author {
    grid-column: 1/3;
    padding-top: 10px;
}
.author::before {
    content: "By: ";
}
.page-number {
    grid-column: 1/3;
}
.page-number::after {
    content: " Pages";
}
.genre {
    grid-column: 1/3;
}
.read-status {
    justify-self: center;
    align-self: center;
    height: 50px;
    width: 75px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: hsl(97, 100%, 49%);
    box-shadow: 0 0 5px hsl(97, 100%, 49%);

}
.unread {
    background-color: hsl(25, 100%, 49%);
    box-shadow: 0 0 5px hsl(25, 100%, 49%);
}
.read-status:hover {
    box-shadow: 0 0 10px;
}
.delete-button {
    background-image: url(./images/trash-can-outline.svg);
    justify-self: center;
    align-self: center;
    height: 50px;
    width: 50px;
    opacity: 1;
    border-radius: 10px;
    background-color: whitesmoke;
}
.delete-button:hover {
    border: hsl(25, 100%, 49%);
    background-color: red;
}
.attribute {
    color: white;
    background-image: url(./images/texture-1027559_1920.jpg);
}
@media all and (max-width:1200px) {
    .bookshelf {
        grid-template-columns: repeat(3, minmax(200px, 325px));
    }
}
@media all and (max-width: 800px) {
    .header-title {
        font-size: 4.5rem;
    }
    .bookshelf {
        grid-template-columns: repeat(2, minmax(150px, 325px));
        gap: 30px;
    }
}