/**
 * recipe-long-steps CSS
 * Component-specific styles: Step cards, toggle mechanism, lightbox, and image sizing
 */

/* ==========================================================================
   STEP CARDS - Simple card design
   ========================================================================== */

.recipe-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.recipe-step {
    display: flex;
    gap: var(--spacing-3);
    padding: var(--spacing-4);
    background: var(--color-white);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
}

.recipe-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-brand);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    font-family: var(--font-sans);
}

.recipe-step-content {
    flex: 1;
    min-width: 0;
}

.recipe-step-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-neutral-900);
    margin: 0 0 var(--spacing-2) 0;
    font-family: var(--font-sans);
}

.recipe-step-text {
    font-size: var(--font-size-base);
    color: var(--color-neutral-600);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

.recipe-step-image {
    margin-top: var(--spacing-4);
}

.recipe-step-image img {
    width: 50%;
    max-width: 50%;
    height: auto;
    border-radius: var(--radius-lg);
}

.recipe-step-tip {
    margin-top: var(--spacing-3);
    padding: var(--spacing-3);
    background: var(--color-brand-50);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    color: var(--color-brand-700);
}

.recipe-step-tip::before {
    content: "Tipp: ";
    font-weight: var(--font-weight-semibold);
}

.recipe-steps-section .inline-ingredients svg {
    max-width: 20px;
}

/* ==========================================================================
   SECTION HEADINGS - Dividers between step groups
   ========================================================================== */

.recipe-steps__section-heading {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-neutral-800);
    margin: var(--spacing-6) 0 var(--spacing-2) 0;
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--color-neutral-200);
    font-family: var(--font-sans);
}

/* ==========================================================================
   CSS-ONLY LIGHTBOX
   ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-overlay-black-90);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox:target {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-5);
    right: var(--spacing-8);
    color: var(--color-white);
    font-size: var(--font-size-4xl);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-neutral-300);
}

.lightbox-title {
    position: absolute;
    bottom: var(--spacing-5);
    left: 0;
    right: 0;
    text-align: center;
    color: var(--color-white);
    font-size: var(--font-size-base);
}

.step_heading_after{
    margin-top: var(--spacing-3);
}

/* ==========================================================================
   IMAGE TOGGLE - Icon-based Pure CSS
   ========================================================================== */

/* Hide checkbox visually but keep it functional */
.bap_image_toggle_input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Toggle button styling */
.bap_image_toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 56px;
    cursor: pointer;
    border-radius: var(--radius-lg);
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.bap_image_toggle:hover {
    background: var(--color-neutral-200);
}

/* Icon base styles - hide by default */
.bap_image_toggle .toggle_icon {
    display: none;
    width: 56px;
    height: 40px;
}

.bap_image_toggle .toggle_icon svg {
    width: 100%;
    height: 100%;
}

/* ===== CHECKED STATE (Images Visible) ===== */
/* Show crossed camera icon (click to hide) */
#stepImagesToggle:checked ~ .recipe-section__header .toggle_icon--visible {
    display: block !important;
}

/* Accent color when active */
#stepImagesToggle:checked ~ .recipe-section__header .bap_image_toggle {
    color: var(--color-brand-500);
}

/* Images are visible */
#stepImagesToggle:checked ~ .recipe-steps .recipe-step-image {
    display: block;
}

/* ===== UNCHECKED STATE (Images Hidden) ===== */
/* Show camera icon (click to show) */
#stepImagesToggle:not(:checked) ~ .recipe-section__header .toggle_icon--hidden {
    display: block !important;
}

/* Muted color when inactive */
#stepImagesToggle:not(:checked) ~ .recipe-section__header .bap_image_toggle {
    color: var(--color-neutral-400);
}

/* Images are hidden */
#stepImagesToggle:not(:checked) ~ .recipe-steps .recipe-step-image {
    display: none;
}
