* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: "Nunito", sans-serif;
    font-size: 18px;
    background-color: #F7F1E8;
}

#brand {
    font-family: "Playwrite US Trad", serif;
    font-size: 125%;
    font-weight: 600;
    color: #8B5E34;
}

a {
    text-decoration: none;
    color: #8B5E34;
}

a:hover {
    text-decoration: underline;
    color: #A8570C;
}

h1 {
    font-family: "Playwrite US Trad", serif;
    font-size: 180%;
    color: #A8570C;
}

h2 {
    font-family: "Playwrite US Trad", serif;
    font-size: 125%;
    color: #A8570C;
}

a h2 {
    font-size: 100%;
}

ul {
    list-style: none
}

ul.step-ingredient-details {
    list-style: circle;
    margin-left: 1rem;
}

ul.step-ingredient-details li{
    padding: 0.25rem;
}

main {
    background-color: #FFF9F1;
    border-top: 1px solid #888;
    border-left: 1px solid #888;
    border-right: 1px solid #888;
    border-bottom: none;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    width: 100%;
    max-width: 700px;
    padding: 1rem;

    display: flex;
    flex-direction: column;
}

main section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}


body {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding-left: .5rem;
    padding-right: .5rem;
}

header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    max-width: 700px;
    padding-bottom: 3rem;
}

label a {
    font-size: inherit;
}

#brand-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 3px solid #8B5E34;
    width: 100%;
    max-width: 700px;
}

#index-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 0;
}

#active-user {
    font-size: 125%;
}

#header-links {
    display: flex;
    flex-wrap: wrap;
}

#header-links a {
    padding-right: 1rem;
    font-size: 125%;
    text-wrap: nowrap;
}

dl div {
    display: flex;
    padding-bottom: .5rem;
}

section dt {
    font-weight: 600;
    padding-right: .5rem;
}

#edit-recipe-times div {
    display: flex;
    align-items: center;
}

.recipe-details {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

@media (max-width: 500px) {
    .recipe-details {
        flex-direction: column;
    }
}

.recipe-details section {
    line-height: 1.25;
    padding-bottom: 2rem;
}

.recipe-details section h2 {
    padding-bottom: .5rem;
}

#profile-info {
    display: flex;
    justify-content: space-between;
}

.profile-metadata {
    padding-right: 1rem;
    text-wrap: nowrap;
}

#profile-image {
    width: 5rem;
    height: 5rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: .25rem;
    width: 100%;
    max-width: 700px;
}

.index-main-button {
    background-color: #8B5E34;
    color: #F7F1E8;
    border-radius: 25px;
    padding: .5em 1em;
    text-wrap: nowrap;
}

.index-main-button:hover {
    color: #FFF9F1;
}

.recipe-tags::before {
    content: "#";
    color: #888;
}

.recipe-tags {
    gap: .5rem;
    text-wrap: nowrap;
}

#recipe-main {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

@media (max-width: 500px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }

    main {
        border-left: 0px;
        border-right: 0px;
        border-top-left-radius: 0px;
        border-top-right-radius: 0px;
    }

    #recipe-main {
        flex-direction: column;
    }
}

#recipe-metadata {
    display: flex;
    flex-flow: row wrap;
    font-size: 125%;
}

#recipe-metadata label {
    padding-right: 1.5rem;
}

#recipe-image {
    transform: rotate(2deg);
    padding-bottom: .5rem;
    max-width: 100%;
    max-height: 100%;
}

#recipe-image-input {
    font-size: 80%;
    width: 100%;
    padding: 0.5rem;
}

#recipe-ingredients ul {
    padding-left: 1rem;
    text-indent: -1rem;
}

#recipe-steps ol {
    padding-left: 1rem;
}

#recipe-times {
    flex-grow: 1;
    flex-basis: 0;
}

#recipe-description {
    flex-grow: 2;
    flex-basis: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-content: flex-start;
    gap: 1rem;
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 400px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.card-image {
    width: 100%;
}

.recipe-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0px 5px 5px #888;
    padding: .5rem;
    width: 100%;
}

.recipe-card ul {
    display: flex;
    flex-wrap: wrap;
}

.recipe-card li {
    padding-right: 0.25rem;
}

input,
button,
a,
.login {
    font-size: 125%;
    gap: .25rem;
}

.search-text-entry,
.login-text-entry,
button {
    size: 125%;
    border-radius: 5px;
}

#login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
}

#login-form button {
    align-self: center;
}

#login-form-inputs {
    display: flex;
    flex-direction: row;
    justify-content: baseline;
    gap: 1rem;
}

#login-form-inputs div {
    padding-bottom: 1rem;
    flex: 1;
}

@media (max-width: 500px) {
    #login-form-inputs {
        flex-direction: column;
    }
}

#login-button {
    width: 50%;
    padding: .25rem;
    min-width: 200px;
}

.login-text-entry {
    display: flex;
    padding: .25rem;
    width: 100%;
    align-self: flex-end;
}

.search-text-entry {
    width: 70%;
    max-width: 250px;
}

.search {
    display: flex;
    justify-content: flex-end;
}

.visually-hidden {
    display: none;
}

#save-button, #edit-button {
    align-self: flex-start;
    justify-self: flex-end;
    font-size: 1rem;
    width: 3rem;
    height: 2rem;
}

#recipe-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

#recipe-title-input {
    font-family: "Playwrite US Trad", serif;
    font-weight: 600;
    font-size: inherit;
    color: #A8570C;
    width: 100%;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    vertical-align: top;
    font-size: inherit;
    border-radius: 5px;
}

.step {
    display: flex;
    flex-direction: column;
}

#prep-time-input, #cook-time-input, #total-time-input, #yield-input {
    width: 4rem;
    font-size: 75%;
    padding: 0.25rem;
    border-radius: 5px;
}

.ingredient-amount-input {
    width: 20%;
    padding: 0.25rem;
    border-radius: 5px;
    font-size: 80%;
}

.ingredient-unit-input {
    width: 25%;
    padding: 0.25rem;
    border-radius: 5px;
    font-size: 80%;
}

.ingredient-name-input {
    width: 50%;
    padding: 0.25rem;
    border-radius: 5px;
    font-size: 80%;
}

#steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#edit-errors {
    background-color: lightcoral;
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

#make-public-button {
    justify-self: center;
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
}