/* Global changes to all pages on website */

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}


main {
    flex: 1;
    background-color: #ffffff;
    font-family:  "Inter", Consolas, "Courier New", monospace;
}


/* Layout for the header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;            
    padding: 10px 20px;
}

/* Layout for the COOKING WITH GLENN title */
.homepagetitle {

    font-family: "Chango", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #ffffff;
    background-color: #083874;
    
}

.homepagetitle a {
    color: inherit;
    text-decoration: none;
}

/* Navigation to the other apges via the header */
nav {
    text-align: center;
    margin: 0;
}

nav a {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    background-color: #083874;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
}

nav a:hover {
    background-color: #083874;
    color: orange;
}

/* Layout for the footer */
.websiteFooter {
    display: block;
    text-align: center;
    padding: 20px;
    color: #f5f5f5;
    background-color: #083874;
    
}

/* COOKING WITH GLENN in the footer thats slightly smaller */
.footertitle {
    font-family: "Chango", sans-serif;
    font-weight: 400;
    font-size: 25px;
    font-style: normal;
}

/* Buttons that link to the other pages via the footer */
.navFooter a {
    display: inline-block;
    margin: 5px 10px;
    font-size: 15px;
    padding: 5px 10px;
    background-color: transparent;
    color: #b3b3b3;
    text-decoration: none;
}

/* Font change for the name, student number and copyright disclaimer  */
.studentcopyrightInfo {
    font-size: 12px;
    font-family:  "Inter", Consolas, "Courier New", monospace;
    background-color: transparent;
    color: #b3b3b3;

}

/* 'Welcome' header of the homepage  */
.homepageIntro h2 {
    font-size: 35px;
    text-align: center;
}

/* The small intro paragraph under Welcome */
.homepageIntro p {
    font-size: 23px;
    max-width: 800px;
    padding: 20px;
    margin: 0 auto;     
}

/* Exclusive to the 'featured' recipe section of the homepage */
.featured .mango-card,
.featured h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Change font and alignment for both homepage and recipe list */
.mango-card h3 {
    text-align: center;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
}
/* Create 'block' border around the image  */
.mango-card {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    border-radius: 5px;
    overflow: hidden;
}

/* Remove blue hyperlink look when you previously clicked on it */
.mango-card a {
    color: inherit;
    text-decoration: none;
}

/* Hover effect when user puts mouse over it */
.mango-card:hover {
    transform: translateY(-5px);
    transition: 0.2s;
}

/* Create blue border around the bottom text included in the mango card */
.mango-card h3 {
    background-color:#083874;
    color: white;
}
/* Same thing as the mango-card but for the coming soon cards  */
.tbd-card {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    border-radius: 5px;
    overflow: hidden;
}

.tbd-card a {
    color: inherit;
    text-decoration: none;
}

.tbd-card:hover {
    transform: translateY(-5px);
    transition: 0.2s;
}

.tbd-card h3 {
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    background-color:#083874;
    color: white;
}

/* Less opacity to indicate that it's not available (but will be coming soon) */
.tbd-card figure {
    opacity: 0.4;
}

/* Align the heading 'Rhonda's Spicy Mango Chutney and
 the author + dates to the centre of page */
.recipeheading {
    background-color: #083874;
    text-align: center;
}
/* heading 'Rhonda's Spicy Mango Chutney' reformat */
.recipeheading h2 {
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-weight: 700;
    font-size: 40px;
    margin-bottom: 10px;
    color: #ffffff;
}

.authorDate {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 14px;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    color: #dbdbdb;
    margin-bottom: 15px;
}

/* Flex container so that both jump to and print recipe are on 1 line */
.recipeGet {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Makes the button blend in with the blue background + 
removes ugly hyperlink look when its been clicked */
.recipeGet a,
.recipeGet button {
    cursor: pointer;
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 15px;
    font-weight: 600;
    background-color: #083874;
    color: #ffffff;
    text-decoration: none;
    border: none;
}

/* Makes the button clearer with an orange text colour when the user
hovers over it */
.recipeGet a:hover,
.recipeGet button:hover {
    background-color: #083874;
    color: orange;
}

/* Centre all the content and condense it to the middle */
.chutneyMethod,
.chutneyNotes,
.chutneyIngredients,
.storageNotes,
.chutneyBackground {
    max-width: 750px;
    margin: 0 auto;
}

/* Heading size adjustment (clarity purposes) */
.chutneyMethod h3,
.chutneyNotes h3,
.chutneyIngredients h3,
.storageNotes h3,
.chutneyBackground h3 {
    font-size: 20px;
}

.chutneyIngredients ul,
.chutneyMethod ol {
    padding-left: 20px;
    margin: 0;
}

/* Create border box for the quick-print recipe. If user just wants
the recipe and method it jumps to this box */
.printableRecipe {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #ececec;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
}

.printableRecipe h3 {
    text-align: left;
    margin-top: 20px;
    font-size: 16px;
}

.printableRecipe ol, ul {
    padding-left: 20px;
}

.printIngredients h3,
.printMethod h3,
.printNotes h3 {
    font-size: 17px;
}

/* Turn ingredients list to 2 rows instead of 1 top to bottom list */
.printIngredients ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    font-size: 14px;
}

.printMethod ol,
.printNotes ul {
    font-size: 14px;
}

.printableRecipe li {
    margin-bottom: 6px;
    line-height: 1.5;
}


.printHeading h2 {
    text-align: center;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 25px;
    font-weight: 700;
}

.printSummary,
.printHeading p {
    font-family: "Inter", Consolas, "Courier New", monospace;
    font-size: 14px;
    text-align: center;
    font-weight: 350;
}

.printableChutneyimage {
    display: flex;
    justify-content: center;
}

/* submitRecipe.htm uses fieldset elements
this is just to format the size of text and positioning */
fieldset {
    margin-top: 20px;
    padding: 20px;
}

fieldset label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}


legend {
    padding: 0 10px;
    font-weight: 700;
}


/* Red asterisk so it's clearer which fields are mandatory */
.requiredInput {
    margin-left: 1px;
    color: red;
}

.wraptoInput {
    display: inline-block;
}

/* Create border for both question and answer tables */
.QandA table {
    max-width: 900px;
    margin: 30px auto;
    border-collapse: separate;
    border-spacing: 0 20px;
}

.QandA td, th {
    vertical-align: top;
    padding: 15px;
}

.QandA tbody tr {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
}

/* Darker background and bolder text makes the separation between
question and answer easier to see */
.QandA tbody td:first-child {
    width: 35%;
    font-weight: 700;
    background-color: #e9eef7;
}

/* Make answers stand out */
.QandA tbody td:last-child {
    width: 65%;
    background-color: #ffffff;
}

/* Prompt the user to print on the quick guide with only the relevant
info. None of the fluff from the actual page */
@media print {

    /* Hide everything besides the printable recipe section */
    header,
    .chutneyBackground,
    .recipeGet,
    .navFooter,
    .chutneyEquipment,
    .chutneyIngredients,
    .chutneyMethod,
    .storageNotes,
    .printSummaryimage,
    .chutneyNotes,
    .websiteFooter,
    .printHeading h2 {
        display: none !important;
    }

    /* Reset spacing */
    body {
        max-width: 800px;
        padding: 0;
    }
}
