/* --- import reset styles --- */
@import url(./reset.css);

/* --- main styles --- */
body {
    font-size: 1rem;
}
[class*="__container"] {
    max-width: 75rem;
    margin: 0 auto;
    padding: 1rem;
}
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.wrapper .main {
    flex-grow: 1;
}
.main__container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}
/* --- header styles --- */
.header a,
.header p {
    text-decoration: none;
    color: inherit;
    margin: 0;
}
.header {
    .header__body {
        background: lightgray;
        border-radius: 1.5rem;
        padding: 1rem;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        align-items: center;
    }
    .header__logo {
        display: flex;
        gap: 0.3rem;
        align-items: center;
        background: white;
        padding: 0.1rem 1rem;
        border-radius: 2rem;
        img {
            width: 3rem;
            height: 3rem;
        }
    }
    .header__btn {
        background: white;
        padding: 0.8rem 1rem;
        border-radius: 2rem;
        min-height: 3.19rem;
        text-align: center;
    }
}

/* --- swiper --- */
.swiper {
    width: 100%;
    max-height: 25rem;
    border-radius: 2rem;
    overflow: hidden;
}
@media (max-width: 46rem) {
    .swiper {
        max-height: 15rem;
    }
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #444;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --- styles for sections --- */
/* h3 {
    text-align: center;
    padding: 1rem;
    flex-grow: 1;
    font-size: 1.3rem;
} */

/* --- styles for content section --- */

.main {
    .main__content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    .main__title {
        font-size: 2rem;
        font-weight: 600;
        text-align: center;
    }
    .main__text {
        text-align: center;
    }
}

/* --- styles for get random meal --- */

.random-meal-block {
    display: flex;
    gap: 3rem;
    justify-content: space-around;
    align-items: center;
    .random-meal-block__btns {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        button {
            background: lightgray;
            padding: 0.8rem;
            border-radius: 1rem;
            width: 100%;
            transition: all 0.3s ease-in-out;
        }
        button:hover {
            transform: scale(1.05);
        }
    }
    .random-meal-block__card {
        display: flex;
        /* gap: 1rem; */
        flex-direction: column;
        flex-grow: 1;
        justify-items: center;
        max-width: 20rem;
        height: 100%;
        border-radius: 1rem;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
    }
    .random-meal-block__card:hover {
        transform: scale(1.05);
    }
    .random-meal-block__img {
        width: 100%;
        min-height: 60%;
    }
    .random-meal-block__title {
        text-align: center;
        background: lightgray;
        padding: 1rem;
        margin-bottom: 0;
    }
    a {
        text-decoration: none;
        color: inherit;
        display: inline-block;
    }
}
@media (max-width: 39.375rem) {
    .random-meal-block {
        flex-direction: column;
    }
    .random-meal-block .random-meal-block__btns {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        a {
            flex-shrink: 0;
        }
        button {
            max-width: 10rem;
            min-height: 5rem;
        }
        p {
            display: none;
        }
    }
}

/* --- main__recipes-display --- */

.main__recipes-display {
    display: flex;
    width: 100%;
    justify-content: space-between;
}
.main__search-block {
    flex-grow: 1;
    padding: 1rem;
}
/* --- section categories --- */
.main__categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 60%;
}
.main__category {
    width: 100%;
    max-width: 20rem;
}

/* --- section meals --- */
.main__heading {
    display: flex;
    gap: 2rem;
    flex-direction: column;
    align-items: center;
}
.main__search {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    input {
        border: 0.1rem solid black;
        border-radius: 1rem;
        padding: 0.5rem;
        min-width: 70%;
    }
    button {
        padding: 0.5rem;
        min-width: 6rem;
        border-radius: 1rem;
        background: rgb(223, 223, 223);
    }
}

.main__meal-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.main__card {
    max-width: 15rem;
    height: 100%;
    border-radius: 2rem;
    border: 0.1rem solid black;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-content: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    img {
        width: 100%;
    }
    h3 {
        text-align: center;
        padding: 1rem;
        flex-grow: 1;
        font-size: 1.3rem;
    }
}
.main__card:hover {
    transform: scale(1.05);
}

/* --- section meal recipe --- */
/* .main {
    .main__recipe {
        position: absolute;
        z-index: 5;
        width: 100%;
        height: 100%;
    }
} */
.meal-recipe {
    /* visibility: hidden; */
    .meal-recipe__wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        background: white;
        overflow: hidden;
    }
    .meal-recipe__top-block,
    .meal-recipe__middle-block,
    .meal-recipe__bottom-block {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    .meal-recipe__img {
        /* width: 30rem; */
        /* width: 100%; */
        border-radius: 2rem;
        max-height: 30rem;
    }
    @media (max-width: 39.375rem) {
        .meal-recipe__img {
            display: none;
        }
    }
    .meal-recipe__title {
        font-size: 2rem;
        font-weight: 600;
        text-align: center;
        flex-grow: 1;
        margin-bottom: 0;
        align-content: center;
    }
    .meal-recipe__extra-info {
        width: 100%;
        display: flex;
        gap: 1rem;
        justify-content: space-around;
    }
    .meal-recipe__area,
    .meal-recipe__category,
    .meal-recipe__btn {
        background: lightgray;
        padding: 0.8rem;
        min-width: 10rem;
        text-align: center;
        border-radius: 1rem;
    }
    .meal-recipe__btn {
        background: rgb(95, 95, 95);
        color: white;
        /* justify-self: flex-end; */
    }
    .meal-recipe__img-block {
        width: 100%;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        /* margin-left: 1rem; */
        .meal-recipe__img {
            width: 40%;
            /* flex-grow: 1; */
            /* align-self: center; */
        }
    }
    .meal-recipe__side-info {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    .meal-recipe__block {
        display: flex;
    }
    @media (max-width: 39.375rem) {
        .meal-recipe__block {
            flex-direction: column;
        }
    }
    .meal-recipe__list-block {
        width: 100%;
        display: flex;
        gap: 2rem;
        /* justify-content: center; */
        /* max-height: 10rem; */
    }
    @media (max-width: 39.375rem) {
        .meal-recipe__list-block {
            width: 100%;
            justify-content: center;
            text-align: center;
            margin-bottom: 1rem;
        }
    }
    .meal-recipe__ingredients-list,
    .meal-recipe__measures-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        /* align-items: center; */
        padding: 0;
        margin: 0;
        /* height: fit-content; */
        /* width: 100%; */
        /* li {
            text-align: center;
            border: 0.1rem solid black;
        } */
    }
    .meal-recipe__ingredients-list {
        li {
            font-weight: 700;
        }
    }
}

.accordion-body {
    height: 200px;
    overflow-y: scroll;
}

.accordion-item {
    box-shadow: 6px 7px 22px -11px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow: 6px 7px 22px -11px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 6px 7px 22px -11px rgba(0, 0, 0, 0.75);
}

@media screen and (max-width: 700px) {
    .main__recipes-display {
        display: block;
    }
    .main__categories {
        max-width: 100%;
    }
    .main__title {
        /* font-size: 1rem; */
        padding: 0 1rem;
    }
    .main__text {
        /* font-size: 1rem; */
        padding: 0 1rem;
    }
}
