/* CUSTOM FONT */
/* Imports font from local folder */
@font-face {
    font-family: "Quiapo";
    src: url('/fonts/Quiapo/QuiapoFree2-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Sets display settings for main cookbook page container */
#cookbook-pages-container {
    width: 92%;
    margin: 30px auto;

    outline: solid 2px #01407e;
    border-radius: 6px;
}


/* Formats links to cookbook subpages */
.cookbook-pages {

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 100% auto;
    grid-template-areas: 
        "all-recipes submit-recipes spacer"
        "page-content page-content page-content";
}

.cookbook-page-links {
    padding: 12px 30px;
}

.cookbook-page-links {

    font-family: 'Quiapo', 'Trebuchet MS', Arial, sans-serif;
    font-weight: normal;
    font-size: 1.3rem;
    color: #01407e;
    text-decoration: none;
    text-transform: uppercase;
    text-align: left;
}

.cookbook-page-links:hover {
    background-color: #fddf05;
}

/* sets grid location and borders of subpage links*/
#all-recipes-link {
    grid-area: all-recipes;

    border-right: solid 2px #01407e;
}

#submit-recipes-link {
    grid-area: submit-recipes;

    border-right: solid 2px #01407E;
}

#spacer {
    grid-area: spacer;
}


/* edits display of subpage contents*/
#page-content {
    grid-area: page-content;

    padding: 15px 30px;

    display: flex;
    flex-direction: row;
    gap: 50px;
}

.cookbook-recipes {
    flex-grow: 2;
}

.cookbook-recipes h1 {
    font-size: 2.2em;
}

.recipe-types, input[type=submit] {
    border: solid #01407E 2px;
    border-radius: 8px;
    background-color: #fddf05;
    margin-top: 15px;
    padding: 10px 28px;
    display: inline-block;

    font-family: 'Quiapo', 'Trebuchet MS', Arial, sans-serif;
    font-size: 1.2em;
    color: #01407E;
    text-transform: uppercase;

    /*button animation*/
    transition: background-color 0.2s ease-in-out;
}

.recipe-types:hover, input[type=submit]:hover {
    background-color: #01407E !important;
    color: #fddf05 !important;

}

#search-notice {
    margin-top: 20px;
}

#search-notice span {
    font-weight: bold;
    font-style: italic;
    color: rgb(125, 57, 8);
}

.recipe-sections {
    display: none;
    width: 100%;
}

.recipe-sections:not(:first-of-type) {
    margin-top: 40px;
}

/* adjusts layout of recipe cards*/
.recipe-sections-cards {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* formats individual cookbook recipe cards */
.cookbook-recipe-cards {

    flex-grow: 1;
    height: auto;
    max-width: 200px;
    margin: 10px 15px;

    border: solid 2px #01407E;
    border-radius: 4px;

    background-color: rgb(252, 239, 220);
}

.cookbook-recipe-cards img {
    width: 100%;
    height: 160px;

    border-bottom: solid 2px #01407E;

    object-fit: cover;
}

.cookbook-recipe-cards h3 {
    padding: 10px 20px;

    font-size:x-large;
}


/* Recipe card tags */
.recipe-tags {
    padding: 0px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    row-gap: 6px;
}
.recipe-tags span {
    border: solid 2px #880223;
    border-radius: 20px;
    margin-right: 3px;
    padding: 3px 12px;

    font-family: 'Quiapo', 'Trebuchet MS', Arial, sans-serif;
    font-size: .8em;
    color: #880223;
    text-transform: uppercase;

    background-color: #fddf05;
}

.recipe-short-description {
    padding: 25px 20px;

    display: flex;
    flex-direction: column;
    gap: 8px;

    font-size: small;
}

.recipe-button {
    padding: 0px 20px 20px;
}

.recipe-buttons {
    margin: 0;
    width: 100%;

    font-size: 1em;
}


#recipe-view {
    width: 100%;
    
    display: none;
    flex-basis: 2;

    border: solid 2px #01407E;
    border-radius: 8px;
}

#close-view {
    margin: 5% 5% 2%;
}

#recipe-view iframe {
    width: 100%;
    height: 85%;

    border-radius: 8px;
}


/* styling request a recipe form page */
.request-recipes {
    width: 100%;
    margin: 0 auto;
}

.form-info {
    margin-bottom: 25px;
}

.form-columns-container {
    margin: 20px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;

}

.form-columns {
    flex-grow: 1;
}

input[type=text], input[type=email], textarea, #search {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 24px;
    padding: 10px;
    box-sizing: border-box;

    font-size: 1.4rem;
    color: #01407E;

    background-color: rgb(252, 239, 220);
    border: solid 2px #01407E;
    border-radius: 6px;
}

.category, .restrictions {
    padding-left: 15px;

    font-family: Helvetica, sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
}


textarea {
    width: 100%;
    height: 250px;
    resize: none;
}

input[type=submit] {
    margin-bottom: 30px;
    float: right;
}

/* display adjustments for smaller screens */
@media (max-width: 900px) {
    .cookbook-pages {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .cookbook-page-links {
        font-size: 1em;
    }

    #submit-recipes-link {
        border-right: none;
    }

    #page-content {
        flex-direction: column-reverse;
    }

    .recipe-types {
        padding: 10px 20px;
        font-size: 1em;
    }

    .cookbook-recipe-cards {
        width: 100%;
    }

    #recipe-view {
        width: 100%;
        height: 800px;
    }

    .form-columns-container {
        flex-direction: column;
        gap: 20px;
    }

}