/* ==========================================================================
   Stepper Component Styles
   ========================================================================== */

/* Base Stepper Styles */
.stepper-container {
    margin: 0 auto;
    padding: 1rem 0;
}

.stepper-body {
    padding: 1rem;
}

.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
    min-width: 0;
}

.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 50%;
    right: -50%;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.stepper-item__progress {
    position: relative;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.stepper-item__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.stepper-item__content {
    max-width: 100%;
}

.stepper-item__label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.stepper-item__description {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Dark Theme */
.stepper-dark .stepper-item__count {
    background-color: #e9ecef;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.stepper-dark .stepper-item__label {
    color: #6c757d;
}

.stepper-dark .stepper-item--active .stepper-item__count {
    background-color: #152dba;
    color: #fff;
    border-color: #152dba;
}

.stepper-dark .stepper-item--active .stepper-item__label {
    color: #152dba;
}

.stepper-dark .stepper-item--completed .stepper-item__count {
    background-color: #152dba;
    color: #fff;
    border-color: #152dba;
}

.stepper-dark .stepper-item--completed .stepper-item__label {
    color: #152dba;
}

.stepper-dark .stepper-item--completed:not(:last-child)::after {
    background-color: #152dba;
}

.stepper-dark .stepper-item--active:not(:last-child)::after {
    background-color: #152dba;
}

/* Make stepper items clickable */
.stepper-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.stepper-item:hover .stepper-item__count {
    transform: scale(1.05);
}

.stepper-item:hover .stepper-item__label {
    color: #152dba;
}

/* Light Theme */
.stepper-light .stepper-item__count {
    background-color: #fff;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.stepper-light .stepper-item__label {
    color: #495057;
}

.stepper-light .stepper-item--active .stepper-item__count {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.stepper-light .stepper-item--active .stepper-item__label {
    color: #007bff;
}

.stepper-light .stepper-item--completed .stepper-item__count {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

.stepper-light .stepper-item--completed .stepper-item__label {
    color: #28a745;
}

.stepper-light .stepper-item--completed:not(:last-child)::after {
    background-color: #28a745;
}

.stepper-light .stepper-item--active:not(:last-child)::after {
    background-color: #007bff;
}

/* Size Variations */
.stepper-small .stepper-item__count {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.stepper-small .stepper-item:not(:last-child)::after {
    top: 1rem;
}

.stepper-small .stepper-item__label {
    font-size: 0.75rem;
}

.stepper-small .stepper-item__description {
    font-size: 0.625rem;
}

.stepper-medium .stepper-item__count {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
}

.stepper-medium .stepper-item:not(:last-child)::after {
    top: 1.5rem;
}

.stepper-medium .stepper-item__label {
    font-size: 0.875rem;
}

.stepper-medium .stepper-item__description {
    font-size: 0.75rem;
}

.stepper-large .stepper-item__count {
    width: 4rem;
    height: 4rem;
    font-size: 1.25rem;
}

.stepper-large .stepper-item:not(:last-child)::after {
    top: 2rem;
}

.stepper-large .stepper-item__label {
    font-size: 1rem;
}

.stepper-large .stepper-item__description {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stepper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stepper-item {
        flex-direction: row;
        text-align: left;
        margin-bottom: 1rem;
    }
    
    .stepper-item:not(:last-child)::after {
        display: none;
    }
    
    .stepper-item__progress {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .stepper-item__content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Accessibility */
.stepper-item:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Animation */
.stepper-item__count {
    transition: all 0.3s ease;
}

.stepper-item--active .stepper-item__count {
    transform: scale(1.1);
}

/* Legacy Support for Backward Compatibility */
.stepperSection__card {
    margin: 0 auto;
    border: 0;
    margin-bottom: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.stepperSection__card__child_container {
    margin-top: 0.5rem;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.steps-dark {
    /* Legacy class - maps to stepper-dark */
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
    min-width: 0;
}

.step-item:not(:last-child) .step-progress {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    right: -50%;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.step-progress {
    position: relative;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.step-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1rem;
    background-color: #e9ecef;
    color: #6c757d;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.step-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: #6c757d;
    word-wrap: break-word;
}

.steps-dark .step-item.active .step-count,
.steps-dark .step-item.current .step-count {
    background-color: #152dba;
    color: #fff;
    border-color: #152dba;
}

.steps-dark .step-item.active .step-label,
.steps-dark .step-item.current .step-label {
    color: #152dba;
}

.step-item.current .step-count {
    transform: scale(1.1);
}