/* prerequisites */
* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
 
    --bg-header: #0F172A;
    --bg-body: #1E293B;
    --bg-card: #475569;
  
    --text-main: #F1F5F9;
  
    --btn-read: #10B981;
    --btn-unread: #F43F5E;
  
    --text-btn: #FFFFFF; 

    --fs-logo: clamp(1.75rem, 4vw, 3rem);
    --fs-title: clamp(1.25rem, 2vw, 1.5rem);
    --fs-body: clamp(1.5rem, 1.6vw, 1.7rem);
    --fs-small: clamp(1.1rem, 1vw, 1.25rem);

    --card-padding: 20px;
}

body {

    font-family: "Merriweather", serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

    display: flex;
    flex-direction: column;

    min-height: 100vh;
}

button {

    border: none;
    border-radius: 8px;

    cursor: pointer;

    font-family: inherit;
}
/* prerequisites */

/* Header */
header {

    padding-top: clamp(18px, 4vw, 32px);
    padding-bottom: clamp(18px, 4vw, 32px);

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: var(--bg-header);
    color: var(--text-main);

    h1 {

        font-size: var(--fs-logo);
    }

    span {

        font-size: var(--fs-title)
    }

    div:first-child {

        width: 80%;
        max-width: 1200px;

        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    div:first-child > div {

        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;

        padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);

        border-radius: 8px;

        cursor: pointer;
    }

    div:first-child > div:hover {

        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        
        background-color: #64748B;
    }
}
/* Header */

/* Main */
main {

    flex: 1;
    background-color: var(--bg-body);

    display: flex;
    justify-content: center;
    
    padding-top: clamp(32px, 5vw, 64px);
    padding-bottom: clamp(32px, 5vw, 64px);
}
div.books-container {

    width: 75%;
    
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    align-items: start;
    align-content: start;
    gap: 25px;
}
article.book-card {

    -webkit-box-shadow: 0px 0px 10px 0px #000000; 
    box-shadow: 0px 0px 10px 0px #000000;

    padding: var(--card-padding);
    border-radius: 10px;
    background-color: var(--bg-card);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;

    span {

        font-size: var(--fs-body);
        color: var(--text-main);
    }    

    button {

        font-size: var(--fs-small);
        font-weight: 600;

        width: 100%;
        max-width: 500px;

        padding: 12px 24px;
    }
    button.remove-button {

        background-color: #EFEFEF;
    }
    button.remove-button:hover {

        background-color: #D7D7D7;
    }
    button.read {

        background-color: #10B981;
    }
    button.read:hover {

        background-color: #059669;
    }
    button.unread {

        background-color: #F43F5E;
    }
    button.unread:hover {

        background-color: #E11D48;
    }
}
/* Main */

/* Footer */
footer {

    font-size: var(--fs-title);

    background-color: var(--bg-header);
    color: var(--text-main);
    
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;

    padding-top: clamp(15px, 3vw, 22px);
    padding-bottom: clamp(15px, 3vw, 22px);
}
/* Footer */

/* Pop up */
div.form-container {

    width: clamp(350px, 30vw, 500px);

    border: none;

    background-color: var(--bg-card);
    color: var(--text-main);

    border-radius: 10px;
    padding: var(--card-padding);

    display: flex;
    flex-direction: column;
    gap: 30px;

    h2 {

        text-align: center;
    }

    form {

        justify-self: stretch;

        display: flex;
        flex-direction: column;
        gap: 25px;
    }
    form > div {

        font-size: var(--fs-small);
        display: flex;
        gap: 10px;
    }

    input {

        font-family: inherit;
        font-size: var(--fs-small);

        padding: clamp(12px, 2vh, 16px) clamp(16px, 3vw, 24px);

        border-radius: 8px;
        border: none;
    }
    input[type="text"]:focus, input[type="number"]:focus {

        outline: 3px solid aquamarine;
    }
    input[type="checkbox"] {

        accent-color: white;
        width: 1em;
    }

    button {

        font-size: var(--fs-small);
        font-weight: 600;
        padding: 12px 24px;

        background-color: #10B981;
        color: var(--text-btn);
    }
    button:hover {

        background-color: #059669;
    }
}
dialog#pop-up {

    margin: auto;

    border: none;
    padding: 0;
    background-color: transparent;
}
dialog::backdrop {

    background-color: rgba(15, 23, 42, 0.7);
}
/* Pop up */