* {
    box-sizing: border-box;
}

html,
body {
    scroll-behavior: smooth;
}

body {
    background-color: transparent;
    color:  #0f0f0f;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
}


.posti-occupati{
	font-weight: bold;	
}

/*--- TABLE -----*/

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    font-family: 'SoleSans', Arial, Helvetica, sans-serif;
    line-height: normal;
    font-style: normal;
    border-bottom: 1px solid #0f0f0f;
    padding-top: 10px;
    padding-bottom: 10px;
}

td {
    font-weight: 400;
    font-size: 16px;
}

th {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
}

a:link {
    color:  #0f0f0f;
    text-decoration: none;
}


a:visited {
    color:  #0f0f0f;
    text-decoration: none;
}


a:hover {
    color:  #0f0f0f;
    text-decoration: underline;
}

a:active {
    color:  #0f0f0f;
    text-decoration: underline;
}




#table_container {
    width: 100%;
    max-width: 680px;
}



/* TABLE */

#th-regione,
#th-occupati-soglia,
#th-grafico,
#th-totale,
#th-attivabili {
    vertical-align: bottom;
}

#th-regione,
.regione {
    text-align: start;
    width: 100px;
}

#th-occupati-soglia,
.occupati-soglia {
    text-align: end;
    width: 140px;
    padding-right: 5px;
}


#th-grafico,
.grafico {
    max-width: 100%;
}

#th-grafico {
    text-align: start;
}

.grafico {
    vertical-align: middle;
}

#th-totale,
.totale {
    text-align: end;
    width: 55px;
}


#th-attivabili,
.attivabili {
    text-align: end;
    width: 55px;
    padding-left: 5px;
}

.no-border-bottom {
    border-bottom: 0px;
}


.red {
    color: #AA0438;
}


#first_region_row td {
    padding-top: 0px;
}

.sort_arrow {
    cursor: pointer;
    padding-left: 5px;
}

.sort_arrow:hover {
    color: #AA0438;
}

#notes {
    width: 100%;
    max-width: 680px;
    font-family: 'SoleSans', Arial, Helvetica, sans-serif;
    line-height: normal;
    font-style: normal;
    font-size: 12px;
    margin-top: 10px;
}

/*--- MINI CHARTS -----*/

#chart_units_row td {
    padding-bottom: 0px;
}

#chart_units {
    display: flex;
    flex-direction: row;
}

#chart_units div {
    font-size: 12px;
}

#unit-cnt{
	position: relative;
	width: 100%;
	height: 20px;
}

#unit_0 {
	position: absolute;
    text-align: end;
    width: 0%;
}

#unit_10 {
	position: absolute;
    text-align: end;
    width: 12%;
}

#unit_15{
	position: absolute;
	text-align: end;
    width: 17%;
}

#unit_20 {
	position: absolute;
    text-align: end;
    width: 21.5%;
}

#unit_30 {
	position: absolute;
    text-align: end;
    width:34%;
}

#unit_40 {
	position: absolute;
    text-align: end;
    width:45%;
}

#unit_100 {
	position: absolute;
    text-align: end;
    width: 100%;
}

.horizontal-bar-chart {
    width: 100%;
    height: auto;
    position: relative;
  }


.bar-totale {
    background-color: #E7E6E2;
    width: 100%;
    height: 20px;
    position: absolute;
    top: -10px;
    left: 0;
}


.bar-occupati {
    background-color: #AA0438;
    height: 20px;
    position: absolute;
    top: -10px;
    left: 0;
    z-index: 2;
}


.bar-soglia {
    position: absolute;
    width: 30%;
    height: 50px;
    background-color: transparent;
    border-right: 1px solid #0f0f0f;
    top: -10px;
    left: 0;
    z-index: 3;
}

.bar-soglia-20 {
    position: absolute;
    width: 20%;
    height: 50px;
    background-color: transparent;
    border-right: 1px solid #0f0f0f;
    top: -10px;
    left: 0;
    z-index: 4;
}

.bar-soglia-30 {
    position: absolute;
    width: 30%;
    height: 50px;
    background-color: transparent;
    border-right: 1px solid #0f0f0f;
    top: -10px;
    left: 0;
    z-index: 4;
}

.bar-soglia-15 {
    position: absolute;
    width: 15%;
    height: 50px;
    background-color: transparent;
    border-right: 1px solid #0f0f0f;
    top: -10px;
    left: 0;
    z-index: 5;
}

.bar-soglia-10 {
    position: absolute;
    width: 10%;
    height: 50px;
    background-color: transparent;
    border-right: 1px solid #0f0f0f;
    top: -10px;
    left: 0;
    z-index: 5;
}

.td_italia {
   font-weight: 600;
}

#grafico_italia .bar-soglia,
#grafico_italia .bar-soglia-30,
#grafico_italia .bar-soglia-20,
#grafico_italia .bar-soglia-15,
#grafico_italia .bar-soglia-10 {
    height: 30px;
}

/* TOOLTIP */

.bar-tooltip {
    background-color: transparent;
    width: 100%;
    height: 20px;
    position: absolute;
    top: -10px;
    left: 0;
    z-index: 10;
}

.tooltip {
	visibility: hidden;
	width: 70px;
	font-family: 'SoleSans', Arial, Helvetica, sans-serif;
	line-height: normal;
	font-style: normal;
	font-size: 16px;
	background-color: #ffffff;
	color: #000;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
	text-align: center;
	border-radius: 0px;
	padding: 2px 0;
	position: absolute;
	z-index: 20;
	top: -25px;
	font-weight: bold;
}

.bar-tooltip .tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #ffffff transparent transparent transparent;
}

.bar-tooltip:hover .tooltip {
visibility: visible;
}



/* MEDIA QUERIES */


@media only screen and (max-width: 361px) {
    #th-regione,
    #th-occupati-soglia,
    #th-grafico,
    #th-totale,
    #th-attivabili,
    .regione {
        font-size: 13px;
    }
}

@media only screen and (min-width: 361px) and (max-width: 600px) {
    #th-regione,
    #th-occupati-soglia,
    #th-grafico,
    #th-totale,
    #th-attivabili {
        font-size: 13px;
    }
}

@media only screen and (max-width: 600px) {
    body {
        font-size: 20px;
    }

    th,
    td {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    td {
        font-size: 14px;
    }


    #table_container {
        position: relative;
        width: 100%;
        z-index: 1;
        margin: auto;
        overflow: auto;
    }

    table {
        width: 450px;
        border-collapse: separate;
        border-spacing: 0;
     }

     th,
     td {
         padding-top: 5px;
         padding-bottom: 5px;
     }

     #chart_units_row td:first-child {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        z-index: 10;
        width: 55px;
        background-color: #F7F6F2;
     }


    #th-regione,
    .regione {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        z-index: 10;
        width: 70px;
        background-color: #F7F6F2;
    }

    #th-occupati-soglia,
    .occupati-soglia {
        width: 103px;
    }


    #thoccupati-soglia {
        word-wrap: break-word;
    }


    #chart_units div {
        font-size: 10px;
    }

	#unit_10{
		position: absolute;
		text-align: end;
		width: 15%;
	}
	
	#unit_15{
		position: absolute;
		text-align: end;
		width: 17%;
	}

	#unit_20 {
		position: absolute;
		text-align: end;
		width:25.5%;
	}
	
	#unit_30 {
		position: absolute;
		text-align: end;
		width:46.5%;
	}

	#unit_40 {
		position: absolute;
		text-align: end;
		width:48.5%;
	}

    #grafico_italia .bar-soglia {
        height: 26px;
    }

    .tooltip {
        left: -10%;
    }

    #notes {
        max-width: 100vw;
    }

  }
