html,
body{
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

/* ------------------------------ common -------------------------------- */

* {
    -webkit-transition: all 300ms ease-in-out !important;
    -moz-transition: all 300ms ease-in-out !important;
    transition: all 300ms ease-in-out !important;
    -webkit-box-sizing: border-box;
    -mox-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0px;
    margin: 0px;
}

:root {
    --azure: #5FCCE0;
    --light-green: #A8E05F;
    --dark-green: #62981C;
    --light-yellow: #FFDE4B;
    --dark-yellow: #CEA800;
    --light-orange: #FF9A4F;
    --dark-orange: #D16C20;
    --light-red: #FF6764;
    --dark-red: #9D3836;
    --light-violet: #8F4AAB;
    --dark-violet: #4C1960;
    --light-black: #333333;
    --dark-black: #0D0707;
}

div.website_container{
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
}

.good-gradient{
    background-color: var(--light-green);
    background: -moz-linear-gradient(170deg, rgba(168,224,95,1) 0%, rgba(98,152,28,1) 100%);
    background: -webkit-linear-gradient(170deg, rgba(168,224,95,1) 0%, rgba(98,152,28,1) 100%);
    background: linear-gradient(170deg, rgba(168,224,95,1) 0%, rgba(98,152,28,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#a8e05f",endColorstr="#62981c",GradientType=1);
}

.fair-gradient{
    background-color: var(--light-yellow);
    background: -moz-linear-gradient(170deg, rgba(255,222,75,1) 0%, rgba(206,168,0,1) 100%);
    background: -webkit-linear-gradient(170deg, rgba(255,222,75,1) 0%, rgba(206,168,0,1) 100%);
    background: linear-gradient(170deg, rgba(255,222,75,1) 0%, rgba(206,168,0,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffde4b",endColorstr="#cea800",GradientType=1);
}

.moderate-gradient{
    background-color: var(--light-orange);
    background: -moz-linear-gradient(170deg, rgba(255,154,79,1) 0%, rgba(209,108,32,1) 100%);
    background: -webkit-linear-gradient(170deg, rgba(255,154,79,1) 0%, rgba(209,108,32,1) 100%);
    background: linear-gradient(170deg, rgba(255,154,79,1) 0%, rgba(209,108,32,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff9a4f",endColorstr="#d16c20",GradientType=1);
}

.poor-gradient{
    background-color: var(--light-red);
    background: -moz-linear-gradient(170deg, rgba(255,103,100,1) 0%, rgba(157,56,54,1) 100%);
    background: -webkit-linear-gradient(170deg, rgba(255,103,100,1) 0%, rgba(157,56,54,1) 100%);
    background: linear-gradient(170deg, rgba(255,103,100,1) 0%, rgba(157,56,54,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff6764",endColorstr="#9d3836",GradientType=1);
}

.very_poor-gradient{
    background-color: var(--light-violet);
    background: -moz-linear-gradient(170deg, rgba(143,74,171,1) 0%, rgba(76,25,96,1) 100%);
    background: -webkit-linear-gradient(170deg, rgba(143,74,171,1) 0%, rgba(76,25,96,1) 100%);
    background: linear-gradient(170deg, rgba(143,74,171,1) 0%, rgba(76,25,96,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#8f4aab",endColorstr="#4c1960",GradientType=1);
}

.extremely_poor-gradient{
    background-color: var(--light-black);
    background: -moz-linear-gradient(170deg, rgba(51,51,51,1) 0%, rgba(13,7,7,1) 100%);
    background: -webkit-linear-gradient(170deg, rgba(51,51,51,1) 0%, rgba(13,7,7,1) 100%);
    background: linear-gradient(170deg, rgba(51,51,51,1) 0%, rgba(13,7,7,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333",endColorstr="#0d0707",GradientType=1);
}

.azure-gradient{
    background: rgb(138,193,203);
    background: -moz-linear-gradient(30deg, rgba(138,193,203,1) 0%, rgba(208,223,224,1) 100%);
    background: -webkit-linear-gradient(30deg, rgba(138,193,203,1) 0%, rgba(208,223,224,1) 100%);
    background: linear-gradient(30deg, rgba(138,193,203,1) 0%, rgba(208,223,224,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#8ac1cb",endColorstr="#d0dfe0",GradientType=1);
}

div.particle-container{
    position: absolute;
    z-index: -1;
    top: 35px;
    bottom: 0;
    right: 0;
    left: 0;
}

ol, ul, p{
    list-style-type: none;
    padding: 0px;
    margin: 0px;
}

div.max_container{
    max-width: 1320px;
    margin: 0 auto;
}

a{text-decoration: none;}
i{margin-right: 2px;}

/* ------------------------------ loader -------------------------------- */

.spinner-container{
    justify-content: center;
    display: flex;
    width: 100%;
}

.loader {
    border-top: 10px solid var(--azure); /* Blue */
    animation: spin 2s linear infinite;
    border: 10px solid #f3f3f3; /* Light grey */
    border-radius: 50%;
    display: none;
    margin: 15px;
    height: 50px;
    width: 50px;
}

.htmx-request .loader,
.htmx-request.loader{
    display: flex;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ------------------------------ header -------------------------------- */

header{
    position: fixed;
    height: 36px;
    width: 100%;
    right: 0;
    left: 0;
    top: 0;
}

header ul{
    justify-content: space-between;
    flex-direction: row;
    display: flex;
}

header ul li{width: 100%;}

header ul li a{
    text-overflow: ellipsis;
    text-decoration: none;
    letter-spacing: 0.4px;
    white-spce: nowrap;
    text-align: center;
    line-height: 36px;
    font-weight: 600;
    overflow: hidden;
    font-size: 13px;
    display: block;
    height: 36px;
    color: #fff;
    width: 100%;
}

header ul li a i{
    margin-left: 5px;
    opacity: 0.5;
}

header ul li a.level_1{background-color: rgba(95,204,224, 0.3);}
header ul li a.level_2{background-color: rgba(95,204,224, 0.4);}
header ul li a.level_3{background-color: rgba(95,204,224, 0.5);}

header ul li a.level_1.active,
header ul li a.level_2.active,
header ul li a.level_3.active{background-color: transparent;}

header ul li a:hover,
header ul li a:focus,
header ul li a:active{color: #333;}

/* ------------------------------ content -------------------------------- */

div.content{
    align-items: stretch;
    margin-top: 70px;
    display: flex;
    height: 82vh;
}

div.content_l3{flex-direction: column;}

div.white_box{
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
}

/* btn */
.btn,
.btn:hover,
.btn:active,
.btn:focus,
.active.btn,
.active.btn:hover,
.active.btn:active,
.active.btn:focus{box-shadow: none;}

.btn,
.btn:focus,
.btn:active{
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
    border-radius: 10px;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 13px;
}

.btn i{margin-right: 5px;}
.only-icon i{margin-right: 0px;}

.btn-primary,
.btn-primary:focus,
.btn-primary:active{
    background-color: rgba(255,255,255,0.7);
    color: #5FCCE0;
}

.btn-primary:hover{
    background-color: #fff;
    border-color: #111;
    color: #111;
}

.btn-secondary,
.btn-secondary:focus,
.btn-secondary:active{
    background-color: transparent;
    border-color: #5FCCE0;
    color: #5FCCE0;
}

.btn-secondary:hover{
    background-color: #fff;
    border-color: #111;
    color: #111;
}

/* common in levels */
a:hover h3{text-decoration: underline;}

div.level1,
div.level2,
div.level3_top{
    flex-direction: row;
    align-items: stretch;
    display: flex;
    width: 100%;
}

div.level1 div.sx,
div.level2 div.sx,
div.level3_top div.sx,
div.level1 div.dx,
div.level2 div.dx,
div.level3_top div.dx{
    flex-direction: column;
    flex-wrap: nowrap;
    display: flex;
    width: 50%;
}

div.level1 div.sx,
div.level2 div.sx,
div.level3_top div.sx{justify-content: space-between;}

div.level2 div.dx div.top_content,
div.level3_top div.dx div.top_content{
    justify-content: flex-end;
    flex-direction: row;
    flex-wrap: nowrap;
    display: flex;
}

div.level2 div.dx div.top_content button,
div.level3_top div.dx div.top_content button{
    align-items: center;
    margin-right: 10px;
    display: flex;
    height: 35px;
}

div.air_quality_scale{
    flex-direction: column;
    margin: 0 auto;
    display: flex;
    width: 75%;
}

div.air_quality_scale div.scale_numbers,
div.air_quality_scale div.vertical_lines{
    justify-content: space-between;
    flex-direction: row;
    display: flex;
}

div.air_quality_scale div.scale_numbers p{
    margin-bottom: 5px;
    text-align: center;
    font-weight: 200;
    font-size: 13px;
    color: #fff;
    width: 25px;
}

div.air_quality_scale div.vertical_lines{flex-wrap: wrap-reverse;}

div.air_quality_scale div.vertical_lines,
div.air_quality_scale hr{margin: 0 12px;}

div.air_quality_scale div.vertical_lines div.vr{
    background-color: #fff;
    min-height: 1px;
    height: 5px;
    width: 2px;
    opacity: 1;
}

div.air_quality_scale div.vertical_lines div.vr.big{height: 10px;}

div.air_quality_scale hr{
    border-color: #fff;
    border-width: 2px;
    opacity: 1;
}

div.tooltip_container{
    position: relative;
    margin: 10px 12px;
}

.tooltip_element {
    transform: translate(-50%, 0);
    background-color: #fff;
    border-radius: 5px;
    position: absolute;
    padding: 5px 15px;
    font-size: 13px;
    color: #111;
    z-index: 1;
    top: 5px;
}

.tooltip_element i {
    margin-left: -10px;
    position: absolute;
    overflow: hidden;
    height: 10px;
    bottom: 100%;
    width: 20px;
    left: 50%;
}

.tooltip_element i::after {
    transform: translate(-50%,50%) rotate(45deg);
    background-color: #fff;
    position: absolute;
    height: 10px;
    width: 10px;
    content:'';
    left: 50%;
}

h1{
    margin-bottom: 10px;
    text-align: center;
    font-weight: 300;
    font-size: 80px;
    color: #fff;
}

h2{
    text-align: center;
    font-weight: 200;
    font-size: 25px;
    color: #fff;
}

h3{
    font-weight: 200;
    font-size: 20px;
    color: #fff;
}

h4{
    text-align: center;
    font-weight: 400;
    font-size: 18px;
    color: #111;
}

div.level1 h3,
div.level2 h3{text-align: center;}

div.level1 h3 img,
div.level2 h3 img,
div.level3_top div.sx > h3 img,
div.level3_top div.sx > a h3 img{
    height: 35px;
}

div.period_form{
    justify-content: flex-end;
    flex-direction: row;
    margin-bottom: 15px;
    display: flex;
}

div.period_form form div#reportrange{
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    background-color: #fff;
    border-radius: 10px;
    line-height: 35px;
    min-width: 180px;
    cursor: pointer;
    padding: 0 10px;
    height: 35px;
}

div.period_form form input:last-of-type{margin-left: 15px;}

div.l2_pollution_container,
div.l3_pollution_container{
    padding-left: 24px;
    overflow-y: scroll;
}

div.level2_pollution_item,
div.level3_pollution_item{
    flex-direction: row;
    align-items: center;
    position: relative;
    display: flex;
}

div.level2_pollution_item div.icon,
div.level3_pollution_item div.icon{
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    position: absolute;
    height: 100px;
    width: 45px;
    z-index: 1;
}

div.l1_pollution_container{
    overflow-y: scroll;
    height: 100vh;
}

/* level 1 */
div.level1 div.period_container{
    justify-content: space-between;
    flex-direction: row;
    position: relative;
    padding: 20px 40px;
    display: flex;
}

div.level1 div.white_box.period_container{
    justify-content: flex-start;
    align-items: center;
}

div.level1 div.period_container p{
    vertical-align: middle;
    margin: 0px;
}

div.level1 div.period_container p i{
    font-size: 16px;
    color: #ddd;
}

div.level1 div.period_container p:last-of-type{margin-left: auto;}
div.level1 div.period_container button{margin-left: 10px;}

div.level1 div.dx div.l1_pollution_container{
    margin: 0px 5px 0 5px;
    padding: 30px;
}

div.l1_pollution_container div.period_container{
    border-bottom: 1px solid #eee;
    padding: 0px 0px 25px 0px;
    margin-bottom: 15px;
}

div.l1_pollution_container div.period_container div > span{
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-bottom: 5px;
    font-weight: 200;
    font-size: 12px;
    display: block;
}

div.accordion-item{margin-bottom: 20px;}

div.accordion-item,
div.accordion-button{border: none;}

div.accordion-button{
    flex-direction: row;
    padding: 10px 0;
    display: flex;
}

.accordion-button:after {
    margin-right: 0.5em;
    margin-left: 0;
    order: -1;
}

.accordion-button:not(.collapsed) {
    background-color:transparent;
    box-shadow: none;
    color: inherit;
}

div.progress{
    background-color: #F0F0F0;
    border-radius: 20px;
    height: 18px;
}

div.accordion-body{padding: 15px 5px 0 5px;}

div.accordion-body p{
    font-weight: 300;
    font-size: 13px;
}

/* level 2 */
div.level2_pollution_item{
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

div.level2_pollution_item:last-of-type{
    margin-bottom: 0px;
    padding: 0px;
    border: none;
}

div.level2_pollution_item div.icon{left: -43px;}
div.level2_pollution_item div.gauge_chart{width: 50%;}
div.level2_pollution_item div.text{width: 50%;}

div.level2_pollution_item div.text p{padding: 0 0 10px 20px;}

div.level2_pollution_item div.text ul{
    list-style-type: circle;
    margin-left: 30px;
}

div.level2_pollution_item div.text p,
div.level2_pollution_item div.text ul li{
    font-weight: 300;
    font-size: 13px;
}

/* level 3 */
div.level3_top div.sx > h3,
div.level3_top div.sx > a h3{margin: 8px 0 10px 25px;}

div.level3_pollution_item{margin-bottom: 30px;}
div.level3_pollution_item div.icon{left: -22px;}
div.level3_pollution_item div.gauge_chart{width: 30%;}

div.level3_pollution_item div.line_chart{
    margin-top: 20px;
    width: 70%;
}

div.level3_top.no_data div.white_box{
    padding-top: 30px;
    text-align: center;
    height: 80px;
    width: 100%;
}

/* ------------------------------ legend -------------------------------- */

div.legend_container{
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    background-color: #fff;
    padding: 15px 20px;
    max-width: 350px;
    overflow: scroll;
    position: fixed;
    width: 350px;
    left: -350px;
    z-index: 10;
    bottom: 0;
    top: 0;
}

div.legend_container > div{
    flex-direction: column;
    display: flex;
}

div.aq_status{
    flex-direction: row;
    display: flex;
    margin: 5px 0;
}

div.aq_status div.label_container{
    -webkit-border-top-left-radius: 10px;
    -webkit-border-bottom-left-radius: 10px;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-bottomleft: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    align-items: center;
    margin-right: 4px;
    min-width: 120px;
    display: flex;
    padding: 15px;
}

div.aq_status div.label_container span{
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    text-align: center;
    font-weight: 500;
    display: block;
    color: #fff;
    width: 100%;
}

div.aq_status div.label_container span span{
    font-weight: 300;
    font-size: 11px;
}

div.aq_status div.descr_container{
    -webkit-border-top-right-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    -moz-border-radius-topright: 10px;
    -moz-border-radius-bottomright: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 15px;
}

div.aq_status div.descr_container p{font-size: 13px;}

div.aq_status#aq_1 div.label_container{background-color: var(--light-green);}
div.aq_status#aq_2 div.label_container{background-color: var(--light-yellow);}
div.aq_status#aq_3 div.label_container{background-color: var(--light-orange);}
div.aq_status#aq_4 div.label_container{background-color: var(--light-red);}
div.aq_status#aq_5 div.label_container{background-color: var(--light-violet);}
div.aq_status#aq_6 div.label_container{background-color: var(--light-black);}

div.aq_status#aq_1 div.descr_container{border: 1px solid var(--light-green);}
div.aq_status#aq_2 div.descr_container{border: 1px solid var(--light-yellow);}
div.aq_status#aq_3 div.descr_container{border: 1px solid var(--light-orange);}
div.aq_status#aq_4 div.descr_container{border: 1px solid var(--light-red);}
div.aq_status#aq_5 div.descr_container{border: 1px solid var(--light-violet);}
div.aq_status#aq_6 div.descr_container{border: 1px solid var(--light-black);}

div.legend_tab{
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.06);
    transform: rotate(-90deg) translateX(-5%);
    -webkit-border-bottom-left-radius: 3px;
    -webkit-border-bottom-right-radius: 3px;
    -moz-border-radius-bottomleft: 3px;
    -moz-border-radius-bottomright: 3px;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    background-color: #fff;
    text-align: center;
    line-height: 30px;
    position: fixed;
    cursor: pointer;
    height: 30px;
    z-index: 10;
    width: 80px;
    left: -25px;
    top: 50%;
}

div.legend_tab *{
    color: var(--azure);
    font-size: 12px;
}

div.legend_tab span{
    text-transform: uppercase;
    font-weight: 300;
}

div.legend_container.open{left: 0;}
div.legend_tab.open{left: 325px;}

/* ------------------------------ footer -------------------------------- */

footer{
    position: fixed;
    width: 100%;
    bottom: 0;
}

div.footer_content{
    margin: 0 0 10px 0;
    line-height: 36px;
    display: flex;
    height: 36px;
}

div.footer_content p:first-child{
    flex-grow: 0.5;
}

div.footer_content hr{
    margin-top: 18px;
    flex-grow: 12;
    color: #fff;
}

div.footer_content p:last-child{
    text-align: right;
    flex-grow: 0.5;
    height: 36px;
}

div.footer_content span,
div.footer_content p,
div.footer_content a{
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.2px;
    font-weight: 200;
    font-size: 12px;
    color: #fff;
}

div.footer_content a.simple_link{
    font-weight: 500;
}

div.footer_content a:hover{
    text-decoration: underline;
}

/* ------------------------------ responsive -------------------------------- */

@media screen and (max-width: 1400px){
    div.max_container {max-width: 95%;}
}

@media screen and (max-width: 805px){
    div.website_container {
        position: relative;
        overflow: hidden;
    }
    div.max_container {
        position: relative;
        z-index: 2;
    }
    div.particle-container{z-index: 0;}
    header {
        position: static;
        height: 36px;
        width: 100%;
        right: 0;
        left: 0;
        top: 0;
    }
    div.content{
        height: auto;
        margin-top: 30px;
    }
    div.level1, div.level2, div.level3_top{
        flex-direction: column;
    }
    div.level1 div.sx,
    div.level2 div.sx,
    div.level3_top div.sx,
    div.level1 div.dx,
    div.level2 div.dx,
    div.level3_top div.dx{
        width: 100%;
    }
    div.l1_pollution_container{
        overflow: visible;
        height: auto;
    }
    footer{
        padding: 20px 0 10px 0;
        position: static;
    }
    div.footer_content{line-height: 20px;}
    div.footer_content hr{display: none;}
    div.footer_content p{height: auto !important;}
    div.level1 div.sx > div,
    div.level2 div.sx > div,
    div.level1 div.sx > h3,
    div.level2 div.sx > h3,
    div.level1 div.sx > a h3,
    div.level2 div.sx > a h3{
        margin-bottom: 50px;;
    }
    div.level3_top div.sx > h3,
    div.level3_top div.sx > a h3{
        margin: 0 0 20px 0;
        text-align: right;
    }
    div.level2_pollution_item, div.level3_pollution_item{flex-direction: column;}
    div.level2_pollution_item div.gauge_chart,
    div.level2_pollution_item div.text,
    div.level3_pollution_item div.gauge_chart,
    div.level3_pollution_item div.line_chart{
        width: 100%;
    }
    h1{font-size: 65px;}
}

/* ------------------------------ heights -------------------------------- */
/*
@media screen and (max-height: 1415px){
    div.content{height: 90vh;}
}

@media screen and (max-height: 1310px){
    div.content{height: 89vh;}
}

@media screen and (max-height: 1210px){
    div.content{height: 88vh;}
}

@media screen and (max-height: 1110px){
    div.content{height: 87vh;}
}

@media screen and (max-height: 1010px){
    div.content{height: 86vh;}
}

@media screen and (max-height: 950px){
    div.content{height: 85vh;}
}

@media screen and (max-height: 900px){
    div.content{height: 84vh;}
}

@media screen and (max-height: 850px){
    div.content{height: 83vh;}
}

@media screen and (max-height: 800px){
    div.content{height: 82vh;}
}

@media screen and (max-height: 750px){
    div.content{height: 81vh;}
}

@media screen and (max-height: 700px){
    div.content{height: 78vh;}
}

@media screen and (max-height: 650px){
    div.content{height: 76vh;}
}

@media screen and (max-height: 600px){
    div.content{height: 74vh;}
}

@media screen and (max-height: 550px){
    div.content{height: 72vh;}
}

@media screen and (max-height: 500px){
    div.content{height: 70vh;}
}

@media screen and (max-height: 450px){
    div.content{height: 68vh;}
} */
