/* Sub-steps styling for the vertical stepper */

.sub-steps {
    margin-top: 12px;
    margin-left: 20px;
    opacity: 0.6;
    transition: all 0.4s ease;
    overflow: hidden;
    max-height: 0;
    padding: 0;
}

.sub-steps.active {
    opacity: 1;
    max-height: 500px; /* Adjust based on expected content */
    padding: 8px 0;
}

/* Progressive disclosure animation - sub-steps slide in when main step is reached */
.stepper-item.current .sub-steps,
.stepper-item.completed .sub-steps {
    max-height: 500px;
    opacity: 1;
    padding: 8px 0;
}

.stepper-item.current .sub-steps {
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin-left: 16px;
}

.stepper-item.completed .sub-steps {
    background: rgba(40, 167, 69, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin-left: 16px;
}

.sub-step-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.sub-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
    color: #6c757d;
    transition: all 0.3s ease;
}

.sub-step-item.completed .sub-step-icon {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.sub-step-item.current .sub-step-icon {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.sub-step-title {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    transition: color 0.3s ease;
}

.sub-step-item.completed .sub-step-title {
    color: #28a745;
}

.sub-step-item.current .sub-step-title {
    color: #007bff;
    font-weight: 600;
}

/* Dark mode support for better contrast */
:root.dark-mode .sub-step-title {
    color: #e9ecef; /* Light gray for better contrast in dark mode */
}

:root.dark-mode .sub-step-item.completed .sub-step-title {
    color: #40d962; /* Brighter green for better contrast */
}

:root.dark-mode .sub-step-item.current .sub-step-title {
    color: #4dabf7; /* Brighter blue for better contrast */
    font-weight: 600;
}

/* Also improve icon contrast in dark mode */
:root.dark-mode .sub-step-icon {
    border-color: #495057;
    background-color: #343a40;
    color: #adb5bd;
}

:root.dark-mode .sub-step-item.completed .sub-step-icon {
    background-color: #40d962;
    border-color: #40d962;
    color: #000; /* Black text for better contrast on bright green */
}

:root.dark-mode .sub-step-item.current .sub-step-icon {
    background-color: #4dabf7;
    border-color: #4dabf7;
    color: #000; /* Black text for better contrast on bright blue */
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
}

.current-sub-step {
    font-size: 12px;
    font-weight: bold;
}

.future-sub-step {
    font-size: 12px;
}

/* Responsive design for mobile */
@media (max-width: 767px) {
    .sub-steps {
        margin-left: 16px;
    }
    
    .sub-step-icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
        font-size: 10px;
    }
    
    .sub-step-title {
        font-size: 12px;
    }
}

/* Animation for sub-step appearance */
.sub-step-item {
    animation: fadeInUp 0.3s ease forwards;
}

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

/* Enhanced spacing for main steps with sub-steps */
.stepper-item .stepper-content {
    position: relative;
}

.stepper-item:has(.sub-steps) .stepper-line {
    height: calc(100% + 40px); /* Extend line to accommodate sub-steps */
}

/* Improve the visual hierarchy */
.stepper-item.current .sub-steps {
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin-left: 16px;
}

.stepper-item.completed .sub-steps {
    background: rgba(40, 167, 69, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin-left: 16px;
}
