* { margin: 0; padding: 0; box-sizing: border-box; }

* {
    font-family: 'Nunito';
}

:root {
    --cream: #F7F1E8;
    --cast-iron: #2E261C;
    --cacao: #A8570C;
    --paper: #FFF9F1;
    --ash: #888;
    --oak: #8B5E34;
    --blank: #FFF;
}

h1 {
  font-family: "Playwrite US Trad";
  font-size: 1.8em;
  color: var(--cacao);
}

h1 * {
    font-family: "Playwrite US Trad";
}

h2, h3, h4, h5, h6 {
  font-family: "Playwrite US Trad";
  font-size: 1.25rem;
  color: var(--cacao);
}

textarea {
    resize: vertical;
    width: 100%;
}

form.login, form.login button, form.login input {
    font-size: 1.25rem;
}

form.login {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem;
    width: calc(700px - 1rem);
}

div.login-field {
    font-size: 1.25rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
}

div.login-field input {
    padding: .25rem;
    width: calc(80% - 1rem);
}

div.login-field label {
    width: calc(20% - 1rem);
}

div.login-button {
    display: flex;
    justify-content: center;
}

div.login-button button {
    width: 50%;
    min-width: 200px;
}

body {
    background-color: var(--cream);
    color: var(--cast-iron);
    display: flex;
    max-width: 700px;
    align-items: flex-start;
    margin-left: .5rem;
    margin-right: .5rem;
    flex-direction: column;
}

div.show-passfields {
    display: flex;
    flex-direction: row;
    gap: .5rem;
    align-items: center;
    justify-content: space-between;
}

label#showPass {
    font-size: .5rem;
}

html {
    font-size: 18px;
}

section {
    margin: .5em;
    max-width: inherit;
}

section.cook-info {
    line-height: 1.25;
}

section.cook-info h2 {
    padding: .5rem;
}

section#cook-desc {
    margin-bottom: 2rem;
    flex-grow: 2;
}

a {
    color: var(--oak);
    text-decoration: none;
}

output.error-message {
    color: red;
}

div.error-listing {
    display: flex;
    flex-direction: column;
}

div.recipe-upload-area {
    margin-bottom: 1rem;
}

a:hover {
    color: var(--cacao);
    text-decoration: underline;
}

main {
    background-color: var(--paper);
    border: 0.1em solid var(--ash);
    border-radius: 20px;
    border-bottom: none;
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
    padding: 1rem;
    max-width: 700px;
}

nav ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

article {
    box-shadow: 0px 3px 5px var(--ash);
    border-radius: 10px;
    border-spacing: 5px;
}

a#sign-in, a#cookbook {

    border: 1px solid var(--oak);
    background-color: var(--oak);
    color: var(--cream);
    border-radius: 20px;
    padding: .5em 1em;
    margin-bottom: 2rem;
}

a#sign-in:hover, a#cookbook:hover {
    color: var(--paper);
    background-color: var(--cacao);
}

div.recipe-info {
    display: flex;
    max-width: inherit;
    flex-direction: row;
    gap: 1rem;
}

div#editRecipeFields {
    display: flex;
    flex-direction: row;;
    justify-content: space-between;
}

textarea.stepDesc {
    vertical-align: top;
}

input#recipeTitleField{
    font-size: 1.8em;
    font-family: "Playwrite US Trad";
    color: var(--cacao);
}

input[type=number]{
     width: calc(1 * 1ch + 2rem);
}

.unitInput {
    width: 4rem;
}

#saveButton{
    height: 1.8rem;
}

img#recipe-photo {
    transform: rotate(2deg);
    border: 5px solid var(--blank);
    border-radius: 3px;
    max-width: inherit;
    margin-bottom: .5rem;
    width: 10rem;
    flex-grow: 1;
}

div.recipe-instructions {
    display: flex;
    flex-direction: row;
}

header {
    margin-bottom: 3rem;
    display: flex;
    width: 100%;
    flex-direction: column;
}

header div.header-top {
    border-bottom: 3px solid var(--oak);
    flex-direction: row;
    display: flex;
    width: 100%;
}

header div.header-top div.profile-info {
    flex-direction: row;
    display:flex;
    gap: 1rem;
    align-items: flex-end;
    justify-content: flex-end;
    margin-left: auto;
}

header div.header-bottom {
    display: flex;
    flex-direction: row;
    align-items: space-between;
}

header div.header-bottom form {
    margin-top: .25rem;
    margin-left: auto;
}

header div.header-bottom form input, header div.header-bottom form button {
    padding: .25rem;
}

ul {
    list-style-type: none;
}

header.recipe-header {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
}

header.recipe-header ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
}

section.cook-info ul {
    padding-left: 1rem;
    text-indent: -1rem;
}

section.cook-info ol {
    padding-left: 1em;
}

dl {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

dt {
    display:flex;
    flex-grow: 1;
    width: 25%;
    justify-content: center;
    font-weight: 600;
    padding-right: 1rem;
}

dd {
    margin-bottom: .25rem;
    width: calc(75% - .5rem);
    flex-grow: 3;
}

div.index-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

div.recipe-list {
    margin-top: 1rem;
}

div.recipe-list ul{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

div.recipe-list ul li {
    width: calc(34% - 1rem);
    display: flex;
}

div.recipe-list ul li a, div.recipe-list ul li h3 {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: .5rem;
    display: flex;
}

div.recipe-list ul li img {
    width: calc(100% - 1rem);
}

article ul.tags{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-start;
}

article ul.tags li {
    display: flex;
    text-wrap: nowrap;
    width: auto;
    padding: 0;
}

input#recipeSearch {
    width: 100%;
    padding: .25rem;
}

div.profile {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

div.profile img {
    width: 5rem;
    height: 5rem;
}

div.profile-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-bottom: 1rem;
}

#steps ol li ul li {
    list-style-type: circle;
    padding-left: 1.5rem;
    padding-top: .25rem;
}

#steps ol li ul {
    margin-bottom: 1rem;
}

.visually-hidden {
    display: none;
}

@media (max-width: 700px) {

    form.login {
        flex-direction: column;
    }

    div.login-field {
        flex-direction: column;
        gap: 0;
    }

    div.login-field label {
        width: auto;
        margin-bottom: 1rem;
    }

    div.login-field input {
        width: calc(100% - 1rem);
    }
}

@media (max-width: 600px) {

    div.recipe-list ul li {
        width: calc(50% - 1rem);
    }
}

@media (max-width: 500px) {

    div.recipe-info, div.recipe-info a {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }

    img#recipe-photo {
        width: calc(80% - 1rem);
        margin-left: 10%;
    }

    div.recipe-instructions {
        flex-direction: column;
        gap: 2rem;
    }

    body {
        padding: 0;
        margin: 0;
    }

    main {
        border-left: none;
        border-right: none;
    }

    header {
        padding: .5rem;
    }
}

@media (max-width: 400px) {

    div.recipe-list ul li {
        width: calc(100% - 1rem);
    }

}

