* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Responsive design for screens smaller than 500px */
/* FILL IN */
@media (max-width: 500px) {

    .recipe-des-info,
    .recipe-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .recipe-des-info>div,
    .recipe-content>div {
        flex-grow: unset;
        flex-shrink: unset;
        flex-basis: auto;
        width: 100%;
    }

    body {
        margin: 0;
    }

    main {
        border-left: none;
        border-right: none;
    }

    header {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

}

/* Main styles */
html {
    font-size: 18px;
    font-family: "Nunito Sans", sans-serif;
    color: #2E261C;
}

body {
    background-color: #F7F1E8;
    display: flex;
    flex-direction: column;
    margin: 0.5rem;
    max-width: 700px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

main {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: #FFF9F1;
    border: 1px solid #888;
    border-radius: 40px;
    border-bottom: none;
    border-bottom: none;
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
    width: 100%;
    margin-top: 3rem;
}

header {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.header-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.header-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.header-bottom nav ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.header-bottom form {
    display: flex;
    padding: 0.25rem;
    gap: 0.25rem;
}

/* Header and text styles */
h1 {
    font-size: 1.25em;
    font-family: "Playwrite US Trad", serif;
    color: #A8570C
}

h3 {
    display: flex;
    font-size: 1.25em;
    font-family: "Playwrite US Trad", serif;
    color: #A8570C;
    padding-bottom: 0.5rem;
}

h2 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    font-size: 1.80em;
    font-family: "Playwrite US Trad", serif;
    font-weight: bold;
    color: #A8570C;
}

/* Recipe and edit page styles */
#title {
    flex: 1;
    margin-right: 1rem;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    text-align: left;
}

.recipe {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.auth-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.recipe-tags ul {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.info {
    display: flex;
    flex-direction: row;
    padding: 0.25rem;
    gap: 1rem;
}

.info-list {
    display: flex;
    flex-direction: column;
}

dt {
    display: flex;
    font-weight: 600;
}

dd {
    display: flex;
}

.recipe-des-info {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.des-photo {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1rem;
}

.des-photo .description label {
    display: block;
    margin-bottom: 0.5rem;
}

.des-photo .description textarea {
    width: 100%;
    height: 8rem;
    line-height: 1.25em;
}

.recipe-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.des-photo>div:first-child,
.recipe-content>div:first-child {
    width: calc((100% - 1rem) / 3);
}

.des-photo>div:last-child,
.recipe-content>div:last-child {
    width: calc(2 * (100% - 1rem) / 3);
}

/* Ingredients and steps styles */
.ingredients {
    line-height: 1.25em;
    padding-left: 1rem;
    text-indent: -1rem;
    width: 75%;
}

.steps {
    line-height: 1.25em;
    display: flex;
    padding-left: 1em;
}

.steps ol {
    padding-left: 1em;
}

ul {
    list-style-type: none;
    padding-left: 1em 40px;
}

.steps textarea {
    width: 100%;
}

.steps li ul {
    list-style: circle;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: 1.5rem;
}

.steps li ul li input[name*="_amount"] {
    width: 4rem;
    text-align: right;
}

.steps li ul li input[name*="_unit"] {
    width: 5rem;
    text-align: left;
}

.steps li ul li input[name*="_name"] {
    flex: 1;
    min-width: 10rem;
}

output {
    color: red;
}

/* Login form styles */
#input {
    font-size: 1.05em;
    font-family: "Nunito Sans", sans-serif;
    padding: 0.25rem;
}

form.login {
    font-size: 1.25em;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sign-in {
    display: block;
    width: 50%;
    margin: 0 auto;
}

.email,
.password {
    display: flex;
    flex-direction: column;
    align-items: baseline;
}

.password {
    margin-bottom: 1rem;
}

#email,
#password {
    width: 80%;
}

/* Index page styles */
.home:hover {
    background-color: #F7F1E8;
    color: #8B5E34;
    padding: .5em 1em;
    border-radius: 50px;
}

.home {
    background-color: #8B5E34;
    color: #FFF9F1;
    padding: .5em 1em;
    border-radius: 50px;
}

.index-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.recipe-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.recipe-list {
    background-color: #FFF;
    border-radius: 10px;
    box-shadow: 0px 2px 5px #888;
    padding: 0.5rem;
}

.recipe-list img {
    display: block;
    max-width: 100%;
}

.des-photo img {
    display: block;
    max-width: 100%;
    width: 33%;
    height: auto;
    margin-bottom: 0.5rem;    
    object-fit: cover;
    border: 5px solid white;
}

.recipe-list h3 {
    font-size: 1.1em;
}

.tag {
    display: flex;
    flex-wrap: wrap;
    color: #8B5E34;
    text-wrap: nowrap;
    line-height: 1;
    gap: 0.5rem;
}

/* Profile page styles */
.profile-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-bottom: 2rem;
    align-items: flex-end;
}

.profile-header img {
    height: 5rem;
}

.dishbook {
    color: #8B5E34;
}

a {
    color: #8B5E34;
    text-decoration: none;
}

a:hover {
    color: #A8570C;
    text-decoration: underline;
}

.chicken-adobo {
    transform: rotate(2deg);
    border: 5px solid white;
    border-radius: 3px solid white;
}

hr {
    border: none;
    border-top: 2px solid #8B5E34;
    margin: 0px;
    width: 100%;
}