/**
 * Steps Block - Static Styles
 *
 * BEM: boost-steps, --horizontal, --vertical, --style-{default|cards|minimal|bordered|letter}
 *
 * Indicator is automatic: icon if set, step number otherwise.
 * All 4 visual styles work with both icon and number indicators.
 *
 * Style differentiation:
 * - default:  Accent circle indicator + connecting line between steps.
 * - cards:    Elevated card per step, soft-fill indicator, hover lift, no line.
 * - minimal:  Small dot indicator, ultra-clean, subtle dashed line.
 * - bordered: Outlined indicator + bordered step containers.
 *
 * @package Boost Theme Framework
 * @since 3.6.0
 */

/* /blocks/steps/style.css */

/* =============================================================================
   BASE
   ============================================================================= */

.boost-steps {
    position: relative;
    padding: 3rem 2rem;
    background: var(--boost-bg);
    container-type: inline-size;
}

.boost-steps__container {
    margin: 0 auto;
    padding: 0 1rem;
}

/* =============================================================================
   HORIZONTAL GRID
   ============================================================================= */

.boost-steps--horizontal .boost-steps__grid {
    display: grid;
    gap: 2rem;
    position: relative;
}

.boost-steps--horizontal .boost-steps__item {
    position: relative;
    text-align: center;
}

.boost-steps--horizontal .boost-steps__indicator {
    margin: 0 auto 1.25rem;
}

/* =============================================================================
   VERTICAL TIMELINE
   ============================================================================= */

.boost-steps--vertical .boost-steps__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: var(--boost-container-narrow, 700px);
    padding-left: 72px;
}

.boost-steps--vertical .boost-steps__item {
    position: relative;
    text-align: left;
    padding-bottom: 2.5rem;
}

.boost-steps--vertical .boost-steps__item:last-child {
    padding-bottom: 0;
}

.boost-steps--vertical .boost-steps__indicator {
    position: absolute;
    left: -72px;
    top: 0;
}

/* =============================================================================
   INDICATOR (shared base)
   ============================================================================= */

.boost-steps__indicator {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    border-radius: 50%;
}

.boost-steps__number {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.boost-steps__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.boost-steps__icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

/* =============================================================================
   CONTENT (shared)
   ============================================================================= */

.boost-steps__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--boost-text, inherit);
    margin: 0 0 0.5rem;
}

.boost-steps__desc {
    font-size: 0.95rem;
    color: var(--boost-text-muted, #64748b);
    line-height: 1.6;
    margin: 0;
}

/* Section body text (below header). */
.boost-steps__text {
    text-align: center;
    font-size: 1.05rem;
    color: var(--boost-text-muted, #64748b);
    line-height: 1.7;
    max-width: var(--boost-container-narrow, 700px);
    margin: -0.5rem auto 2.5rem;
}

/* =============================================================================
   STYLE: DEFAULT
   Filled accent circle + solid connecting line.
   ============================================================================= */

.boost-steps--style-default .boost-steps__indicator {
    background: var(--boost-accent, var(--boost-primary, #3b82f6));
    color: var(--boost-accent-text, #fff);
}

/* Horizontal connecting line. */
.boost-steps--style-default.boost-steps--horizontal .boost-steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(50% + 36px);
    right: calc(-50% + 36px);
    height: 2px;
    background: var(--boost-border, #e2e8f0);
    z-index: 0;
}

/* Vertical connecting line. */
.boost-steps--style-default.boost-steps--vertical .boost-steps__grid::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--boost-border, #e2e8f0);
    z-index: 0;
}

/* =============================================================================
   STYLE: CARDS
   Elevated card per step, soft-fill indicator, hover lift.
   No connecting line.
   ============================================================================= */

.boost-steps--style-cards .boost-steps__indicator {
    width: 48px;
    height: 48px;
    background: rgba(var(--boost-accent-rgb, 37, 99, 235), 0.12);
    color: var(--boost-accent, var(--boost-primary, #3b82f6));
    border-radius: 14px;
}

.boost-steps--style-cards .boost-steps__number {
    font-size: 1.1rem;
}

/* Horizontal cards. */
.boost-steps--style-cards.boost-steps--horizontal .boost-steps__item {
    background: var(--boost-card-bg, #fff);
    border: 1px solid var(--boost-card-border, var(--boost-border, #e2e8f0));
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.boost-steps--style-cards.boost-steps--horizontal .boost-steps__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Vertical cards. */
.boost-steps--style-cards.boost-steps--vertical .boost-steps__grid {
    padding-left: 0;
    gap: 1rem;
}

.boost-steps--style-cards.boost-steps--vertical .boost-steps__item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--boost-card-bg, #fff);
    border: 1px solid var(--boost-card-border, var(--boost-border, #e2e8f0));
    border-radius: 16px;
    padding: 1.5rem;
    padding-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.boost-steps--style-cards.boost-steps--vertical .boost-steps__item:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.boost-steps--style-cards.boost-steps--vertical .boost-steps__indicator {
    position: static;
    flex-shrink: 0;
}

/* =============================================================================
   STYLE: MINIMAL
   Small dot indicator, ultra-clean, subtle dashed line.
   ============================================================================= */

.boost-steps--style-minimal .boost-steps__indicator {
    width: 32px;
    height: 32px;
    background: var(--boost-accent, var(--boost-primary, #3b82f6));
    color: var(--boost-accent-text, #fff);
    font-size: 0.75rem;
}

.boost-steps--style-minimal .boost-steps__number {
    font-size: 0.8rem;
    font-weight: 700;
}

.boost-steps--style-minimal .boost-steps__icon svg {
    width: 16px;
    height: 16px;
}

/* Horizontal minimal: dashed line. */
.boost-steps--style-minimal.boost-steps--horizontal .boost-steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 1px;
    border-top: 2px dashed var(--boost-border, #e2e8f0);
    z-index: 0;
}

/* Vertical minimal. */
.boost-steps--style-minimal.boost-steps--vertical .boost-steps__grid {
    padding-left: 48px;
}

.boost-steps--style-minimal.boost-steps--vertical .boost-steps__indicator {
    left: -48px;
}

.boost-steps--style-minimal.boost-steps--vertical .boost-steps__grid::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed var(--boost-border, #e2e8f0);
    z-index: 0;
}

/* =============================================================================
   STYLE: BORDERED
   Outlined indicator + bordered step containers.
   ============================================================================= */

.boost-steps--style-bordered .boost-steps__indicator {
    width: 56px;
    height: 56px;
    background: transparent;
    color: var(--boost-accent, var(--boost-primary, #3b82f6));
    border: 2px solid var(--boost-accent, var(--boost-primary, #3b82f6));
}

.boost-steps--style-bordered .boost-steps__number {
    font-weight: 800;
}

/* Horizontal bordered. */
.boost-steps--style-bordered.boost-steps--horizontal .boost-steps__item {
    border: 1px solid var(--boost-border, #e2e8f0);
    border-radius: 12px;
    padding: 2rem 1.5rem;
}

.boost-steps--style-bordered.boost-steps--horizontal .boost-steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(28px + 2rem);
    left: calc(50% + 36px);
    right: calc(-50% + 36px);
    height: 2px;
    background: var(--boost-border, #e2e8f0);
    z-index: 0;
}

/* Vertical bordered. */
.boost-steps--style-bordered.boost-steps--vertical .boost-steps__item {
    border: 1px solid var(--boost-border, #e2e8f0);
    border-radius: 12px;
    padding: 1.5rem;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    margin-left: -16px;
}

.boost-steps--style-bordered.boost-steps--vertical .boost-steps__item:last-child {
    margin-bottom: 0;
}

.boost-steps--style-bordered.boost-steps--vertical .boost-steps__grid {
    padding-left: 80px;
}

.boost-steps--style-bordered.boost-steps--vertical .boost-steps__indicator {
    left: -80px;
}

/* Bordered vertical: NO connecting line — borders on items are enough. */

/* =============================================================================
   STYLE: LETTER
   Big decorative letter + step counter "01 / 05".
   Casarella-style: oversized accent letter, dark card, monospace counter.
   ============================================================================= */

.boost-steps--style-letter .boost-steps__indicator {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Step counter: "01 / 05" */
.boost-steps__counter {
    font-family: var(--boost-font-mono, ui-monospace, monospace);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--boost-text-muted, #64748b);
    letter-spacing: 0.05em;
    line-height: 1;
}

/* Big decorative letter */
.boost-steps__letter {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 0.85;
    color: var(--boost-accent, var(--boost-primary, #3b82f6));
    letter-spacing: -0.02em;
}

/* Horizontal letter: dark cards with subtle border. */
.boost-steps--style-letter.boost-steps--horizontal .boost-steps__item {
    background: var(--boost-preset-item-bg, var(--boost-card-bg, var(--boost-bg-alt)));
    border: var(--boost-preset-item-border, 1px solid var(--boost-border, rgba(255, 255, 255, 0.1)));
    border-radius: var(--boost-preset-item-radius, 16px);
    padding: var(--boost-preset-item-padding, 2rem 1.5rem);
    box-shadow: var(--boost-preset-item-shadow, none);
    text-align: left;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Horizontal letter: center indicator. */
.boost-steps--style-letter.boost-steps--horizontal .boost-steps__indicator {
    margin: 0 0 1rem;
}

/* Vertical letter: larger indicator, left aligned. */
.boost-steps--style-letter.boost-steps--vertical .boost-steps__grid {
    padding-left: 0;
    gap: 2rem;
}

.boost-steps--style-letter.boost-steps--vertical .boost-steps__item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.boost-steps--style-letter.boost-steps--vertical .boost-steps__indicator {
    position: static;
    flex-shrink: 0;
    min-width: 80px;
}

/* =============================================================================
   CONTAINER QUERIES — respond to actual container width, not viewport.
   container-type is set on .boost-steps (section) to avoid clipping.
   ============================================================================= */

@container (max-width: 1024px) {
    .boost-steps--horizontal .boost-steps__grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Hide horizontal connecting lines in narrow container. */
    .boost-steps--horizontal .boost-steps__item::after {
        display: none !important;
    }
}

@container (max-width: 768px) {
    .boost-steps--horizontal .boost-steps__grid {
        grid-template-columns: 1fr !important;
        max-width: 500px;
    }

    .boost-steps--vertical .boost-steps__grid {
        padding-left: 56px;
    }

    .boost-steps--vertical .boost-steps__grid::before {
        left: 21px !important;
    }

    .boost-steps__indicator {
        width: 44px;
        height: 44px;
    }

    .boost-steps--style-minimal .boost-steps__indicator {
        width: 28px;
        height: 28px;
    }

    .boost-steps--style-cards .boost-steps__indicator {
        width: 40px;
        height: 40px;
    }

    .boost-steps--vertical .boost-steps__indicator {
        left: -56px;
    }

    .boost-steps--style-minimal.boost-steps--vertical .boost-steps__grid {
        padding-left: 42px;
    }

    .boost-steps--style-minimal.boost-steps--vertical .boost-steps__indicator {
        left: -42px;
    }

    .boost-steps--style-minimal.boost-steps--vertical .boost-steps__grid::before {
        left: 13px !important;
    }

    .boost-steps--style-bordered.boost-steps--vertical .boost-steps__grid {
        padding-left: 64px;
    }

    .boost-steps--style-bordered.boost-steps--vertical .boost-steps__indicator {
        left: -64px;
    }

    .boost-steps__number {
        font-size: 1rem;
    }

    .boost-steps--style-letter .boost-steps__letter {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }
}

/* =============================================================================
   VIEWPORT FALLBACK — for browsers without container query support (< 2%)
   ============================================================================= */

@supports not (container-type: inline-size) {
    @media (max-width: 1024px) {
        .boost-steps--horizontal .boost-steps__grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }

        .boost-steps--horizontal .boost-steps__item::after {
            display: none !important;
        }
    }

    @media (max-width: 768px) {
        .boost-steps--horizontal .boost-steps__grid {
            grid-template-columns: 1fr !important;
            max-width: 500px;
        }

        .boost-steps--vertical .boost-steps__grid {
            padding-left: 56px;
        }

        .boost-steps--vertical .boost-steps__grid::before {
            left: 21px !important;
        }

        .boost-steps__indicator {
            width: 44px;
            height: 44px;
        }

        .boost-steps--style-minimal .boost-steps__indicator {
            width: 28px;
            height: 28px;
        }

        .boost-steps--style-cards .boost-steps__indicator {
            width: 40px;
            height: 40px;
        }

        .boost-steps--vertical .boost-steps__indicator {
            left: -56px;
        }

        .boost-steps--style-minimal.boost-steps--vertical .boost-steps__grid {
            padding-left: 42px;
        }

        .boost-steps--style-minimal.boost-steps--vertical .boost-steps__indicator {
            left: -42px;
        }

        .boost-steps--style-minimal.boost-steps--vertical .boost-steps__grid::before {
            left: 13px !important;
        }

        .boost-steps--style-bordered.boost-steps--vertical .boost-steps__grid {
            padding-left: 64px;
        }

        .boost-steps--style-bordered.boost-steps--vertical .boost-steps__indicator {
            left: -64px;
        }

        .boost-steps__number {
            font-size: 1rem;
        }

        .boost-steps--style-letter .boost-steps__letter {
            font-size: clamp(2.5rem, 6vw, 4rem);
        }
    }
}