/* Styling the food modal */

/* 
    Styling source from w3schools:
    https://www.w3schools.com/howto/howto_css_modals.asp
*/

#food-modal {
    display: none;
    font-family: Arial, Helvetica, sans-serif;
    position: fixed; 
    z-index: 1; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
}
  
/* Modal Content */
.modal-content {
    position: relative;
    background-color: #f4f4f4;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* Add Animation */
@-webkit-keyframes animatetop {
    from {top:-500px; opacity:0} 
    to {top:0; opacity:1}
}

@keyframes animatetop {
    from {top:-500px; opacity:0}
    to {top:0; opacity:1}
}
  
#food-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: #ff0000;
    color: white;
}


#food-modal h2 {
    font-size: 30px;
    font-weight: 900;
}


#get-meal {
    background-color: #5bc0de;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

#get-meal:hover,
#get-meal:focus {
    opacity: 0.8;
}

/* The Close Button */
.close {
    color: white;
    font-size: 30px;
    font-weight: 700;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #5bc0de;
    text-decoration: none;
    cursor: pointer;
}


/* styling the modal body and content  */
.modal-body {
    padding: 5px 16px;
    overflow: auto;
    height: 80vh;
}

.modal-body .caption {
    display: grid;
    grid-template-columns: auto auto;
    padding: 10px;
    margin: 15px auto 20px;
}

.caption img {
    width: 300px;
    height: 300px;
    margin: auto;
}

.info .ingredients h4 {
    margin: 10px 0;
}

.info .ingredients ul {
    padding-left: 15px;
}

#food-modal .instructions {
    margin-bottom: 25px;
}

#food-modal h3 {
    margin-bottom: 10px;
}


.video-wrapper {
    position: relative;
    width: 400px;
    height: 300px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* ========= Responsive design with media queries ============== */

@media screen and (max-width: 890px) { 
    .caption .info {
        margin-left: 10px;
    } 
}

@media screen and (max-width: 560px) { 
    #food-modal .modal-header h2 {
        font-size: 4vw;
    }

    #food-modal #get-meal {
        font-size: 12px;
        padding: 5px;
        border-radius: 1px;
    }

    .modal-body .caption {

        grid-template-columns: auto;
        
    }

    .thumbnail img {
        display: block;
        margin: 0 auto 10px;
    }

}

@media screen and (max-width: 450px) { 
    #food-modal #get-meal {
        font-size: 11px;
    }

    #food-modal iframe {
        margin: auto;
        width: 300px;
    }
}
  
