/* ==========================================================================
   JUMBO STEPPER - MULTI-STEP FLOW ENGINE & TRANSITIONS
   Decoupled from general system layout. Only loaded when $has_steps = true.
   ========================================================================== */

:root {
    --jb-footer-h: 78px;
}

/* Master Layout Safe Zone for Sticky Stepper Footer */
body:has(> footer) > main {
    padding-bottom: calc(var(--jb-footer-h) + 1.5rem);
}

/* ==========================================================================
   STEPS VIEWPORT & STEP TRANSITIONS
   ========================================================================== */
.steps-viewport {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    position: relative;
}

.step {
    display: none;
    width: 100%;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step > h1,
.step-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--jb-text-main);
    text-align: center;
    margin-bottom: 0.85rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .step > h1,
    .step-title {
        font-size: 2.5rem;
    }
}

.step > p,
.step-subtitle {
    font-size: 1.15rem;
    color: var(--jb-text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

/* ==========================================================================
   STICKY FOOTER NAVIGATION & PROGRESS BAR (body > footer)
   ========================================================================== */
body > footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--jb-bg);
    border-top: 1px solid var(--jb-border);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body > footer .progress-track {
    height: 4px;
    width: 100%;
    background: var(--jb-surface);
}

#stepper-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--jb-primary);
    transition: width 0.4s ease;
}

body > footer > nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body > footer button {
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

#btn-prev {
    font-size: 1rem;
    color: var(--jb-text-main);
    background: transparent;
    padding: 10px 18px;
    border-radius: 10px;
}

#btn-prev:hover {
    background: var(--jb-surface);
}

#btn-next {
    font-size: 1.05rem;
    color: var(--jb-primary-text);
    background: var(--jb-primary);
    padding: 12px 28px;
    border-radius: 50px;
}

#btn-next:hover {
    background: var(--jb-primary-hover);
    transform: scale(1.02);
}
