/* Ten plik dotyczy sekcji przygotowania: krokow, checklisty
    i elementow pomocniczych wewnatrz etapu przygotowania przepisu. */

.steps-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.step-item {
    border-bottom: 1px solid var(--c-border);
    border-radius: 0;
    background: #ffffff;
}

.step-row {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 5px;
    align-items: start;
    cursor: pointer;
    padding: 14px 16px 10px 0;
}

.step-check {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    margin-top: 4px;
    border: 2px solid var(--c-heading);
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: border-color 140ms ease, background-color 140ms ease;
}

.step-check::before {
    content: "";
    width: 8px;
    height: 13px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 120ms ease;
}

.step-check:checked {
    background: var(--c-accent);
    border-color: var(--c-accent);
}

.step-check:checked::before {
    transform: rotate(45deg) scale(1);
}

.step-check:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

.step-content {
    display: grid;
    gap: 8px;
}

.step-title {
    display: inline-block;
    width: fit-content;
    font-family: var(--font-head);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-heading);
    background: #f3f3f3;
    padding: 4px 8px;
}

.step-text {
    font-size: 0.95rem;
    color: var(--c-text);
}

.step-text p {
    line-height: 1.7;
    margin: 0;
}

.step-text p + p {
    margin-top: 0.42em;
}

.step-check:checked + .step-content .step-title,
.step-check:checked + .step-content .step-text {
    color: #929292;
    text-decoration: line-through;
}

.step-media {
    border: 1px solid var(--c-border);
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.step-media img {
    aspect-ratio: 16 / 10;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.step-tip {
    background: #f7f7f3;
    border-left: 3px solid var(--c-accent);
    color: var(--c-text);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 2px 0 0;
    padding: 8px 10px;
}

@media screen and (max-width: 640px) {
    .step-row {
        grid-template-columns: 28px 1fr;
    }

    .step-title {
        font-size: 0.68rem;
    }

    .step-tip {
        font-size: 0.84rem;
    }
}

.recipe-section--preparation-box h2 {
    margin-bottom: 5px;
}
