/*
************************************************************************************************************************************
************************************************************************************************************************************
########  ########   #######   ######   ########  ########  ######   ######  ########     ###    ########  
##     ## ##     ## ##     ## ##    ##  ##     ## ##       ##    ## ##    ## ##     ##   ## ##   ##     ## 
##     ## ##     ## ##     ## ##        ##     ## ##       ##       ##       ##     ##  ##   ##  ##     ## 
########  ########  ##     ## ##   #### ########  ######    ######   ######  ########  ##     ## ########  
##        ##   ##   ##     ## ##    ##  ##   ##   ##             ##       ## ##     ## ######### ##   ##   
##        ##    ##  ##     ## ##    ##  ##    ##  ##       ##    ## ##    ## ##     ## ##     ## ##    ##  
##        ##     ##  #######   ######   ##     ## ########  ######   ######  ########  ##     ## ##     ## 
************************************************************************************************************************************
************************************************************************************************************************************
*/

.progressbar{
    height: 64px;
    white-space: nowrap; /* each gauge is in percentage. So we can't do gauges + avatar without line wrap.*/
}
.progressbar--label{
    padding-bottom: 10px;
}
.progressbar--bubble{
    padding-top: 10px;
}
.progressbar::after{
    content: "";
    clear: both;
}
/* no preprocessor... so sorry about this : ****************************************************************************************/
.progressbar[data-stages="1"]{
    width: calc(100% - 36px); /* why ? because : (100% - (avatarWidth + avatarMargin) */
}
.progressbar[data-stages="2"]{
    width: calc(100% - 72px);
}
.progressbar[data-stages="3"]{
    width: calc(100% - 108px);
}
.progressbar[data-stages="4"]{
    width: calc(100% - 144px);
}
.progressbar[data-stages="5"]{
    width: calc(100% - 180px);
}
.progressbar[data-stages="6"]{
    width: calc(100% - 216px);
}

/***********************************************************************************************************************************/
/* COMMON **************************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__gauge,
.progressbar__avatar{
    position: relative;
    display: inline-block;
}

/***********************************************************************************************************************************/
/* GAUGE ***************************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__gauge{
    background-color: rgba(0, 0, 0, 0.3);
    margin: 20px -4px 20px 0;
    border-width: 3px 0;
    border-style: solid;
    border-color: transparent;
}
.progressbar__gauge:nth-of-type(1),
.progressbar__gauge:nth-of-type(1) .progressbar__gauge__fill{
    border-width: 3px 0 3px 3px;
    border-radius: 15px 0 0 15px;
}


/***********************************************************************************************************************************/
/* FILL ****************************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__gauge__fill{
    display: block;
    background: #fff;
    height: 18px;
}

/***********************************************************************************************************************************/
/* AVATAR **************************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__avatar::after{
    display: block;
    content: "";
    position: absolute;
    z-index: 1;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 0;
}
.progressbar__avatar img,
.progressbar__avatar .svg{
    position: absolute;
    display: block;
    z-index: 2;
}

/* AVATAR : small ******************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__avatar--small,
.progressbar__avatar--small::after{
    width: 32px;
    height: 32px;
}
.progressbar__avatar--small{
    margin: 16px -4px 16px 0;       
}
.progressbar__avatar--small img{
    width: 24px;
    height: 24px;   
    margin: 4px;
}
.progressbar__avatar--small .svg{
    width: 16px;
    height: 16px;   
    margin: 8px;
}

/* AVATAR : large ******************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__avatar--large,
.progressbar__avatar--large::after{
    width: 64px;
    height: 64px;
}
.progressbar__avatar--large img{
    width: 48px;
    height: 48px;
    margin: 8px;
}
.progressbar__avatar--large .svg{
    width: 32px;
    height: 32px;
    margin: 16px;
}

/***********************************************************************************************************************************/
/* LABEL **************************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__avatar__label{
    position: absolute;
    min-width: 32px;
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    pointer-events: none;
    width: 200px;
    color: #fff;
    line-height: 1.5;
}
.progressbar__avatar--small .progressbar__avatar__label {
    top: 34px;
    left: -84px; /* why ? because : (labelWidth - avatarWidth) / 2) */
}
.progressbar__avatar--large .progressbar__avatar__label {
    top: 64px;
    left: -68px; /* why ? because : (labelWidth - avatarWidth) / 2) */
}


/***********************************************************************************************************************************/
/* BUBBLE **************************************************************************************************************************/
/***********************************************************************************************************************************/

.progressbar__gauge__bubble{
    position: absolute;
    bottom: 30px;
    display: table-cell;
    width: 100%;
    margin-left: -55%; /* fix bubble at 99% */
    text-align: center;
    z-index: 2;
}
.progressbar__gauge__bubble .align-center{
    display: inline-block;
    background: rgba(0,0,0,.3);
    border-radius: 4px;
    white-space: nowrap;
    color: #fff;
    padding: 3px 5px;
    font-size: 11px;
}
.progressbar__gauge__bubble::after{
    border-width: 0 0 10px 10px;
    border-style: solid;
    border-color: transparent rgba(0,0,0,.3) transparent rgba(0,0,0,.3);
    bottom: -10px;
    content: "";
    height: 0;
    left: calc(50% - 8px); /* why ? because (fullWitdh / 2) - arrowWitdh */
    position: absolute;
    width: 0;
    display: block;
    transform: scale(-1) rotate(-90deg);
}
