﻿
/* ----------------------------------------- Structure ----------------------------------------- */

.container-progress {
    width: 100%;
    padding: 12px 20px;
    height: fit-content;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.60) inset, 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: background 0.25s ease, box-shadow 0.25s ease;
    position: sticky;
    top: 10px;
    z-index: 20;
}

.container-progress:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.70) inset, 0 12px 28px rgba(0, 0, 0, 0.10);
}

.progress {
    width: 100%;
}




/* -------------------------------------------- Step -------------------------------------------- */

.steps {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    counter-reset: step;
    position: relative;
}

.step {
    position: relative;
    text-align: center;
    flex: 1;
}

.step__circle {
    width: var(--radius-step);
    height: var(--radius-step);
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--color-gray);
    display: grid;
    place-content: center;
    color: var(--color-gray);
    font-weight: 600;
    transition: transform .25s, border-color var(--duration), background var(--duration);
    position: relative;
    z-index: 2;
}

.step__label {
    display: none;
}

.bar-by-step {
    top: 0;
    left: 0;
    position: absolute;
    display: relative;
    width: 100%;
    height: 44px;
    z-index: 1;
}

.bar-by-step hr {
    left: 0;
    position: absolute;
    top: calc((var(--radius-step) - 2px) / 2);
    transition: width 0.2s ease;
    margin: 0;
    border-radius: 4px;
}

.bar-gray {
    border: 2px solid var(--color-gray);
    width: calc(100% + 4px);
}

.bar-color {
    border: 3px solid var(--color-accent);
    width: 0;
}

.is-complete .bar-color {
    width: calc(100% + 4px);
}

.last-step {
    flex: none;
}

.step__circle::before {
    counter-increment: step;
    content: counter(step);
}




/* -------------------------------------------- Status -------------------------------------------- */

.step.is-complete .step__circle,
.step.is-active .step__circle {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.step.is-active .step__circle:hover {
    transform: scale(1.15) rotate(-3deg);
}

.step.is-complete .step__circle {
    background: var(--color-accent);
    color: #fff;
    transform: scale(1);
}

.step.is-active .step__circle {
    animation: bounce .5s;
}

.step.is-active:hover .step__circle, .step.is-complete:hover .step__circle {
    box-shadow: 0 0 4px 4px var(--color-shadow);
}

/* -------------------------------------------- Animation -------------------------------------------- */
@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }
}




/* ################################################# MODO PC ################################################# */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}




@media (min-width: 720px) {

    /* -------------------------------------------- Step -------------------------------------------- */

    .steps {
        flex-direction: column;
        margin: 0 0 1.5rem;
    }

    .step {
        display: flex;
        min-height: calc( var(--radius-step) * 1.6);
        cursor: pointer;
    }

    .step__label {
        font-size: 14px;
        width: calc( 100% - var(--radius-step) - 4px);
        padding: 4px 8px;
        color: var(--color-balck);
        display: flex;
        align-items: center;
        min-height: var(--radius-step);
        height: fit-content;
        font-weight: bold;
        text-align: start;
    }

    .bar-by-step {
        top: 0;
        left: 0;
        position: absolute;
        height: 100%;
        width: var(--radius-step);
    }

    .bar-by-step hr {
        top: 0;
        left: calc((var(--radius-step) - 4px) / 2);
        transition: height 0.2s ease;
    }

    .bar-gray {
        width: auto;
        height: calc(100% + 4px);
    }

    .bar-color {
        width: auto;
        height: 0;
    }

    .is-complete .bar-color {
        height: calc(100% + 4px);
        width: auto;
    }




    /* ----------------------------------------- Structure ----------------------------------------- */

    
    .container-progress {
        width: var(--width-progress);
        padding: 20px;
        top: 20px !important;
    }

    .container-progress:hover {
        background: rgba(255, 255, 255, 0.75);
        box-shadow: 0 0 2px rgba(255, 255, 255, 0.70) inset, 0 12px 28px rgba(0, 0, 0, 0.10);
    }

    .last-step {
        min-height: var(--radius-step) !important;
    }

    .container-progress h2 {
        margin: 8px 0 20px;
    }

}


