/**
 * Workflow Stepper Component Styles
 *
 * Visual progress indicator for multi-step workflows.
 * Shows current position, completed steps, and pending steps.
 *
 * Version: 1.0
 * Date: February 9, 2026
 */

/* Horizontal Layout (Default) */
.workflow-stepper.horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
}

.workflow-stepper.horizontal .stepper-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Vertical Layout */
.workflow-stepper.vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.workflow-stepper.vertical .stepper-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Step Indicator */
.step-indicator {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.workflow-stepper.vertical .step-indicator {
    flex-direction: row;
}

.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    background: #e9ecef;
    color: #6c757d;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

/* Step Connector Line */
.step-connector {
    position: absolute;
    background: #e9ecef;
    transition: all 0.3s ease;
}

.workflow-stepper.horizontal .step-connector {
    width: 100%;
    height: 3px;
    top: 1.5rem;
    left: 50%;
}

.workflow-stepper.vertical .step-connector {
    width: 3px;
    height: 100%;
    left: 1.5rem;
    top: 3rem;
}

/* Step Content */
.step-content {
    text-align: center;
    margin-top: 0.75rem;
}

.workflow-stepper.vertical .step-content {
    text-align: left;
    margin-top: 0;
    flex: 1;
}

.step-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.step-description {
    font-size: 0.8125rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Completed State */
.stepper-step.completed .step-number {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.stepper-step.completed + .stepper-step .step-connector {
    background: #28a745;
}

.stepper-step.completed .step-label {
    color: #28a745;
}

/* Current State */
.stepper-step.current .step-number {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    animation: pulse-step 2s ease-in-out infinite;
}

.stepper-step.current .step-label {
    color: #0d6efd;
    font-weight: 700;
}

.stepper-step.current .step-description {
    color: #495057;
}

@keyframes pulse-step {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(13, 110, 253, 0.15);
    }
}

/* Pending State */
.stepper-step.pending .step-number {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
}

.stepper-step.pending .step-label {
    color: #6c757d;
}

/* Clickable Steps */
.stepper-step.clickable {
    cursor: pointer;
}

.stepper-step.clickable:hover .step-number {
    transform: scale(1.1);
    border-color: #0d6efd;
}

.stepper-step.clickable:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 4px;
    border-radius: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Force vertical layout on mobile */
    .workflow-stepper.horizontal {
        flex-direction: column;
        gap: 1rem;
    }

    .workflow-stepper.horizontal .stepper-step {
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
    }

    .workflow-stepper.horizontal .step-indicator {
        flex-direction: column;
    }

    .workflow-stepper.horizontal .step-connector {
        width: 3px;
        height: 100%;
        left: 1.5rem;
        top: 3rem;
    }

    .workflow-stepper.horizontal .step-content {
        text-align: left;
        margin-top: 0;
        margin-left: 1rem;
        flex: 1;
    }

    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.875rem;
    }

    .step-description {
        font-size: 0.75rem;
    }
}

/* Compact Variant */
.workflow-stepper.compact .step-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.workflow-stepper.compact .step-label {
    font-size: 0.8125rem;
}

.workflow-stepper.compact .step-description {
    display: none;
}

/* Icon Variant */
.step-number i {
    font-size: 1.125rem;
}

.workflow-stepper.compact .step-number i {
    font-size: 0.875rem;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .step-number {
        background: #343a40;
        color: #adb5bd;
        border-color: #495057;
    }

    .step-connector {
        background: #495057;
    }

    .step-label {
        color: #adb5bd;
    }

    .step-description {
        color: #6c757d;
    }

    .stepper-step.completed .step-number {
        background: #28a745;
        color: white;
    }

    .stepper-step.current .step-number {
        background: #0d6efd;
        color: white;
    }

    .stepper-step.pending .step-number {
        background: #212529;
        color: #6c757d;
    }
}

/* Print Styles */
@media print {
    .workflow-stepper {
        page-break-inside: avoid;
    }

    .step-connector {
        background: #000 !important;
    }

    .stepper-step.clickable:hover .step-number {
        transform: none;
    }
}

/* Loading State */
.workflow-stepper.loading .step-number {
    position: relative;
    overflow: hidden;
}

.workflow-stepper.loading .step-number::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
