* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*  border: 1px solid black; */
}

:root {
    --meal-border-color: rgb(255, 158, 47);
    --info-border-color: #333;
    --body-color: rgb(56, 56, 116);
    --header-color: lightblue;
    --footer-color: cornflowerblue;
}

.flex-container {
    display: flex;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background-color: var(--body-color);
    display: flex;
    flex-flow: column;
    height: 100%;
}

header {
    background-color: var(--header-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 .2rem;
    flex: 0 1 auto;
}


/* Navigation style  */

#header-logo img {
    padding-top: .2rem;
    height: 40px;
}

nav {
    width: moz-fit-content;
    width: fit-content;
    float: right;
    text-align: right;
}

.nav-item {
    margin: 0 .2rem;
    cursor: pointer;
    font-size: .7rem;
}

.nav-item:hover {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#LOGO {
    max-width: 600px;
    width: 100%;
    height: 80%;
    margin-top: 2rem;
    background-image: url('../images/logo1.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

main {
    text-align: center;
    height: 100%;
    color: black;
    padding-top: .2rem;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1 0 32%;
    /*fill % of space or grow*/
}

main::-webkit-scrollbar {
    display: none;
}

#main-col-div {
    margin: 0 auto;
    width: 98%;
    height: .3rem;
    background-color: var(--info-border-color);
    overflow: hidden;
}

#mid-col-div {
    width: .3rem;
    height: 95%;
    margin-top: .3rem;
    background-color: var(--info-border-color);
    overflow: hidden;
}


/* searchbar desohn */

#searchBar.container {
    margin: 0 auto;
}

#searchBtn {
    margin-left: .3rem;
}


/* search result area */

#searchOutput {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: center;
    height: 80%;
}


/* meal recipe popout in modal */

.meal-container {
    margin-top: 1rem;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: .6rem solid var(--meal-border-color);
}

.meal-container h2 {
    border: 1px solid #333;
    background-color: rgba(250, 235, 215, .6);
    background: linear-gradient(90deg, rgba(250, 235, 215, 0) 0%, rgba(250, 235, 215, .6) 10%, rgba(250, 235, 215, .6) 50%, rgba(250, 235, 215, .6) 90%, rgba(250, 235, 215, 0) 100%);
    width: 90%;
    margin-top: 33%;
    margin-left: 5%;
    border-left: 0;
    border-right: 0;
    padding: .1rem 3rem;
}

.meal-container img {
    cursor: pointer;
    z-index: -2;
}


/* checklist button for ingredients */

.ingredient-list #select-all-btn {
    margin-left: 1rem;
}

input.checkbox {
    margin-right: .5rem;
}

.ingredient-measure {
    margin-left: .5rem;
}

.ingredient-item {
    line-break: strict;
}

#info-columns {
    display: flex;
    height: 100%;
    flex: 0 1 20%;
    /*fill 20% space or shrink/ no grow */
}

#recipeModal .checkbox:hover {
    color: #363636;
}


/* bottom columns in main page */

#left-column,
#right-column {
    flex: 1 1 50%;
    padding: .2rem 1rem;
    height: 100%;
    font-size: .8rem;
    color: blanchedalmond;
    /***    */
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#left-column::-webkit-scrollbar,
#right-column::-webkit-scrollbar {
    display: none;
}

#right-column .nav-item {
    margin: .3rem .2rem;
    font-size: 1rem;
    width: 100%
}

#left-column .checkbox:hover {
    color: blanchedalmond;
}

#right-column .nav-item:hover {
    text-shadow: none;
}

#right-column #fav-nav:hover {
    background-image: url('../images/favicon.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}


/* button styling */

.is-pink {
    background-color: rgb(222, 163, 226);
    border-color: transparent;
}

.is-purple {
    background-color: rgb(145, 92, 206);
    border-color: transparent;
}

footer {
    background-color: var(--footer-color);
    position: static;
    padding: 0 .3rem;
    flex: 0 1 auto;
    /*fit to content*/
}

header,
#main-col-div,
#mid-col-div,
footer {
    border-radius: .23rem;
}

header,
#main,
#main-col-div,
#info-columns,
#footer {
    width: 100%;
    margin: 0 auto;
}


/* favelist button styling */

.favMealName {
    margin: .3rem .2rem;
}


/* ADD SOME LOVE */

.love {
    background-image: url('../images/favicon.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    width: 1rem;
}

button.fave {
    background-image: url('../images/favicon-blank.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: 1.6rem;
    height: 1.5rem;
    float: right;
    position: relative;
    top: .1rem;
    right: 1rem;
    border: none;
    background-color: transparent;
}

button.fave.is-fav {
    background-image: url('../images/favicon.png');
}

button.favMealName {
    width: 99%;
    height: auto;
    white-space: pre-wrap;
    /* CSS3 */
    white-space: -moz-pre-wrap;
    /* Firefox */
    white-space: -pre-wrap;
    /* Opera <7 */
    white-space: -o-pre-wrap;
    /* Opera 7 */
    word-wrap: break-word;
    /* IE */
    background-image: url('../images/favicon.png');
    background-position: 97%;
    background-repeat: no-repeat;
    background-size: 30px;
}


/* gocery list */


/* SIDE BAR STYLING */

#grocerylist {
    height: 100%;
    /* 100% Full-height */
    width: 250px;
    /* 0 width - change this with JavaScript */
    /* think we should slide its position and not change its width so i changed it -dave */
    position: absolute;
    /* Stay in place and take it out of normal DOM Flow*/
    z-index: 1;
    /* Stay on top */
    top: 0;
    /* Stay at the top */
    left: -250px;
    /* here is where it is slid off screen */
    background-color: grey;
    /* Black*/
    overflow-x: hidden;
    /* Disable horizontal scroll */
    transition: 0.5s;
    /* 0.5 second transition effect to slide in the sidenav */
    padding-top: 0;
    background-color: rgb(245, 240, 167);
}

#grocerylist label {
    text-decoration: none;
    font-size: 25px;
    color: white;
    display: block;
    padding: 0 0 0 .3rem;
    width: 100%;
    color: #333;
    padding-left: 2.1rem;
    text-indent: -2.1rem;
}

#grocery-list-close {
    float: right;
    margin: .2rem;
}

#grocerylist-list {
    margin-top: 1rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#grocerylist-list div.div {
    text-align: center;
    border-top: 2px solid #333;
    margin-top: .4rem;
}


/* auto indents long named multi line grocery items */

#grocerylist label {
    padding: 0 0 0 .3rem;
    width: 100%;
    color: #333;
    padding-left: 2.1rem;
    text-indent: -2.1rem;
}

input.grocery-list-item {
    opacity: 0;
    display: none;
}

label.grocery-list-item.deletable::before {
    content: '🚫 ';
}

label.grocery-list-item.deletable {
    color: red !important;
}

label.grocery-list-item::before {
    content: '⛔ ';
}

#grocerylist-list input:checked+label::before {
    content: '✅ ';
}

#grocery-list-remove,
#grocery-list-add {
    margin-top: .2rem;
}

#grocery-list-remove {
    margin-left: .3rem;
}

#add-grocery-item {
    display: none;
    opacity: 0;
    z-index: 2;
    width: 99%;
    position: absolute;
    top: 2rem;
    left: 0;
    transition: all .4s;
}


/*** POP MODAL STYLING ***/

#popModal footer.modal-card-foot {
    justify-content: flex-end;
}


/* Modal styling */

.modal-card-title {
    flex-shrink: 1;
}

#recipeModal .ingredient-list button {
    margin-left: 1.1rem;
}

#recipeModal img,
#drinkDetails img {
    width: 45%;
    margin-left: 0%;
    display: inline-block;
    vertical-align: top;
}

.ingredient-list {
    display: inline-block;
    margin-left: .5rem;
}

#recipeModal .ingredient-list {
    margin-left: .5rem;
    width: 53%;
}


/** Contrast in button text for accessability */

.button.is-primary,
.button.is-info,
.button.is-warning,
.button.is-pink {
    color: #1F1F1F;
}

.button.is-purple {
    color: #000;
}


/* */


/* Responsive styling */


/* for better formatting in a landscape aspect ratio */

@media screen and (max-height: 550px) {
     :root {
        font-size: 89%;
    }
    #searchBar.container * {
        font-size: .6rem;
    }
    #LOGO {
        margin-top: .2rem;
    }
    .nav-item.button,
    button.favMealName {
        font-size: .6rem !important;
        margin: .1rem .1rem !important;
    }
}

@media screen and (min-width: 980px) {
    header nav .nav-item {
        font-size: 1rem;
    }
    header nav .nav-item:last-child {
        margin-right: 1rem;
    }
}


/* smaller screens no room for pic and ingredients side by side*/

@media screen and (max-width: 550px) {
    #recipeModal .ingredient-list,
    #drinkModal .ingredient-list {
        /* add space on the top of ingredients */
        margin-top: .3rem;
        /* make wider to take up it's own line */
        width: 90%;
    }
}


/* smallest of screens need smaller font size*/

@media screen and (max-width: 425px) {
     :root {
        font-size: 89%;
    }
}