/* 
    GLOBAL CONFIGS 
*/

* {
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    margin: 0;
    box-sizing: border-box;
}

body {
    background: rgb(244, 244, 244);
}

h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

h3 {
    font-weight: 600;
}

/*************************************************************/


/*
    PRINCIPAL PAGE CONTAINR
*/   

#principal-page-container {
    display: grid;
    grid-gap: .8rem;
    overflow: hidden;
    grid-template-rows: auto 60vh auto;
}

/*************************************************************/


/*
    HEADER
*/   

header {
    text-align: center;
    overflow: hidden;
    position: relative;
    background: white;
    padding: 1.4rem;
    border-radius: 10px;
    margin: 1rem;
    background-image: url("../images/header-image.jpg");
    background-position: center;
    background-size: cover;
    z-index: 1;
    color: white;
    box-shadow: 0px 0px 4px black;
}

header #header-overlay {
    background: linear-gradient(rgba(233, 198, 29, 0.6), rgba(221, 153, 141, 1));
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
}

/* 
    SEARCHED RECIPES
*/

#search-recipes-container {
    background-color: #eac916;
    background: linear-gradient(45deg, #eac916, #dc9696);
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 1rem;
    align-items: center;
    padding: 0 1rem;
    box-shadow: 0px 0px 2px black;
}

#search-recipes-container #search-recipes #search-input {
    padding: .2rem .6rem;
    border-radius: 4px;
    border: none;
    box-shadow: inset 0px 0px 4px black;
}

#search-recipes-container #search-recipes #search-button {
    background: #000000;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 4px;
    border: none;
    color: white;
    box-shadow: 0px 0px 10px 4px white;
}

#search-recipes-container #search-recipes #search-button:hover {
    background: #90a1dd;
    transition: .4s all;
}

#search-recipes-container #saved-recipes-button {
    cursor: pointer;
}

/*
    SAVED RECIPES
*/    

main #saved-recipes-container {
    padding: 1rem;
    background: rgba(144, 161, 221, .8);
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 100vw;
    z-index: 999;
    transition: 1s all;
    display: none;
}

/*************************************************************/


/*
    MAIN SECTION
*/

main {
    background: white;
    position: relative;
    overflow: hidden;
}

/*
    RECIPES LIST SECTION
*/

main #recipes-list-container {
    padding: 1rem;
}

/* SEARCHING LOADER */
#placeholder-div {
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: center;
    height: 300px;
}

#placeholder-div #placeholder-image {
    width: 100px;
}

#placeholder-div #blink-loader{
    width: 100px;
    animation: blink-out 1.5s infinite;
    -webkit-animation: blink-out 1.5s infinite;
}

@-webkit-keyframes blink-out {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes blink-out {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* RECIPES */
.recipe-item{
    display: grid;
    grid-template-columns: 60px auto;
    grid-gap: 6px;
    padding: .2rem;
    border-radius: 6px;
    margin: .8rem .2rem;
    box-shadow: inset 0px 0px 4px 0px;
}

.recipe-item:nth-child(2n) {
    background: #e7e9ec;
    box-shadow: 0px 0px 4px 0px black;
}

.recipe-item:hover {
    /* color: #9c0000; */
    cursor: pointer;
    box-shadow: 0px 0px 10px black;
}

.recipe-item .recipe-image {
    background-size: cover;
    background-position: center;
    width: 60px;
    height: 60px;
    background-image: url('../images/header-image.jpg');
}

.recipe-item .recipe-info {
    overflow: hidden;
}

main #recipes-list-container #recipes-list .recipe-item .recipe-info h3 {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}


/* RECIPES PAGINATION */
.recipes-pagination .pagination-button {
    background: #90a1dd;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 4px;
    border: none;
    color: white;
}

.recipes-pagination .pagination-button:hover {
    background: #6b759a;
}


/* 
    RECIPE CONTAINER 
*/

main #actual-recipe-container {
    position: absolute;
    top: 100vh;
    right: 0;
    bottom: 0;
    left: 0;
    background: white;
    transition: 1s all;
    z-index: 998;
    padding: 1rem;
}

main #actual-recipe-container #recipe-container {
    box-shadow: inset 0px 0px 4px black;
    border-radius: 10px;
}

/* RECIPE HEADER */
main #actual-recipe-container #recipe-container #recipe-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-gap: 1rem;
    padding: 1.4rem 1.4rem .6rem;
    align-items: center;
}

main #actual-recipe-container #recipe-container #recipe-header #close-recipe {
    width: 30px;
    background: #e9c71b;
    border-radius: 50%;
    padding: 4px;
}

main #actual-recipe-container #recipe-container #recipe-header #save-recipe {
    width: 40px;
}

/* RECIPE IMAGE */
main #actual-recipe-container #recipe-container #recipe-image {
    background-image: url('../images/header-image.jpg');
    background-color: #dd9b89;
    height: 140px;
    background-size: cover;
    background-position: center;
    margin: 4px 0;
    box-shadow: 0px 0px 8px black;
}

/* RECIPE INFO */
main #actual-recipe-container #recipe-container #recipe-info {
    padding: 0 1.4rem 1.4rem;
}

main #actual-recipe-container #recipe-container #recipe-info h3 {
    margin-top: 10px;
}

/* Recipe principal info */
main #actual-recipe-container #recipe-container #recipe-info #principal-info {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1rem;
    background: #c1f5b0;
}

main #actual-recipe-container #recipe-container #recipe-info #principal-info p {
    display: flex;
    align-items: center;
}

main #actual-recipe-container #recipe-container #recipe-info #principal-info #recipe-cost {
    width: 40px;
    margin-right: 4px;
}

/* Recipe health info */
main #actual-recipe-container #recipe-container #recipe-info #health-info {
    display: flex;
    justify-content: space-evenly;
    padding: 1rem;
    background: #e4bdb4;
}

main #actual-recipe-container #recipe-container #recipe-info #health-info img {
    width: 40px;
    display: block;
    margin: 0 auto;
}


/* Recipe preparation info */
main #actual-recipe-container #recipe-container #recipe-info #preparation-info {
    text-align: center;
    padding: 1rem;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    background: #f9ed86;
}

main #actual-recipe-container #recipe-container #recipe-info #preparation-info img {
    width: 40px;
    display: block;
    margin: 0 auto;
}

main #actual-recipe-container #recipe-container #recipe-info #preparation-info #ready-in-info {
    margin-top: 20px;
}

/* Recipe ingredients info */
main #actual-recipe-container #recipe-container #recipe-info #recipe-ingredients {
    padding: 1rem;
    background: #d7d3f9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
}

main #actual-recipe-container #recipe-container #recipe-info #recipe-ingredients .recipe-ingredient{
    text-align: center;
    background: beige;
    box-shadow: inset 0px 0px 8px;
    padding: 10px 0;
}

main #actual-recipe-container #recipe-container #recipe-info #recipe-ingredients .recipe-ingredient img {
    height: 50px;
}


/*
    FOOTER
*/

footer {
    background: #e3af58;
    color: white;
    padding: 1rem;
    box-shadow: 0px 0px 4px black;
    margin: 0 1rem;
}