/**
 * Wizard Layout: Progress Bar (Ultra Compact)
 * Linear wizard with inline header + step indicators
 * 
 * BEST FOR: 3-5 simple linear steps
 * SUPPORTS BRANCHING: No
 * 
 * v3.0 - Ultra compact with header row layout
 */

/* ============================================
   FLOATING CARD - Header Row Layout
   ============================================ */

.lp-content .wizard-layout-progress_bar .wizard-floating-card {
    position: relative;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Header row: Title/Subtitle on left, Steps on right */
.lp-content .wizard-layout-progress_bar .wizard-floating-card::before {
    content: '';
    display: block;
}

/* Title - left aligned, inline with steps (higher specificity to override wizard.css) */
.lp-content .lp-wizard-section.wizard-layout-progress_bar .section-title {
    text-align: left;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    padding-right: 120px; /* Space for step indicators */
    border-radius: 0;
}

/* Subtitle - left aligned, smaller */
.lp-content .lp-wizard-section.wizard-layout-progress_bar .section-subtitle {
    text-align: left;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-right: 120px;
    border-bottom: solid 1px #CCC;
    padding-bottom: 10px;
}

/* ============================================
   PROGRESS BAR - Hidden (steps only)
   ============================================ */

.wizard-layout-progress_bar .wizard-progress-bar {
    display: none; /* Hide the progress bar line */
}

.wizard-layout-progress_bar .wizard-progress-bar-fill {
    display: none;
}

/* ============================================
   STEP INDICATORS - Top Right Position
   ============================================ */

.wizard-layout-progress_bar .wizard-progress-steps {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.wizard-layout-progress_bar .wizard-progress-step {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--lp-radius-full);
    background: var(--lp-border-light);
    color: var(--lp-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid var(--lp-border);
}

.wizard-layout-progress_bar .wizard-progress-step.active {
    background: var(--lp-brand);
    color: white;
    border-color: var(--lp-brand);
}

.wizard-layout-progress_bar .wizard-progress-step.completed {
    background: var(--lp-success);
    color: white;
    border-color: var(--lp-success);
}

.wizard-layout-progress_bar .wizard-progress-step.completed::after {
    content: '✓';
    position: absolute;
    font-size: 0.7rem;
}

/* ============================================
   STEP CONTENT - Ultra Compact Style
   ============================================ */

.wizard-layout-progress_bar .wizard-step-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--lp-brand);
    margin-bottom: 0.75rem;
    text-align: left;
    padding: 0;
}

/* Override the default styled p tag inside step title */
.wizard-layout-progress_bar .wizard-step-title > p {
    font-size: 1rem;
    font-weight: 500;
    background: none;
    color: var(--lp-brand);
    padding: 0;
    border-radius: 0;
    display: block;
    border: none;
    margin-bottom: 0;
}

.wizard-layout-progress_bar .wizard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* ============================================
   OPTIONS - Ultra Compact Cards
   ============================================ */

.wizard-layout-progress_bar .wizard-option {
    background: white;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-md);
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wizard-layout-progress_bar .wizard-option:hover {
    border-color: var(--lp-brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.wizard-layout-progress_bar .wizard-option.selected {
    background: var(--lp-brand);
    border-color: var(--lp-brand);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(207, 28, 60, 0.2);
}

/* ============================================
   OPTION CONTENT - Ultra Compact Sizing
   ============================================ */

.wizard-layout-progress_bar .wizard-option-icon-emoji {
    font-size: 3.5rem;
    margin-bottom: 0.35rem;
}

.wizard-layout-progress_bar .wizard-option-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    margin-bottom: 0.35rem;
}

.wizard-layout-progress_bar .wizard-option-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lp-text-dark);
    transition: color 0.2s ease;
    line-height: 1.2;
}

.wizard-layout-progress_bar .wizard-option.selected .wizard-option-label {
    color: white;
}

.wizard-layout-progress_bar .wizard-option-sublabel {
    font-size: 0.75rem;
    color: var(--lp-text-muted);
    margin-top: 0.2rem;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.wizard-layout-progress_bar .wizard-option.selected .wizard-option-sublabel {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   LOADING STATE
   ============================================ */

.wizard-layout-progress_bar .wizard-option.loading {
    pointer-events: none;
    opacity: 0.7;
}

.wizard-layout-progress_bar .wizard-option-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid var(--lp-border);
    border-top-color: var(--lp-brand);
    border-radius: 50%;
    animation: spinCentered 0.8s linear infinite;
}

.wizard-layout-progress_bar .wizard-option.loading .wizard-option-loading {
    display: block;
}

/* ============================================
   NAVIGATION - Ultra Compact
   ============================================ */

.wizard-layout-progress_bar .wizard-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--lp-border-light);
}

.wizard-layout-progress_bar .wizard-nav .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE - Mobile Wrapping Layout
   ============================================ */

@media (max-width: 768px) {
    /* Header wraps: title/subtitle stack, steps below */
    .lp-content .wizard-layout-progress_bar .wizard-floating-card {
        padding: 1rem;
    }
    
    .lp-content .lp-wizard-section.wizard-layout-progress_bar .section-title {
        font-size: 1.25rem;
        padding-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .lp-content .lp-wizard-section.wizard-layout-progress_bar .section-subtitle {
        font-size: 0.8rem;
        padding-right: 0;
        margin-bottom: 0.75rem;
    }
    
    /* Steps move below title on mobile */
    .wizard-layout-progress_bar .wizard-progress-steps {
        position: relative;
        top: auto;
        right: auto;
        justify-content: flex-start;
        margin-bottom: 0.75rem;
        gap: 0.35rem;
    }
    
    .wizard-layout-progress_bar .wizard-progress-step {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.65rem;
    }
    
    .wizard-layout-progress_bar .wizard-step-title,
    .wizard-layout-progress_bar .wizard-step-title > p {
        font-size: 0.9rem;
    }
    
    .wizard-layout-progress_bar .wizard-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .wizard-layout-progress_bar .wizard-option {
        padding: 0.75rem 0.5rem;
    }
    
    .wizard-layout-progress_bar .wizard-option-icon-emoji {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .wizard-layout-progress_bar .wizard-option-icon-img {
        width: 28px;
        height: 28px;
        margin-bottom: 0.25rem;
    }
    
    .wizard-layout-progress_bar .wizard-option-label {
        font-size: 0.75rem;
    }
    
    .wizard-layout-progress_bar .wizard-option-sublabel {
        font-size: 0.65rem;
    }
    
    .wizard-layout-progress_bar .wizard-nav {
        margin-top: 0.75rem;
        padding-top: 0.5rem;
    }
    
    .wizard-layout-progress_bar .wizard-nav .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .lp-content .lp-wizard-section.wizard-layout-progress_bar .section-title {
        font-size: 1.1rem;
    }
    
    .wizard-layout-progress_bar .wizard-options {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }
    
    .wizard-layout-progress_bar .wizard-option {
        padding: 0.6rem 0.4rem;
    }
    
    .wizard-layout-progress_bar .wizard-option-label {
        font-size: 0.7rem;
    }
}
