/****** GENERAL ******/
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    text-decoration: none;
    color: inherit;
}

body{
    width: 100vw;
    background-repeat: no-repeat;
    background-size: 100%;
}

main{
    height: 100vh;
    position:relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/****** FONTS ******/

@font-face {
    font-family: "Merriweather";
    src: url(../assets/fonts/Merriweather_48pt-Bold.ttf);
}

@font-face {
    font-family: "Lato";
    src: url(../assets/fonts/Lato-Regular.ttf);
}

h1{
    font-family: "Merriweather";
    text-transform: capitalize;
    font-size: 4.75rem;
    font-weight: 500;
    color: #412710
}

h2{
    font-family: "Merriweather";
    font-size: 2rem;
    font-weight: 500;
    color: #412710
}

h3{
    font-family: "Merriweather";
    font-size: 1.625;
    font-weight: 500;
    color: #412710
}

h4{
    font-family: "Merriweather";
    font-size: 1.125rem;
    font-weight: 500;
    color: #412710;
}

h5{
    font-family: "Merriweather";
    font-size: 1rem;
    font-weight: 500;
    color: #412710;
}

p{
    font-family: "Lato";
    font-size: 0.875rem;
    color: #412710;
}

a{
    text-transform: capitalize;
    font-weight: 500;
    font-size: 1.125rem;
    color: #412710;
    text-decoration: none;
}

/****** BUTTONS ******/

.add-user {
    border: none;
    background-color: #ffffff;
}

.validate-btn {
    background-color: #27ae60;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
}

.delete-btn {
    background-color: red;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
}

.close-btn {
    display: flex;
    margin-bottom: 1rem;
    background-color: red;
    border-radius: 20px;
}

.logout-btn {
    border:solid 2px;
    border-color:#ff0000;
    border-radius: 8px;
    width:50px;
    height:50px;
    img{
        width:100%;
    }
}

.password-btn, .modif-comment-btn, .modif-recipe-btn, .add-ingredient-btn {
    padding: 0.5rem 1rem;
    background-color: #F68815;
    border: none;
    border-radius: 8px;
    color: #412710;

}

.modif-recipe-btn{
    margin-right:10rem;
}

.secondary-btn {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/******* HEADER ******/

header{
    border-bottom: solid 2px;
    border-color: #412710;
    padding:0.5rem;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.header-login{
    display:flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    margin: 0.5rem 1rem;
    gap: 3rem;
    width:90%;
}

.login-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#login-mode{
    border:outset;
}

.login-field input{
    border: solid 1px;
    border-radius: 4px;
    text-align: center;
}

.banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 70%;
    text-align: center;
    margin: 3rem 0;
}

.banner-title {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-profil a{
    font-size: 1.6rem;
    display:flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border:none;
    width: auto;
    img{
        width:60px;
    }
}

.banner-header {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}


/****** NAVBAR ******/

.navbar{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    margin-right: 2rem;
    width:100%;
}


/****** PROFIL ******/

#edit_profil {
    display: flex;
    width: 80%;
    justify-content: space-between;
}

.edit-profil{
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 350px;
}

.detail-profil {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    button{
        border:none;
    }
}

#modif_profil{
    width:400px;
}

.form-modif-user {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width:100%;
    margin-left:1rem;
}

.edit-profil-txt {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: 80%;
    align-items: flex-start;
    input{
        border: solid 1px;
        border-radius: 4px;
        text-align: center;
    }
}



.edit-profil-password{
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    #modif_password {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

#modif_password label{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#modif_password input{
    border: solid 1px;
    border-radius: 4px;
    text-align: center;
}


/****** FORM ******/


.create-user{ 
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 350px;
}

.form-create-user {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.create-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 80%;
    justify-content: flex-end;
    align-items: flex-start;
    padding-left:2rem;
    input{
        border: solid 1px;
        border-radius: 4px;
        text-align: center;
    }
}

.form-filter {
    display: flex;
    flex-direction: row;
    margin: 2rem 0;
    width: 70%;
    gap: 1rem;
    .filter-btn{
        display: flex;
        justify-content: flex-end;  
    }
}

.select-filter{
    width:100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap:1.5rem;
    select{
        width:15%;
    }
}


#form_new_comment, #form_modif_comment {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 60%;
    align-self: center;
    textarea {
        border-radius: 8px;
        border-color: #412710;
    }
}

#form_modif_comment{
    width:100%;
    .footer-comment {
        display: flex;
        justify-content: space-between;
    }
}


.rate-comment {
    display: flex;
    flex-direction: column;
    width: fit-content;
    gap: 0.5rem;
    input{
        border-radius:8px;
        border-color: #412710;
    }
}



/****** CARD ******/

.list-container {
    display: flex;
    flex-direction: column;
    width: 70%;
    gap: 3rem;
    margin-top: 2rem;
}



.list-recipes{
    display: flex;
    flex-wrap: wrap;
    gap:2rem;
    flex:1 1 calc( 49% - 2rem );
    justify-content: center;
    margin-bottom:4rem;
    a {
        text-transform: capitalize;
        font-weight: 500;
        font-size: 1.125rem;
        color: #412710;
        text-decoration: none;
        border: solid 1px;
        border-radius: 8px;
        width: 550px;
    }

}

.card-recipe{
    display: flex;
    width:100%;
    height:250px;
    gap: 1rem;
    padding: 1rem;
    .card-img img {
        height: 100%;
    }
    .card-content{
        display: flex;
        flex-direction: column;
        gap:1.5rem;
    }
}

/****** RECIPES ******/

#detail_recipe {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 70%;
    margin-top: 4rem;
    border: solid 1px #412710;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.recipe-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.recipe-flour, .recipe-description, .recipe-ingredients {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


.recipe-ingredients ul {
    gap: 1rem;
    display: flex;
    flex-direction: column;
    margin-left: 2rem;
}

.title-recipe-page {
    margin: 4rem 0rem 4rem 10rem;
    align-self: flex-start;
}


.create-recipe-filter{
    display:flex;
    align-items: center;
    gap: 1rem;
}

#detail_flour{
    margin-top: 4rem;
}

.flour-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom:2rem;
}

.flour-quantity{
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
        input{
        border: solid 1px;
        border-radius: 4px;
        text-align: center;
    }
}


.form-create-recipe {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 3rem 0;
    gap: 1rem;
    input{
        border: solid 1px;
        border-radius: 4px;
        text-align: center;
    }
    textarea{
        border: solid 1px #412710;
        border-radius: 4px;
    }
}

.recipe-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.create-recipe-description {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 50%;
}

.create-recipe-ingredients {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

#form_add_ingredient {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: flex-start;
    .add-ingredient-detail {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 70%;
        .add-ingredient-label {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
        }
    }
    .footer-add-ingredient {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }
}

.form-create-recipe #form_add_ingredient{
    width:50%;
    #list_ingredients{
        width:100%;
    }
}



#list_ingredients, #list_current_ingredients {
    border: solid 1px #412710;
    width: 50%;
    padding:2rem;
    border-radius: 8px;
    margin:2rem 0;
    input{
        border: solid 1px;
        border-radius: 4px;
        text-align: center;
    }
    textarea{
        border: solid 1px #412710;
        border-radius: 4px;
    }
    ul{
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        li{
            display: flex;
            justify-content: space-between;
            .detail-ingredient {
                display: flex;
                align-items: center;
                gap: 2rem;
            }
        }
    }
}

#list_current_ingredients{
    width:100%;
}


#form_modif_recipe{
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    input{
        border: solid 1px;
        border-radius: 4px;
        text-align: center;
    }
    textarea{
        border: solid 1px #412710;
        border-radius: 4px;
    }
    select{
        margin: 2rem 0;
        width:50%;
        border: solid 1px;
    }
}

#form_modif_recipe #list_ingredients{
    width:100%;
}






/****** COMMENTS ******/

#list_comments {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.comment {
    border: solid 1px #412710;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    text-transform: capitalize;
}



/****** ALERTS ******/

.error-msg {
    color: red;
    background: #ffeaea;
    border: 1px solid #ff0000;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
}

/****** MODAL ******/

.modal {
    max-height: 80vh;
    overflow-y: auto;    
    width: 650px;
    position:fixed;
    background-color: #ffffff;
    border: solid 2px #412710;
    border-radius: 8px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    z-index: 1100;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.modal_background{
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    z-index: 1000;
    pointer-events: all;
}

#create_user{
    width:400px;
}

.close-modal {
    display: flex;
    justify-content: flex-end;
    width:100%;
}

.footer-modal{
    width:100%;
    display: flex;
    justify-content: flex-end;
}
.hidden {
    display: none;
}