﻿.stepper-header {
    display: flex;
    align-items: center;
    padding: 0px 0.5rem;
}

.step {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
    background-clip: content-box;
    width: 30px;
    height: 30px;
    padding: 2px;
    border-radius: var(--border-radius-round);
    background-color: var(--primary-color);
    color: var(--white);
    /*heading-sm*/
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--font-weight-semibold);
}

.step.active,
.step-section.active .step {
    border: 2px solid rgba( var(--primary-color-rgb), 0.8);
    outline: 2px solid rgba(var(--primary-color-rgb), 0.3);
    outline-offset: 2px;
    margin-left: -1px;
    margin-right: -1px;
}

.step:not(.active),
.step-section:not(.active) .step {
    margin-right: 1px;
    margin-left: 1px;
}

.stepper-line {
    /*width: 131px;*/
    flex-grow: 1;
    height: 0px;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-round);
}

.inactive {
    opacity: 0.45;
}

.stepper-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0.75rem;
}

/*Descriptive Stepper*/
.stepper-header.descriptive {
    align-items: flex-start;
    padding: 0px;
}

.step-section {
    padding: 0px 8px;
    flex: 1 1 0%;
    position: relative;
}

.step-connector {
    flex: 1 1 auto;
    position: absolute;
    top: calc(0.5 * 38px);
    left: calc(-50% + 0.5 * 38px);
    right: calc(50% + 0.5 * 38px);
    height: 0px;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-round);
}

.step-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-label {
    margin-top: 8px;
    text-align: center;
    color: var(--text-color-subdued);
}

.step-section.active .step-label {
    margin-top: 4px; /*because of extra border on step*/
}

/*stepper with white inactive for dark mode only*/
[data-mode=dark] .stepper-container.white-inactive .step-section.inactive .step-connector {
    border: 1px solid var(--text-color-main);
}
[data-mode=dark] .stepper-container.white-inactive .step-section.inactive .step {
    background-color: var(--text-color-main);
}
[data-mode=dark] .stepper-container.white-inactive .step-section.inactive {
    opacity: 1;
}


/*Vertical*/
.stepper-vertical{
    display: flex;
    gap: 16px;
}
.stepper-vertical .stepper-header {
    flex-direction: column;
    flex-shrink: 0;
}
.stepper-vertical .stepper-body {
    flex-grow: 1;
}

.stepper-vertical .step-block {
    flex-direction: row;
    gap: 16px;
}
.stepper-vertical .step-label {
    margin-top: 0px;
}
.stepper-vertical .step-section.active .step-label {
    margin-top: 0px; 
}

.stepper-vertical .step-section {
    display: flex;
    align-items: flex-end;
}
.stepper-vertical .step-section:not(:first-child) {
    min-height: 75px;
}
.stepper-vertical .step-section:first-child {
    flex-grow: initial;
}

.stepper-vertical .step-connector {
    top: 2px;
    bottom: 38px;
    right: initial;
    left: calc(0.5 * 36px + 8px);
    height: auto;
}

/*Sub Steps*/
.step-section.sub-step .step {
    width: 10px;
    height: 10px;
    margin-left: calc(0.5 * 38px);
    transform: translateX(calc(-0.5 * 16px));
}
.step-section.active.sub-step .step {
    margin-left: calc(0.5 * 36px);
}
.step-section.sub-step .step-connector {
    bottom: 22px;
}

.step-section.sub-step .step-block {
    gap: 4px;
}

.stepper-vertical .step-section.sub-step {
    min-height: 45px;
}

.stepper-substeps .step-label {
    font-size: var(--font-size-large);
    line-height: var(--line-height-default);
    font-weight: var(--font-weight-regular);
}
.stepper-substeps .sub-step .step-label {
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-light);
}


/*Tril-level stepper*/

.major-steps-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
}

/*@media (min-width: 768px) {
    .major-steps-column {
        min-width: 275px;
    }
}*/


.stepper-trilevel .stepper-header {
    margin-top: 16px;
    display: none;
}
.stepper-trilevel .major-step.active .stepper-header {
    display: flex;
}

.step-tab {
    font-size: var(--font-size-large);
    line-height: var(--line-height-default);
    font-weight: var(--font-weight-regular);
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius-small);
    padding: 8px 12px;
}

@media (max-width: 992px) {
    .step-block {
        position: relative;
    }
    .step-label {
        position: absolute;
        top: 50%;
        left: unset; /*mobile screen responsive issue resolved*/
        transform: translateY(-50%);
        background-color: var(--white);
        padding: 4px 8px;
        border-radius: var(--border-radius-small);
        box-shadow: var(--chart-tooltip-box-shadow);
        white-space: nowrap;
        z-index: 10;
        visibility: hidden;
        opacity: 0;
        margin-left: -8px;
        transition: margin-left 400ms linear, opacity 500ms ease, visibility 500ms ease;
    }
    .step-block:hover .step-label {
        visibility: visible;
        opacity: 1;
        margin-left: 0px;
    }

    .step-tab {
        width: 60px;
/*        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; */
    }
    .step-tab:hover {
        overflow: visible;
        white-space: normal;
        z-index: 10; 
        transition:visibility 500ms ease;
    }
    .major-steps-column {
        min-width: 60px;
    }
}



