/* main.css */

/* Home */

* {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    border: 0;
}

header {
    background-color: #2D3142;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.nav {
    display: flex;
    gap: 20px;
    margin-left: 20px;
}

.nav a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 20px;
}

.nav a:hover {
    color: #EF8354;
}

.nav .active {
    color: #EF8354;
}

.user-links {
    margin-right: 20px;
}

.user-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 20px;
}

.user-links a:hover {
    color: #EF8354;
}

body {
    background-color: #FFFFFF;
}

main {
    display: flex;
    justify-content: center;
}

.main-content {
    max-width: 700px;
}

h1 {
    color: #4F5D75;
    text-align: center;
    margin: 20px 0px;
}

a {
    text-decoration: none;
    color: inherit;
}

.page-description {
    text-align: center;
}

.recipes-container {
    display: flex;
    justify-content: center;
}

.recipes {
    margin-top: 20px;
}

.recipe-card-a {
    display: block;
    transition: transform 0.3s ease;
}

.recipe-card-a:hover {
    transform: scale(1.05);
}

.recipe-card {
    background-color: #2D3142;
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 20px;
}

.recipe-card h2, .recipe-card h3 {
    color: #EF8354;
    margin-bottom: 10px;
}

.recipe-card p {
    color: white;
}

.recipe-card ul {
    margin-top: 10px;
    list-style: none;
    color: #BFC0C0;
}

.recipe-card ul li {
    margin-bottom: 10px;
}

.recipe-card ul li:last-child {
    margin-bottom: 0px;
}

.recipe-card ul li:hover {
    color: #EF8354;
}

.recipe-card .tags {
    margin-top: 10px;
    color: #BFC0C0;
}

.recipe-card .submitted-at {
    margin-top: 10px;
}

/* Recipe Details */

.page-description a {
    color: #4F5D75;
}

.page-description a:hover {
    color: #EF8354;
}

.recipe-content {
    margin: 20px 0;
    background-color: #2D3142;
    color: white;
    border-radius: 25px;
    padding: 30px;
}

.recipe-content p {
    margin-bottom: 20px;
}

.recipe-content h2 {
    margin-bottom: 20px;
}

.recipe-content .tags {
    color: #EF8354;
}

.recipe-columns h2 {
    color: #EF8354;
}

.ingredients {
    margin-bottom: 20px;
}

.ingredients ul {
    list-style: none;
}

.steps ol {
    margin-left: 20px;
}

/* Profile */

.profile-intro p {
    margin-bottom: 20px;
    text-align: center;
}

.recipes-list {
    margin-top: 20px;
}

/* Search */

.cards-area {
    margin-top: 20px;
}

#search-form {
    display: flex;
    justify-content: space-between;
}

#big-search {
    border: 1px solid #BFC0C0;
    width: 73%;
    height: 40px;
    border-radius: 20px;
    padding: 0 15px;
}

#big-search:focus {
    border: 1px solid #EF8354;
    outline: none;
}

#search-form button {
    width: 25%;
    height: 40px;
    border-radius: 20px;
    background-color: #EF8354;
    color: white;
}

#search-form button:hover {
    cursor: pointer;
}

/* Login */

#username, #password {
    border: 1px solid #BFC0C0;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    border-radius: 20px;
    padding: 0 15px;
    margin-bottom: 10px;
}

#username:focus, #password:focus {
    border: 1px solid #EF8354;
    outline: none;
}

.login-form {
    margin-top: 20px;
}

.login-form button {
    height: 40px;
    width: 100%;
    background-color: #EF8354;
    color: white;
    border-radius: 20px;
}

.login-form button:hover {
    cursor: pointer;
}

.error {
    text-align: center;
    color: red;
}

/* Create Recipe */

#create-recipe-form label {
    display: inline-block;
    margin-bottom: 10px;
}

#create-recipe-form input {
    border: 1px solid #BFC0C0;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    border-radius: 20px;
    padding: 0 15px;
    margin-bottom: 10px;
}

#create-recipe-form textarea {
    border: 1px solid #BFC0C0;
    box-sizing: border-box;
    width: 100%;
    height: 100px;
    border-radius: 20px;
    padding: 15px 0 0 15px;
    margin-bottom: 10px;
}

#create-recipe-form .photo-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

#create-recipe-form #photo-label {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 200px;
    background-color: #EF8354;
    color: white;
    border-radius: 20px;
    margin: 0 15px 0 0;
}

#create-recipe-form #photo-label:hover {
    cursor: pointer;
}

#create-recipe-form .photo-filename-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#create-recipe-form .is-public-container {
    margin-bottom: 10px;
}

#create-recipe-form .is-public-container label {
    margin: 0;
}

#create-recipe-form #is_public {
    all: revert;
}

#create-recipe-form .tag-input {
    all: revert;
}

#create-recipe-form .tags-container {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

#create-recipe-form .tags-container label {
    margin: 0;
}

#create-recipe-form button {
    height: 40px;
    width: 100%;
    background-color: #EF8354;
    color: white;
    border-radius: 20px;
}

#create-recipe-form button:hover {
    cursor: pointer;
}

#create-recipe-form p {
    margin-bottom: 10px;
}

#create-recipe-form .ingredients-list .ingredient-paragraph {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

#create-recipe-form .ingredients-list .ingredient-delete-button {
    background-color: red;
    width: 70px;
    height: 40px;
}

#create-recipe-form .ingredients-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#create-recipe-form .ingredients-container label {
    margin: 0;
}

#create-recipe-form .ingredients-container input {
    margin: 0;
}

#create-recipe-form .ingredients-container div {
    display: flex;
    align-items: center;
    gap: 5px;
}

#create-recipe-form .ingredients-container .ingredient-amount-container {
    width: 20%;
}

#create-recipe-form .ingredients-container .ingredient-unit-container {
    width: 25%;
}

#create-recipe-form .ingredients-container .ingredient-name-container {
    width: 40%;
}

#create-recipe-form .ingredients-container button {
    width: 10%;
}

#create-recipe-form .steps-list .steps-li {
    margin-left: 28px;
    margin-bottom: 10px;
}

#create-recipe-form .steps-list .steps-delete-button {
    background-color: red;
    width: 70px;
    height: 40px;
    margin-left: 5px;
}

#create-recipe-form .steps-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

#create-recipe-form .steps-container label {
    margin: 0;
}

#create-recipe-form .steps-container input {
    margin: 0;
}

#create-recipe-form .steps-container .steps-description-container {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 88%;
}

#create-recipe-form .steps-container button {
    width: 10%;
}

/* Mobile Styles */

@media (max-width: 570px) {

    /* Index */

    header {
        flex-direction: column;
        height: auto;
    }

    .nav {
        flex-direction: column;
        margin: 20px 0 0 0;
        text-align: center;
    }

    .user-links {
        margin: 20px 0;
    }

    .main-content {
        width: 85%;
    }

    .recipe-card {
        text-align: center;
    }

    /* Recipe Detail */

    .recipe-content {
        text-align: center;
    }

    /* Profile */

    .profile-recipes-header {
        text-align: center;
    }
    
    /* Search */

    #search-form {
        display: block;
    }

    #search-form button {
        width: 100%;
    }

    #big-search {
        width: 100%;
        margin-bottom: 20px;
    }

    .no-matching-recipes {
        text-align: center;
    }
}