* { margin: 0; padding: 0; box-sizing: border-box; }

html{
    font-size: 18px;
    display: flex;  
    justify-content: center; 
}

body{
    width: 700px;
    margin: 0.5rem;
    display: flex;
    flex-direction: column;
}

header {
    font-family: 'Nunito', sans-serif;
    color: #8B5E34;
}

header div{
    gap: 1rem;
    display: flex;
    align-items: baseline;
}

/* Make button and profile info align to the right side */
div .profile{
    margin-left: auto;
}

/* Make search align to the right side and on the same line with Home and My cookbook */
nav{
    display: flex;
    border-top:#8B5E34 2px solid;
}
nav ul {
    display: flex;      /*Horizontal display and remove bullet points*/
    list-style: none;
}
nav ul li{
    padding-right: 1rem; /* Gap between Home and My Cookbook*/
    padding-top: 0.25rem;
}
.search-form{
    margin-left: auto;
    padding-top: 0.25rem;
}
.search-form input,
.search-form button{
    padding: 0.25rem;
}

header h1,
header h2,
header h3 {
    font-family: 'Playwrite US Trad', serif;
    font-size: 1.8rem;
    color: #8B5E34;
}

main {
    margin-top: 3rem;
    font-family: 'Nunito', sans-serif;
    color: #A8570C;
    max-width: 1000px;
    border: #8B5E34 2px solid;
    border-radius: 10px;
    padding: 1em 1rem; /* Border gap */
    box-sizing: border-box;
}

main section{
    padding-bottom: 2rem;
}
main:hover {
    color: #A8570C;
}

a {
    color: #A8570C;
    text-decoration: none; /* Remove a default underline*/
}

p {
    color: black;
    padding-bottom: 1rem;
}

a.btn-primary,
a.btn {
    padding: .5em 1em; /*Button padding*/
    background-color:#8B5E34 ;
    text-align: center;
    color: #F7F1E8;
}

a.btn-primary:hover,
a.btn:hover {
    padding: .5em 1em;
    background-color: #A8570C;
    text-align: center;
    color: #888;
}

.actions{
    display: flex;
    gap: 1rem;
    justify-content: center;
}

main h1,
main h2,
main h3 {
    font-family: 'Playwrite US Trad', serif;
    font-size: 1.25rem;
    color: #A8570C;
}

.recipe__header .tags{
    display: flex;
    gap: 0.5rem; 
}

h2.recipe__buttons{
    display:flex;
    flex-direction: row ;
}
.recipe__body{
    display: flex;
    gap: 1rem;
}

.recipe__ingredients ul{
    margin-top: 0.5rem;
    list-style: none;
}


    
.recipe__ingredients,
.recipe__steps,
.recipe__description {
    font-family: 'Nunito', sans-serif;
    line-height: 1.25;
    color: #8B5E34;
}
.recipe__photo{
    padding-bottom: 0.5rem;
}
.recipe__ingredients {
    padding-left: 1rem; 
    text-indent: -1rem;
}
.recipe__ingredients li{
    padding-left: 1rem; 
    text-indent: -1rem;
}
.recipe__meta {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    color: #8B5E34;
}
.recipe__meta li {  
    list-style: none;
    padding-bottom: 0.25rem;
}
.recipe__meta li strong{  
    padding-right: 0.5rem;
    flex: 0 0 calc(25%);
}

.recipe__steps ol{
    padding-left: 1em;
}
.recipe__header div{
    display: flex;
    gap: 0 1.5rem;
    flex-wrap: wrap;
}

main.login,
main.login button,
main.login input {
    font-size: 1.25rem;
    color: #8B5E34;
}

main.login h2 {
    font-size: 1.8rem;
    color: #8B5E34;
}

figure.recipe__photo img {
    transform: rotate(2deg);
    /*Adjust photo to not be larger than parent*/
    max-width: 100%;
    max-height: 100%;
}

.tags li {
    list-style: "#"; 
    text-wrap: nowrap;
    margin-left: 0.5rem;
}

.card-grid{
    display:flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.recipe-card{
    flex: 0 0 calc((100% - 2rem) /3); /*Limit each row to 3 cards by */
    border: 1px solid #888;
    padding: 0.75rem;
    flex-wrap: wrap;
    border-radius: 10px;
}

.recipe-card .tags{
    display: flex;
    column-gap: 0.5rem;
    flex-wrap:wrap;
}
.recipe-card img{
    /*Set max width and adjust height to look right*/
    max-width: 100%;
    height: auto;
}

.profile-info{
    display:flex;
    gap: 1rem;
}
.profile-info img{
    margin-left: auto;
    max-width: 5rem;
    max-height: 5rem;
}

.search-form2{
    width: 100%;
    padding:.25rem;
}

.login{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.login button{
    display: flex;
    justify-self: center;
    justify-content: center;
    margin: 1rem;
    width: 50%;
    min-width: 200px;
}

.login .email{
    display:flex;
    width: 80%;
    padding: 0.25rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.login .password{
    display:flex;
    width: 80%;
    padding: 0.25rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.errors{
    color: red;
}