@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Playwrite+US+Trad:wght@100..400&display=swap"); 

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color:#F7F1E8;
}

header {
    display: flex;
    flex-direction: column;
    max-width: 700px;
    background-color: #F7F1E8;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    padding-left: .5rem;
    padding-right: .5rem;
   
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin-top: 3rem;
    padding: 0 1rem;
}

section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    background-color: #FFF9F1;
    border: 1px solid #2E261C;
    border-radius: 5px; 
    padding: .5em 1em;
    
}

article {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    background-color: #FFF9F1;
    border-radius: 5px; 
    padding: .5em 1em;
}

h1 {
    font-family: 'Playwrite US Trad', cursive;
    font-size: 125%;
    color: #A8570C !important;
}

h2 {
    font-family: 'Playwrite US Trad', cursive;
    font-size: 125%;
    color: #A8570C;
}

h3 {
    font-family: 'Playwrite US Trad', cursive;
    font-size: 125%;
    color: #A8570C;
}

p {
    color: #2E261C;
}

a {
    color: #8B5E34;
    text-decoration: none;
}

a:hover {
    color: #A8570C;
    text-decoration: underline;
}

li {
    line-height: 1.25;
}

dl {
    line-height: 1.25;
    font-weight: 600;
}

button {
    padding: .5em 1em;
}

.horizontal-button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.sign-in-button, .browse-recipes-button {
    background-color: #A8570C;
    border: #A8570C;
    border-radius: 5px;
    border-width: 1px;
    color: #FFF9F1;
    padding: .5em 1em;
}

.header-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; 
}

.profile-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Recipe stuff */

.recipe-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem
}

.recipe-metadata-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-image {
    transform: rotate(2deg);
    border: 5px solid #fff;
    border-radius: 3px;
    width: 100%;
    height: auto;

}

.recipe-description {
    margin-bottom: 2rem;
}

.recipe-ingredients {
    padding-left: 1em;
    text-indent: -1em; 
}

.recipe-steps {
    padding-left: 1em;
    text-indent: -1em;
}

.recipe-information {
    display: flex;
    flex-direction: column;
    flex-wrap: calc(25% - 0.25rem);
    gap: 0.25rem;
}

.recipe-information dl {
    display: flex;
    flex-wrap: calc(75% - 0.5rem);
    gap: 0.5rem;
}

.recipe-row {
    display: flex;
    gap: 1rem;
}

.recipe-row-left-item {
    flex-grow: 1;
    flex-shrink: 1;
}

.recipe-row-right-item {
    flex-grow: 2;
    flex-shrink: 1;
}

.recipe-card {
    background-color: #FFF9F1;
    border: 1px solid #2E261C;
    border-radius: 15px;
    margin: 1rem;
}

/* Card stuff */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    max-width: 100%;
    align-items: start;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    max-width: 100%;
    background-color: #FFFF;
    border-radius: 15px;
}

.card-image {
    max-width: 100%;
    height: auto;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem;
}

.card-tags h3 {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.card-tags a {
    flex-wrap: nowrap;
}

/* Search Page searchbar stuff */

.recipe-search-bar {
    width: 100%;
    padding: 0.25rem;
}

/* Profile Page stuff */

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.profile-info {
    text-align: left;
    flex: 1;
}

.profile-image {
    display: flex;
    margin-left: auto;
    text-align: right;
}

.profile-image img {
    width: 5rem;
    height: 5rem;
    object-fit: fill;
}

header h1 {
    position: relative;
    display: flex;
    align-items: center;
}

header h1 input {
    font-family: 'Playwrite US Trad', cursive;
    font-size: 3rem;
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #A8570C;
    border-radius: 5px;
    background-color: #FFF9f1;
    color: #2E261C;
}

header h1 button {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #A8570C;
    color: #FFF9F1;
    border: 1px solid #A8570C;
    border-radius: 5px;
}


textarea {
    width: 100%;
    resize: vertical;
    padding: 0.5rem;
    border: 1px solid #A8570C;
    border-radius: 5px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    background-color: #FFF9F1;
    color: #2E261C;
}


.recipe-steps li {
    vertical-align: top;
    margin-bottom: 1rem;
}

.recipe-steps li ul {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    padding-left: 2em;
    flex-direction: column;
    margin-top: 0.25rem;
    list-style: none;
}

.recipe-steps li ul li {
    display: flex;
    gap: 0.5rem;
    align-items: center; 
    margin-bottom: 0;
}

.recipe-steps ul li input {
    padding: 0.25rem;
    border: 1px solid #A8570C;
    border-radius: 3px;
    background-color: #FFF9F1;
    color: #2E261C;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
}

.recipe-steps ul li input[type="number"] {
    width: 80px;
}

.recipe-steps ul li input[type="text"] {
    flex: 1;
}

output[role="alert"] {
    color: red;
}


output[role="alert"] ul {
    list-style-type: disc;
    padding-left: 2rem;
}

/*
Colors:

 #F7F1E8 "cream", 
 #2E261C "cast iron", 
 #A8570C "cacao", 
 #FFF9F1 "paper", 
 #888 "ash", 
 #8B5E34 "oak", 
 and in a few places #FFF pure white
*/