.ingredient-optional {
    background-color: #edfbd2;
}

.recipe-portions-input {
    width: 6rem;
}

.recipe-optional-badge {
    background-color: #d8f5a2;
    color: #2b4114;
}

.recipe-main-img {
    width: 100%;
    max-height: 44rem;
    object-fit: cover;
    box-shadow: var(--app-shadow-soft);
}

.recipe-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.75rem;
}

.recipe-nutrition-grid div {
    padding: 0.85rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: rgba(254, 252, 232, 0.72);
}

.recipe-nutrition-grid span {
    display: block;
    color: var(--app-muted);
    font-size: 0.8rem;
}

.recipe-nutrition-grid strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.05rem;
}

.recipe-details-card {
    background: rgba(255, 255, 255, 0.78);
}

.recipe-detail-pill {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.45rem 0.75rem;
    color: var(--app-text);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: rgba(254, 252, 232, 0.86);
}

.recipe-steps {
    --recipe-step-line: rgba(13, 110, 253, 0.22);
    --recipe-step-accent: var(--app-primary);
    position: relative;
    padding-left: 0.25rem;
}

.recipe-step {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: 0.75rem 1rem;
    position: relative;
    padding-bottom: 1.35rem;
}

.recipe-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.35rem;
    top: 2.6rem;
    bottom: 0;
    width: 2px;
    background: var(--recipe-step-line);
    border-radius: 1px;
}

.recipe-step-num {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--recipe-step-accent), #fde047);
    color: var(--app-text);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.2rem 0.6rem rgba(250, 204, 21, 0.35);
    z-index: 1;
}

.recipe-step-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: var(--app-shadow-soft);
}

.recipe-step-img {
    width: 100%;
    max-height: 24rem;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 0.85rem;
}

.recipe-step-text {
    line-height: 1.55;
    white-space: pre-wrap;
}

@media (max-width: 575.98px) {
    .recipe-step {
        grid-template-columns: 2.5rem 1fr;
        gap: 0.5rem 0.65rem;
    }

    .recipe-step-num {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.9rem;
    }

    .recipe-step:not(:last-child)::before {
        left: 1.2rem;
    }
}
