:root {
    --fill-bg:#83eb83;
    --empty-bg:#e0f0c6;
    --fill-step-bg:#a05386;
    --empty-step-bg:#dbb8cf;
    --fill-circle-bg:#6c6cf1;
    --empty-circle-bg:#b3b3ec;
    --fill-line-bg:#f3f35c;
    --empty-line-bg:#f7f7ef;
}

*{
    box-sizing: border-box;
}

body{
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(30rem,1fr));
    
}

.container {
    justify-items: center;
    text-align: center;
    border: 2px solid var(--empty-bg);
    padding: 4rem;
    border-radius: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    margin: 2rem;
}

.progress-container{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    max-width: 350px;
    /* background: red; */
}

.progress-container::before{
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    border-top: 4px dotted var(--empty-bg);
    z-index: -1;
}

.progress {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    border-top: 4px dotted var(--fill-bg);
    width: 0%;
    z-index: -1;
    transition: .4s ease;
    
}

.square{
    
    height: 1.7rem;
    width: 1.7rem;
    border: 3px solid var(--empty-bg);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    border-radius: .3rem;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: green;
    transition: .4s ease;
}

.square.active{
    border: 3px solid var(--fill-bg);
}

.btn{
    margin: .5rem 1rem;
    padding: .5rem 1rem;
    border: none;
    background: var(--fill-bg);
    border-radius: .5rem;
    font-family: inherit;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    color: #0f0f0f;
}

.btn:hover{
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.btn:active{
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.btn:disabled{
    background-color: var(--empty-bg);
}

/* second progress step styles */
.step-container{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem ;
    width: 100%;
    max-width: 350px;
}

.step{
    background: var(--empty-step-bg);
    height: 3rem;
    width: 5.5rem;
    clip-path: polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    transition: .4s ease;
}

.step.active-step{
    background: var(--fill-step-bg);
}

.step-two{
    clip-path: polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%);
    transform: translateX(-1.3rem);
}

.step-tree{
    clip-path: polygon(100% 0, 100% 50%, 100% 100%, 0% 100%, 25% 50%, 0% 0%);
    transform: translateX(-2.6rem);
}

.btn-step{
    background: var(--fill-step-bg);
}

.btn-step:hover{
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.btn-step:active{
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.btn-step:disabled{
    background: var(--empty-step-bg);
}

/* circle progress step styles */
.circle{
    width: 100px;
    height: 100px;
    background: conic-gradient(var(--fill-circle-bg) 0% 0%,var(--empty-circle-bg) 0% 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 1px 3px 5px rgba(0,0,0,0.1);
    transition: .4s ease;
    font-weight: bold;
}

.btn-circle{
    background: var(--fill-circle-bg);
}

.btn-circle:disabled{
    background: var(--empty-circle-bg);
}

/* line progress step styles */
.line{
    --p:0;
    background: linear-gradient(to right, var(--fill-line-bg) 0 calc(var(--p)*1%),
    var(--empty-line-bg) calc(var(--p)* 1%) 100%);
    margin-top: 4rem;
    position: relative;
    width: 100%;
    max-width: 30rem;
    height: .5rem;
    border-radius: .5rem;

}


.btn-line{
    background: var(--fill-line-bg);
    margin-top: 4rem;
}

.btn-line:disabled{
    background:var(--empty-line-bg) ;
}

/* media queries */
@media (max-width:768px){
    body{
        grid-template-columns: repeat(auto-fit,minmax(18rem,1fr));
        justify-items: center;
    }
    .container{
        width: 100%;
    }
    .progress-container,
    .step-container{
        max-width: 100%;
    }
    .line{
        width: 100%;
        max-width: 100%;
    }
    .square{
        font-size: .9rem;
        padding: 0 .5rem;
    }
    .circle{
        width: 80px;
        height: 80px;
        text-align: center;
        font-size: .9rem;
    }
}