/* ---Light CSS Reset--- */
html {
    font-size: 16px;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p{
    margin: 0;
    padding: 0;
    font-weight: normal;
}

/* ---Custom properties--- */
:root{
    --transition-default: all 0.25s ease;
}
html,
body{
    height: 100%;
    font-family: "Nunito Sans", sans-serif;
    line-height: 1.2;
}

.layout-container{
    min-height: 100vh;
}

.library-greeting-container{
    background-color: #efdecd;
    max-height: 15vh;
    align-content: center;
}

.library-greeting{
    justify-self: center;
    padding: 2rem;
    font-weight: bold;
}

.empty-library-msg{
    text-align: center;
}

.library-container{
    min-height: 30VH;
}

.layout-container,
.library-container {
    display: flex;
    flex-direction: column;
}

.book-card{
    display: flex;
    flex-direction: column;
    min-height: 20vh;
    padding: 1rem;
    position: relative;
    box-shadow: #C7944C1a 0px 10px 5px -1px, #C7944C0f 0px 2px 10px -1px;
}


.book-card>h2{
    font-size: calc(12px + 1vh);
    font-weight: bold;
    margin-bottom: 1rem;
}

.book-card>p {
    font-size: calc(8px + 1vh);
    margin-bottom: .5rem;
}

.button{
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid #C7944C;
    padding: 0.5rem 1rem;
    font-family: "Nunito Sans", sans-serif;
}

.button:active {
    background-color: #351B15;
    color: #efdecd;
}

.remove-book-btn{
    align-self: flex-end;
    position: absolute;
    top: 15px;
    border-radius: 50%;
    border: 2px solid #C7944C;
}

.remove-book-btn:active{
    background-color: #ffc0cb;
    border: 2px solid red;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.toggle-status-btn {
    align-self: flex-start;
    margin-top: auto;
}

.add-new-book-btn{
    align-self: center;
    margin: 1.5rem 0;
    transition: var(--transition-default);
    max-height: 3rem;
}


::backdrop {
    background-color: #000000CC;
}

form {
    padding: 1rem;
}

form>h3,
.form-input{
    justify-self: center;
    margin-bottom: 1.5rem;
}

.form-input{
    position: relative;
}

.form-input>button{
    width: 8rem;
}

input{
    padding: .75rem 0;
}

.input-text-label {
    position: absolute;
    transition: 0.3s ease;
    left: 0.5rem;
    margin-top: 1.5px;
    font-size: calc(8px + 1vh);
    z-index: 10;
}

input:focus~label,
input:valid~label{
    bottom: 2.25rem;
    padding-left: 0.1rem;
    background: white;
    font-size: calc(8px + .75vh);
    padding-right: 0.25rem;
    border-radius: 0.125rem;
}


@media only screen and (min-width: 725px){

    body{
        background-color: #351B15;
    }

    .layout-container {
        display: grid;
        justify-items: center;
        border: 4px solid #63372B;
        border-radius: 30px;
        width: 80%;
        justify-self: center;
        background-color: #FBF7F1;
    }

   .library-container{
        width: 75%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        justify-items: center;
        gap: 1em;
   }

   .library-greeting-container {
       background-color: #FBF7F1;
   }
   
   .library-greeting{
        padding: 1rem 2rem;
   }

   .book-card{
        max-width: 200px;
        width: 100%;
        min-height: 30vh;
        max-height: 300px;
        position: relative;
        padding: 1.5rem;
        box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px -2px, rgba(9, 30, 66, 0.08) 0px 0px 0px 1px;
        margin-bottom: 3rem;
        border: 2px solid #C7944C;
        background-color: #efdecd;
        border-radius: 2px;
        transform: translateY(0);
        transition: var(--transition-default);

    }

    .book-card:hover{
        outline: 4px solid #63372B;
        border: 2px solid #63372B;
        transform: translateY(-5px);
    }

   

    .remove-book-btn{
        position: absolute;
        top: 5px;
        right: 5px;
    }

    .remove-book-btn:hover {
        background-color: #ffc0cb;
        border: 2px solid red;
        color: #fff;
        font-weight: bold;
    }

    .book-card>h2,
    .book-card>p{
        text-align: center;
    }

    .book-card>h2{
        font-size: calc(10px + 0.75vh);
        margin-top: 1rem;
    }

    .book-card>p{
        font-size: calc(8px + 0.6vh);
    }

    .book-card>p:first-of-type{
        font-size: calc(8px + 0.5vh);
        font-weight: bold;
        padding: 1rem 0;
    }

    .book-card>p:last-of-type{
        margin-top: auto;
        padding: 1rem 0;
    }

    .toggle-status-btn{
        align-self: center;
    }

    .add-new-book-btn{
        margin: 0 0 2rem 0;
    }

    .button:hover{
        background-color: #351B15;
        color: #efdecd;
    }

    .add-new-book-btn{
        height: 3rem;
        line-height: 1;
    }

    .add-new-book-btn:hover{
        transform: translateY(-5px);
    }

}