@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

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


body{
    width: 100vw;
    height: 100vh;
    font-family: "Montserrat", sans-serif;
    background: #c9e7f1;  /* fallback for old browsers */
    /* background: -webkit-linear-gradient(to bottom, #fff, #076585); 
    background: linear-gradient(to bottom, #fff, #076585);  */

}

i, img{
    cursor: pointer;
}
a{
    text-decoration: none;
    color: black;
}

.workspace-wrap{
    width: 100vw;
    height: 100vh;
}
.workspace{
    width: 100vw;
    max-height: fit-content;
    min-height: 100vh;
}

nav{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    user-select: none;
}


nav img{
    width: 100px;
    height: 60px;
}

.favourites{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.favourites span{
    font-size: 8px;
}
.search{
    position: relative;
    /* width: 400px; */
}
.search input {
    padding: 5px 8px;
    border: 2px solid lightgray;
    border-radius: 15px;
    outline: none;
    width: 150px;
}
.search a{
    position: absolute;
    border: none;
    background: none;
    right: 5%;
    top: 20%;
    color: #DDA448;
    cursor: pointer;
}

.nav-for-search-page{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
}
.nav-for-search-page input{
    width: 200px;
}

.categories{
    background: #7F7FD5;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    margin-bottom: 10px;
}

.titles {
    margin-bottom: 7px;
    padding: 4px;
    letter-spacing: 1px;
    font-weight: 500;
}

.categories-container{
    display: flex;
    overflow-x:auto ;
   padding: 4px;
   user-select: none;
    scrollbar-width: thin; /* Thin scrollbar */
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(255, 255, 255, 0.1); /* Thumb and track color */
}
/* Targeting the scrollbar of a div with class "custom-scroll" */
.categories-container::-webkit-scrollbar {
    width: 6px; /* Thin scrollbar */
}

.categories-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3); /* Slightly transparent */
    border-radius: 3px; /* Rounded edges */
}

.categories-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1); /* Slight transparency */
}

.categories-item{
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 3px;
      text-align: center;
}
.categories-item img{
    user-select: none;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    /* border: 4px solid lightgray; */
    background: -webkit-linear-gradient(to right, #d3cce3, #e9e4f0); /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #d3cce3, #e9e4f0); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    margin-left: 15px;
}

.meal{
    background-color: white;
    margin: 10px 0;
    border-radius: 20px;
    display: flex;
    flex-direction: column; overflow: hidden;
    height: 300px;
    justify-content: space-between;
    box-shadow: 0px 0px 45px 13px rgba(111,177,201,0.75);
    -webkit-box-shadow: 0px 0px 45px 13px rgba(111,177,201,0.75);
    -moz-box-shadow: 0px 0px 45px 13px rgba(111,177,201,0.75);

}

.meal a   {
    width: 100%;
    height: 80%;
}
.meal a img , .fav-meal a img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.random-meals, .favourite-foods, .filtered-meals{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(1,320px);
    justify-content: center;
}

.name-favourite{
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 15px;
}

.name-favourite i{
    color: red;
}

.name-favourite p {
    text-wrap: no;
}




.msg-for-empty-favourite{
    display: flex;
    justify-content: center;
    width: 100%;
}

.empty-favourite{

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

.empty-favourite h3 {
    letter-spacing: 1px;
}

.empty-favourite button {
    letter-spacing: 1px;
    padding: 8px;
    border: none;
    border-radius:10px ;
    background-color: #8D6A9F;
    cursor: pointer;
}






.no-results-found-msg{
    text-align: center;
    margin-top: 20px;
    letter-spacing: 2px;
    font-weight: 400;
}

.searched-recipe{
    display: grid;
    grid-template-columns: repeat(1,90%);
    justify-content: center;
    gap: 10px;
}

.searched-item{
    overflow: hidden;
    display: flex;
    border-radius: 1rem;
    position: relative;
    background: #7F7FD5;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    box-shadow: 0px 0px 45px 13px rgba(111,177,201,0.75);
    -webkit-box-shadow: 0px 0px 45px 13px rgba(111,177,201,0.75);
    -moz-box-shadow: 0px 0px 45px 13px rgba(111,177,201,0.75);
}
.searched-item i{
    position: absolute;
    top: 45%;
    right: 3%;
}
.searched-item a{
    height: 100%;
}

.searched-item div{
    height: 100%;
    display: flex;
    align-items: center;
}

.searched-recipe div p{
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    white-space: normal; 
    overflow: hidden; 
}


.searched-item img{
    height: 100%;
    width: 120px;
}






.recipe{
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    /* background-color: #91EAE4; */
    margin: 20px;
    border-radius: 10px;
    background: #3494E6;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to bottom, #EC6EAD, #3494E6);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to bottom, #EC6EAD, #3494E6); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
   box-shadow: 0px 0px 28px 7px rgba(39,149,190,0.75);
    -webkit-box-shadow: 0px 0px 28px 7px rgba(39,149,190,0.75);
    -moz-box-shadow: 0px 0px 28px 7px rgba(39,149,190,0.75);
    }

.name-img{
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 10px;  
}
.name-img h3{
    letter-spacing: 2px;
}
.name-img img{
    border-radius: 20px;  
}

.ingredients-req p, .instruction p{
    font-size: 13px;
}
.details{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.yt-link img{
    width: 100px;
}



/*


Media Queries


*/

@media (min-width:500px) {
    nav img{
    width: 120px;
    height: 70px;
    }
    .search input {
    padding: 5px 8px;
    width: 200px;
    }
    .search a{
        cursor: pointer;
    }
    .favourites span{
    font-size: 10px;
    }
    .nav-for-search-page input{
        width: 250px;
    }
    .categories-item img{
        height: 80px;
        width: 80px;
    }
    .categories-item span{
        font-size: 13px;
    }
    .titles{
        font-size:14px;
    }

    .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(1,400px);

    }
      .recipe-of-meals{
        display: flex;
        justify-content: center;
    }
    .recipe{
        width: 80%;
    }


    .recipe{
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    margin: 20px;
    
    }
    .recipe h3{
        font-size: auto;
    }

    .name-img{
        gap: 20px;  
        align-items: center;
    }
    .name-img h3{
        letter-spacing: 2px;
    }
    .name-img img{
        width: 300px;
        border-radius: 20px;  
    }

    .ingredients-req p, .instruction p{
        font-size: 14px;
    }
    .yt-link img{
        width: 100px;
    }


}


@media (min-width:650px) {
    nav img{
    width: 140px;
    height: 75px;
    }
    .search input {
    padding: 5px 8px;
    width: 250px;
    }
    .search a{
        cursor: pointer;
    }
    .favourites span{
    font-size: 10px;
    }
   
    .nav-for-search-page input{
        width: 300px;
    }

    .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(1,450px);
    
    }
    .recipe h3{
        font-size: 20px;
    }
    .searched-recipe{
    grid-template-columns: repeat(1,65%);
    gap: 10px;
    }
   .recipe-of-meals{
        display: flex;
        justify-content: center;
    }
    .recipe{
        width: 80%;
    }
    


}




@media (min-width:750px) {
    .nav-for-search-page input{
        width: 330px;
    }

    .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(2,330px);
    gap: 10px;
    }

     .recipe-of-meals{
        display: flex;
        justify-content: center;
    }
    .searched-recipe{
    grid-template-columns: repeat(1,58%);
    gap: 10px;
    }
    .recipe{
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    margin: 20px;
    width: 80%;
    }
    .recipe h3{
        font-size: 18px;
    }

    .name-img{
        gap: 20px;  
        align-items: center;
    }
    .name-img h3{
        letter-spacing: 2px;
    }
   

   
    .yt-link img{
        width: 100px;
    }

}




@media (min-width:900px) {
    nav img{
    width: 150px;
    height: 75px;
    }
    .search input {
    padding: 5px 8px;
    width: 280px;
    }
    .search a{
        cursor: pointer;
    }
    .favourites span{
    font-size: 14px;
    }


    .nav-for-search-page input{
        width: 350px;
    }
    .searched-recipe{
    grid-template-columns: repeat(1,65%);
    gap: 10px;
    }

    .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(2,330px);
    gap: 10px;
    }

  
    

  
    .yt-link img{
        width: 120px;
    }

}








@media (min-width:1100px) {
    


    .nav-for-search-page input{
        width: 400px;
        padding: 9px 7px;
    }
    .searched-recipe{
    grid-template-columns: repeat(1,50%);
    gap: 10px;
    }

    .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(3,280px);
    gap: 10px;
    }

    .categories-item img{
        height: 70px;
        width: 70px;
    }
    .categories-item span{
        font-size: 13px;
    }

    .recipe-of-meals{
        display: flex;
        justify-content: center;
    }

    .yt-link img{
        width: 100px;
    }
    .workspace-wrap{
        width: 100vw;
        display: flex;
        justify-content: center;
        background-color: #edfafe;
        height: fit-content;
    }

    .workspace{
        width: 80vw;
        background-color: #bfe6f4;
    }

}








@media (min-width:1500px) {
    nav img{
    width: 170px;
    height: 95px;
    }
    .search input {
    padding: 7px 8px;
    width: 300px;
    }
    .search a{
        cursor: pointer;
    }
    .favourites span{
    font-size: 14px;
    }
    .categories-item img{
        height: 90px;
        width: 90px;
    }
    .categories-item span{
        font-size: 15px;
    }

    .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(2,450px);
    gap: 10px;
    }

    
     .random-meals, .favourite-foods, .filtered-meals{
    grid-template-columns: repeat(3,330px);
    gap: 10px;
    }
    .recipe-of-meals{
        display: flex;
        justify-content: center;
    }
    .recipe{
    display: flex;
    flex-direction: column;
    padding: 50px;
    gap: 10px;
    margin: 20px;
    width: 60%;
    
    }

    .workspace-wrap{
        width: 100vw;
        display: flex;
        justify-content: center;
        background-color: #edfafe;
    }

    .workspace{
        width: 80vw;
        background-color: #bfe6f4;
    }

}