@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body{
    background: #023047;
}

.wrapper{
    display: grid;
    grid-template-rows: 1fr 9fr 1fr;
    justify-items: center;
    gap: 2rem;
}

.wrapper .header{

    grid-row: 1/2;
    width: 100%;
    background: #F5E3E0;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wrapper .main-content{
    grid-row: 2/3;
    display: grid;
    grid-template-rows: 1fr 8fr;
    gap: 2rem;
    justify-items: center;
    width: 70%;
}

.wrapper .main-content .add-book{
    display: flex;
    justify-content: center;
    align-items: center;
}


.add-book button{
    font-family: inherit;
    font-size: large;
    font-weight: bold;
    height: 3rem;
    width: 8rem;
    outline: none;
    border: none;
    border-radius: 15px;
    background: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-book button:hover{
    background: #caf0f8;
    color: black;
}

.wrapper .footer{
    grid-row: 3/4;
    height: 5rem;
    width: 100%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dialog{
    background: #7293A0;
    border: none;
    border-radius: 25px;
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 18rem;
    height: 24rem;
    transition: all 1s ease;
    opacity: 0;
}

.dialog::backdrop{
    background-color: rgba(128, 128, 128, 0.5);
    cursor: pointer;
    pointer-events: all;
}

.dialog form{

    display: grid;
    justify-items: center;
    align-items: center;
    height: 100%;
    width: 100%;
    word-wrap: normal;
}

.fail-msg{
    width: 70%;
    text-align: center;
}

.dialog input[type='text'], .dialog input[type='number']{
    appearance: none;
    width: 80%;
    height: 2.5rem;
    outline: none;
    border: none;
    border-radius: 10px;
    text-indent: 10px;
    background: #C2D0D6;
    font-family: inherit;
    font-size: large;
}

.checkbox{
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog input[type='checkbox']{
    appearance: none;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid black;
    height: 20px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog input[type='checkbox']::after{
    font-family: 'Font Awesome 6 Free';
    font-weight: bolder;
    font-size: 15px;
    content: '\f00c';
    display: none;
}

.dialog input[type='checkbox']:hover{
    background: #C2D0D6;
}

.dialog input[type='checkbox']:checked{
    background: #caf0f8;
}

.dialog input[type='checkbox']:checked::after{
    display: block;
}

.dialog button{
    font-family: inherit;
    font-size: large;
    font-weight:600;
    height: 2rem;
    width: 6rem;
    border: none;
    border-radius: 10px;
    background: none;
    cursor: pointer;
}

.dialog button:hover{
    background: #C2D0D6;
}

.wrapper .books{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(240px, 1fr));
    gap: 20px;
    grid-template-rows: max-content;
    align-items: center;
    justify-items: center;
}

.book-card{
    background: #C9E0F8;
    display: grid;
    grid-template-rows: 1fr 0.5fr 0.5fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    justify-items: center;
    border-radius: 20px;
    width: 100%;
    padding: 10px 0 10px 0;
}

.bookCard-btns{
    width: 90%;
    font-size: medium;
    font-weight: medium;
    height: 3rem;
    border-radius: 15px;
    cursor: pointer;
    background: none;
    border: none;
    box-shadow: 1px 2px 5px 1px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

.remove-btn:hover{
    background: #83202B;
    color: white;
}

.read-btn:hover{
    background: #1C7C54;
    color: white;
}
