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

body {
    font-family: "Futura", sans-serif;  
    background-color: #fafbff;
}

h1 {
    color: #0018a4;
    height: 85px;
    top: 64px;
    left: 64px;
    font-size: 3rem;
    margin: 50px 10px;
}

h3 {
    color: #000000;
    font-size: 22px;
    margin: 10px 0 10px 16px;
}

h4 {
    color: #000000;
}

p {
    color: #000000;
}

img {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
}

ul {
    padding: 0;
}

li {
    list-style: none;
}

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

/* ======================================
favorite recipes button
======================================= */

.favorites {
    color: #555;
    text-align: center;
    margin-left: 10px;
    margin-bottom: 50px;
    background-color: lightpink;
    width: 150px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.favorites:hover {
    border: 2px solid #0018a4;
    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
}

/* ======================================
search form
======================================= */

.search-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 50%;
    margin-left: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #777777;
    border-radius: 50px;
}

.search-form:hover {
    border: 2px solid #777777;
}

#text-input {
    width: 100%;
    height: 45px;
    padding: 5px 15px;
    border: none;
    box-sizing: border-box;
    font-size: 1em;
    outline: none;
}

#text-input::placeholder{
    font-size: 1em;
    color: #777777;
}

.search-button {
    background-color: skyblue;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 45px;
    border: none;
    cursor: pointer;
}

.search-emoji {
    font-size: 1.5rem;
}

/* ======================================
style for the buttons
======================================= */

.button-container {
    display: flex;
    flex-direction: row;
    margin-bottom: 20px;
    gap: 30px;
}

.filter-container,
.sort-container {
    display: flex;
    flex-direction: column;
}

.filter,
.sort,
.random {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.filter-btn {
    text-align: center;
    background-color: #ccffe2;
    color: #0018a4;
    font-size: 18px;
    border: none;
    width: auto;
    height: 40px;
    border-radius: 50px;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
}

.sort-btn {
    text-align: center;
    background-color: #ffecea;
    color: #0018a4;
    font-size: 18px;
    border: none;
    width: auto;
    height: 40px;
    border-radius: 50px;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
}

.random-btn {
    text-align: center;
    background-color: beige;
    color: #0018a4;
    font-size: 18px;
    border: none;
    width: auto;
    height: 40px;
    border-radius: 50px;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
}

.filter-btn:hover,
.sort-btn:hover,
.random-btn:hover {
    border: 2px solid #0018a4;
    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background-color: #0018a4;
    color: #fff;
}

.sort-btn.active {
    background-color: #ff6589;
    color: #fff;
}

.random-btn.active {
    background-color: orange;
    color: #fff;
}

/* ======================================
style for recipe cards
======================================= */

#recipe-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    margin-bottom: 50px;
}

.placeholder p {
    opacity: 1;
    margin: 8px 0;
}

.recipe-image {
    position: relative;
}

.like-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    background-color: white;
    border-radius: 50%;
    border: none;
    margin: 0 0 0 auto;cursor: pointer;
}

.like-button.liked {
    color: red;
}

.line {
    width: auto;
    height: 1px;
    margin: 20px 0;
}

.view-recipe-button {
    background-color: #ff6589;
    font-size: large;
    border: none;
    border-radius: 10px;
    width: 100%;
    padding: 10px;
    cursor: pointer;
    text-decoration: none;
    margin-top: auto;
    text-align: center;
    align-items: flex-end;
}

.view-recipe-button a {
    color: white;
}

.recipe-card {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    height: 100%;
    border: 1px solid #e9e9e9;
    border-radius: 16px;
    margin: 10px;
    padding: 16px 16px 24px 16px;
    background-color: #fff;
}

/* to place view recipe button in the bottom of the card */
.recipe-card > *:not(.recipe-image):not(.view-recipe-button) {
    margin-top: 12px;
}

.recipe-card:hover {
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
}

.no-results {
    text-align: center;
    margin-top: 100px;
    font-size: 2rem;
    color: #555;
}

#no-results {
    text-align: center;
    margin-top: 100px;
    font-size: 2rem;
    color: #555;
    display: none;
}

/* ======================================
responsive design
======================================= */

@media (max-width: 1023px) {
    .button-container {
        display: flex;
        flex-direction: column ;
    }

    .search-form {
        width: 90%;
    }
}
