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

input[type=number][size] { width: calc(attr(size number) * 1ch + 2rem); }

html {
    font-size: 18px;
}

header {
    gap: 3rem;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playwrite US Trad', cursive;
    color: #A8570C;
}

h2, h3, h4, h5, h6 {
    font-size: 22.5px;
}

.recipe-h2 {
    padding-left: 1rem;
}

h1 {
    font-size: 32.4px;
}

.h2-profile {
    padding-left: 1rem;
}

h3 {
    font-size: 18px;
    padding-left: 1rem;
}

body {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 18px;
    color: #000;
    background-color: #F7F1E8;

    display: flex;
    justify-content: space-around;
    flex-direction: column;

    max-width: 700px;
    padding: 0 .5rem;
}

.login-form label,
.login-form input,
.login-form button {
    font-size: 22.5px;
}

.recipe-overview dt {
    font-weight: 600;
}

.recipe-overview {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding-left: 1rem;
    gap: 0.5rem;
    padding-right: 1rem
}

.recipe-overview img {
    flex: 1;
    max-width: 100%;
    height: auto;
}

.recipe-overview .description {
    flex: 2;
}

.tags {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding-bottom: 2rem;
}

.description, .ingredients, .steps {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    gap: 0.5rem;
}

.description, .ingredients {
    display: flex;
    padding-left: 1rem;
}

.ingredients {
    text-indent: -1rem;
}

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

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

a.button-link {
    display: inline-block;
    background-color: #8B5E34;
    color: #F7F1E8 ;
    padding: 0.5em 1em;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

a.button-link:hover {
    background-color: #A8570C;
    color: #FFF9F1;
    text-decoration: none;
}

main {
    display: flex;
    flex-direction: column;
    background-color: #FFF9F1;
    max-width: 700px;
    border: 1px solid grey;
    border-radius: 32px;
    padding-top: 1rem;
}

.visually-hidden {
    display: none;
}

a.web-title {
    font-size: 22.5px;
    font-family: 'Playwrite US Trad', cursive;
    color: #A8570C;
}

section {
    gap: 2rem;
    display: flex;
    padding-left: 1rem;
    flex-direction: row;
}

.save-edit {
    align-items: start;
    gap: 1.75rem;
}

.save-edit input {
    width: 575px;
}

.save-edit-get {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-right: 1rem;
}

.edit-make-public {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.title-tags {
    padding-bottom: 2rem;
}

.save-edit button {
    padding: 4px;
}

.save-edit-get button {
    padding: 4px;
}

section.bottom-row, section.top-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-grow: 1;
    justify-content: space-between;
}

section.top-row {
    border-bottom: 2px solid #A8570C;
}

section.bottom-row {
    padding-bottom: 3rem;
}

form.search_bar {
    gap: .25rem;
}

.profile-block {
    display: flex;
    flex-direction: row;
    gap: .25rem;
    align-items: center;
}

.home-cookbook-block {
    display: flex;
    flex-direction: row;
    gap: .75rem;
    align-items: center;
}

.recipe-owner {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

ol {
    padding-left: 1em;
}

img {
    transform: rotate(2deg);
    border: 5px solid #fff;
    border-radius: 3px;
}

.index-img {
    transform: none;
    border: 5px solid #fff;
    border-radius: 3px;
}

dl {
    padding-bottom: 2rem;
}

dd {
    padding-left: 1rem;
}

.ingredients-and-steps {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    padding-right: 1rem;
}

.ingredients-and-steps .ingredients {
    flex: 1;
}

.ingredients-and-steps .steps {
    flex: 2;
}

.welcome-index-page {
    gap: 0.5rem;
    display: flex;
    flex-direction: column;
}

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

.featured-recipes-index-page {
    display: grid;
    grid-template-columns: repeat(3, auto);
    flex-wrap: wrap;
    gap: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
}

.individual-recipe {
    display: flex;
    flex-direction: column;
    background-color: white;
    border: 1px solid white;
    border-radius: 12px;
    padding-top: 2px;
    gap: 0.5rem;
    box-shadow: 2px 2px 8px rgba(100, 100, 100);
}

.individual-recipe h2 {
    padding-left: 1rem;
    padding-right: 1rem
}

.featured-recipe-div {
    padding-bottom: 2rem;
    padding-left: 1rem;
}

.tag-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-wrap: none;
    padding-bottom: 2px;
    padding-right: 1rem;
}

.profile-section {
    flex-direction: column;
    justify-content: space-between;
    padding-right: 1rem;
    gap: 0.25rem;
}

.ben-braiser {
    width: 5rem;
    height: 5rem;
    transform: none;
}

.profile-description {
    display: flex;
    padding-bottom: 2rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
}

.profile-photo-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.sign-in-content h1 {
    padding-bottom: 2rem;
    padding-left: 1rem;
}

.login-section {
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 1rem;
    padding-bottom: 1rem;
}

.individual-login-section {
    display: flex;
    flex-direction: column;
}

.individual-login-section input {
    width: 80%;
    align-items: baseline;
    padding: 0.25rem;
}

.login-section button {
    width: 50%;
    justify-content: center;
    min-width: 200px;
    margin: 0 auto;
}
.search-recipes {
    padding-left: 1rem;
    padding-bottom: 2rem;
}

.search-recipes input {
    width: 80%;
    align-items: baseline;
    padding: 0.25rem;
}

@media (max-width: 500px) {
    .recipe-overview,
    .ingredients-and-steps {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .recipe-overview img,
    .recipe-overview .description,
    .ingredients-and-steps .ingredients,
    .ingredients-and-steps .steps {
        flex: none;
        width: 100%;
    }

    .description {
        padding-bottom: 2rem;
        padding-left: 0;
    }

    dl, .numbered-steps{
       padding-bottom: 2rem;
    }
}

@media (max-width: 600px) {
    .featured-recipes-index-page {
        grid-template-columns: repeat(2, auto);
    }
}

@media (max-width: 400px) {
    .featured-recipes-index-page {
        grid-template-columns: 1fr;
    }
}

.recipe-title {
    font-family: 'Playwrite US Trad', cursive;
    color: #A8570C;
    font-size: 32.4px;
}

.step-ingredients {
    padding-left: 1rem;
}

.step-ingredients li {
    padding-left: 1rem;
    padding-bottom: .25rem;
}

.step-ingredients input {
    padding: 2px;
}

.step-ingredients input[type="number"] {
  width: 70px;
}

.step-ingredients input[name*="_unit"] {
  width: 80px;
}

.step-ingredients input[name*="_name"] {
  flex: 1;
}

.numbered-steps {
    padding-bottom: 1rem;
}

.numbered-steps textarea {
    width: 400px;
    vertical-align: top;
    margin-bottom: 0.25rem;
}

.form-errors {
    color: red;
}

.form-errors li {
    padding-left: 2rem;
}

.prep input{
    width: 50px;
    padding: 2px;
}

.edit-recipe-image {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    padding-bottom: 1rem;
}

.show-password {
    display: flex;
    gap: 5px;
}
