﻿.customStepper {
    position: relative;
    margin-bottom: 70px; /* Increased for more space below */
    z-index: 10; /* Ensure above other elements */
    overflow: visible; /* Prevent clipping */
    min-height: 80px; /* FIX: Minimum height to ensure bars render even if content is minimal */
}

.customStepper-background-bar {
    position: absolute !important; /* !important here if position is overridden */
    background-color: #ccc !important; /* !important to force color over themes */
    height: 5px !important; /* !important if height is reset to 0 or auto */
    top: calc(35px / 2 - 5px / 2) !important; /* !important for vertical alignment */
    left: calc(35px / 2) !important; /* !important for horizontal start */
    width: calc(100% - 35px) !important; /* !important to ensure full span */
    z-index: 0 !important; /* !important if layering is messed up */
    display: block !important; /* FIX: Add this if it's hidden by display:none */
    visibility: visible !important; /* FIX: If visibility is set to hidden */
    opacity: 1 !important; /* FIX: If opacity is 0 */
}

.customStepper-bar {
    position: absolute;
    background: #2196f3; /* Brighter blue if needed */
    height: 5px; /* Match background height */
    top: calc(35px / 2 - 5px / 2); /* Same centering */
    left: calc(35px / 2); /* Start from first icon center */
    width: calc(@ProgressWidth - 35px / Steps.Count); /* FIX: Adjust progress width to fit between centers; approximate based on steps */
    z-index: 1; /* Above background */
    transition: width 0.3s ease;
}

.customStepper-num {
    margin: 0;
    padding: 0 calc(35px / 2); /* FIX: Pad sides by half icon width to align bars properly */
    list-style: none;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2; /* Above bars */
}

    .customStepper-num li {
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 3;
        min-width: 60px;
        position: relative;
    }

.step-icon {
    border: 3px solid lightgray;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 4;
}

.completed .step-icon {
    border-color: #2196f3;
    background-color: #2196f3;
    color: #fff;
    font-weight: bold;
}

.active .step-icon {
    border-width: 4px;
    border-color: #2196f3;
    color: #2196f3;
    font-weight: bold;
}

.pending .step-icon {
    border-color: lightgray;
    color: #808080;
}

.step-label {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    color: #808080;
    max-width: 120px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    z-index: 4;
}

.active .step-label,
.completed .step-label {
    color: #000;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .step-label {
        font-size: 12px;
    }

    .customStepper-num li {
        min-width: 40px;
    }

    .step-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .customStepper-background-bar,
    .customStepper-bar {
        height: 4px; /* Thinner on small screens */
        top: calc(30px / 2 - 4px / 2); /* Recenter */
        left: calc(30px / 2);
        width: calc(100% - 30px);
    }

    .customStepper-num {
        padding: 0 calc(30px / 2);
    }

    .customStepper {
        margin-bottom: 60px;
        min-height: 70px;
    }
}

.row { /* Or the specific parent class */
    position: relative !important; /* Ensure relative for absolute children */
    overflow: visible !important; /* Prevent clipping */
}
