@use "../mixins";

.c-recipe__header-image {
    width: 100%;
    object-fit: cover;
    height: 50vh;
    min-height: 300px;
    background-color: var(--recipe-placeholder, var(--color-grey-500)); // fallback while image is loading
}

.c-recipe__title {
    padding: 20px;
    background-color: var(--color-primary);
}

.c-recipe__ingredients-list {
    li {
        margin-bottom: 12px;
    }
    
    input[type="checkbox"] {
        accent-color: var(--color-secondary);
        margin: 0;
        margin-inline-end: 6px;
    }
}

.c-recipe__additional-info {
    margin-bottom: 30px;

    svg {
        margin-right: 6px;
        fill: var(--recipe-color, var(--color-grey-900));
    }
}

.c-recipe__recipe-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    
    @include mixins.mq(medium) {
        display: grid;
        grid-template-columns: 400px 1fr;
        grid-template-rows: min-content 1fr;
        grid-template-areas:
            "ingredients tags"
            "ingredients instructions";
    }
}

.c-recipe__tag-list {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    @include mixins.mq(medium) {
        grid-area: tags;
        margin-bottom: 0;
    }
}


.c-recipe__ingredients-wrapper {
    @include mixins.mq(medium) {
        grid-area: ingredients;
    }
}

.c-recipe__serving-button {
    height: 20px;
    width: 20px;
    padding: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--recipe-serving-bg, var(--color-grey-900));
    border: none;
    border-radius: 50%;
    color: var(--recipe-serving-color, var(--color-white));

    &:hover, &:focus {
        background-color: var(--recipe-serving-hover-bg, var(--color-grey-800));
    }
}

.c-recipe__instructions-wrapper {
    @include mixins.mq(medium) {
        grid-area: instructions;
    }
}