:root{
    font-size: 16px;
    font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bg-primary: #1E1E1E;
    --bg-secondary: #262626;
    --text-primary: #e2e2e2;
    --text-secondary: #777777;
}

body{
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100vw;
}

a{
    text-decoration: none;
}

.fixed-header{
    display: flex;
    align-items: center;
    width: 98%;
    position: fixed;
    padding: 15px;
    background-color: var(--bg-primary);
    color: #fff;
    height: 3em;
    z-index: 999;
}

.fixed-header img{
    height: 3em;
}
.fixed-header h1{
    margin: 0;
    padding: 0 20px;
    font-size: 1.2em;
    font-weight: 500;
}

.credits{
    margin-left:auto;
}

.main{
    padding-top: 5em;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.panel-left, .panel-right{
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 50em;
    height: 50em;
    padding: 0 50px;
}

.panel-left{
    align-items: flex-end;
}

.panel-right{
    align-items: flex-start;
}

.panel{
    position: relative;
    margin-top: 20px;
    width: 80%;
    height: auto;
    background-color: var(--bg-secondary);
    padding: 10px;
    box-shadow: 5px 5px 4px rgb(0 0 0 / 40%);
}

.panel-title{
    color: var(--text-secondary);
    font-size: .95em;
    font-weight: 700;
}
.panel-title i{
    float: right;
}
.panel-number{
    text-align: center;
    font-size: 2em;
    font-weight: 600;
    color: var(--text-primary);
    padding-top: 50px;
}
.panel-content{
    padding: 20px;
}
.panel-content canvas:not(.sidebar){
    height: 10em;
    width: 100%;
}
.panel-controls{
    display: flex;
    flex-wrap: wrap;
}
.panel-button{
    color: var(--text-primary);
    font-size: .9em;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 5px;
    font-weight: 500;
    background-color: #404040;
}

[state="clicked"] {
    background-color: #3B6B83;
}

.select-place{
    display: flex;
    align-items: center;
    padding: 5px;
}
.select-place h3{
    padding: 0;
    padding-left: 5px;
    margin: 0;
    font-size: .9em;
    font-weight: 500;
    color: var(--text-primary);
}
.checkboxes{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

#bar-numbers{
    display: grid;
    width: 100%;
    padding: 0 20px;
    grid-template-columns: 10% 83%;
}
#bar-numbers h2{
    margin: 0;
    padding: 0;
}

#bar-align{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    text-align: center;
    color: var(--text-primary);
}
#bar-align h2{
    font-size: .9em;
    font-weight: 500;
}


.side-bar{
    display: grid;
    grid-template-columns: 30% 70%;
    padding: 10px;
    height: 5em;
}

.side-label{
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
}
.side-label h2{
    padding: 0;
    margin: 0;
    font-size: 2em;
    font-weight: 400;
}
.side-label h3{
    padding: 0;
    margin: 0;
    font-size: .9em;
    color: var(--text-secondary);
}

.side-chart{
    display: grid;
    row-gap: 5px;
    width: 100%;
    padding: 5px;
    background-color: rgb(51, 51, 51);
}

.horizontal{}
.bar-chart{
    background: rgba(255,255,255,14%);
    width: 100%;
    height: 100%;
}
.bar-chart .fill{
    height: 100%;
}
.asukas-chart{
    width: 100%;
}

.asukas-luku{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    text-align: center;
    font-size: .6em;
    font-weight: 500;
}
.asukas{
    display: flex;
}
.asukas h2{
    padding: 5px;
    font-size: 1em;
    font-weight: 500;
    margin: 0;
}

.main-place{
    min-height: .4em;
}


.selector-box{
    display: flex;
    justify-content: center;
    align-items: center;
}

.selector-checkbox{
    background-color: white;
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px black solid;
}

.green-hover:hover{
    background-color: rgb(133,153,0);
}
.first-color-hover:hover{
    background-color: first-color;
}
.second-color-hover:hover{
    background-color: second-color;
}
.third-color-hover:hover{
    background-color: third-color;
}
.fourth-color-hover:hover{
    background-color: fourth-color;
}
.fifth-color-hover:hover{
    background-color: fifth-color;
}
.sixth-color-hover:hover{
    background-color: rgb(255, 121, 143);
}

.green{
    background-color: rgb(133,153,0);
    color: rgb(133,153,0);
}
.first-color{
    background-color: #b58900;
    color: #b58900;
}
.second-color{
    background-color: #cb4b16;
    color: #cb4b16;
}
.third-color{
    background-color: #dc322f;
    color: #dc322f;
}
.fourth-color{
    background-color: #d33682;
    color: #d33682;
}
.fifth-color{
    background-color: #6c71c4;
    color: #6c71c4;
}
.sixth-color{
    background-color: #268bd2;
    color: #268bd2;
}

.no-bg{
    background-color: rgba(0,0,0,0);
}

.loader {
    border: 6px solid #fff;
    border-color: #fff transparent #fff transparent;
    border-radius: 50%;
    height: 3em;
    width: 3em;
    aspect-ratio: 1;
    animation: spin 0.7s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }


.loading{
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #1E1E1E;
    left:0;
    top:0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.loading h2{
    padding: 10px;
    margin: 0;
    font-size: 1em;
    color: fifth-color;
}

@media only screen and (max-width: 600px) {
    .main{
        display: flex;
        flex-direction: column;
    }
    .panel-left{
        align-items: center;
        width: 100%;
        height: auto;
        padding: 0;
        padding-top: 5em;
    }
    
    .panel-right{
        align-items: center;
        width: 100%;
        height: auto;
        padding: 0;
    }
    .panel{
        width: 90%;
    }
    .panel-content {
        padding: 5px 0px;
    }
    #bar-numbers {
        display: grid;
        width: 100%;
        padding: 0 20px;
        grid-template-columns: 25% 68%;
    }
    #bar-align h2 {
        font-size: .8em;
        font-weight: 500;
    }
    .side-label h3 {
        font-size: .7em;
    }
    .v-panel{
        position: fixed;
        top: 3em;
        left: 0;
        width: 100%;
        z-index:99;
    }
    .v-panel .panel-title{
        display: none;
    }
    .checkboxes{
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.toiminta-kate{
    background: linear-gradient(rgb(232, 232, 232), rgb(232, 232, 232)) no-repeat center/2px 100%;

    align-content: center;
    
}
.toiminta-kate .fill{
    background-color: #dc322f;
    
}
.toiminta-kate .bar-chart{
    height: 1.5em;
    
}
.clickable{
    cursor: pointer;
}
.special .side-chart{
    height: 1em;
}
.special .side-bar{
    height: auto;
    grid-template-columns: 5% 30% 65%;
    align-items: center;
    text-align: center;
}
.special .side-label h2{
    color: gray;
    font-size: .9em;
    font-weight: 600;
}

.fa-arrow-down{
    color: rgb(202, 0, 0);
    border: 2px rgb(202, 0, 0) solid;
    border-radius: 1em;
    padding: 4px 0;
    padding-right: 0.5px;
}
.fa-arrow-up{
    color: green;
    border: 2px green solid;
    border-radius: 1em;
    padding: 4px 0;
    padding-right: 0.5px;
}

.red{
    background-color: rgb(202, 0, 0);
    color: rgb(202, 0, 0);
}
  /* The Modal (background) */
    
  .modal {
    display: flex;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100vw;
    /* Full width */
    height: 100vh;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
}
/* Modal Content/Box */

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5em auto;
    /* 15% from the top and centered */
    padding: 20px;
    width: 60em;
    height: fit-content;
    /* Could be more or less, depending on screen size */
}
.modal-controls{
    padding: 10px;
    display: flex;
    justify-content: space-between;
}
.strategy-collection{
    padding-top: 50px;
}

.strategy-graph-container .fa-arrow-down, .fa-arrow-up{
    padding: 4px 5px;
}
.strategy-graph-container{
    padding: 10px;
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 8fr;
    align-items: top;
    text-align: left;
}
.strategy-graph-container h2{
    padding: 0;
    padding-bottom: 3px;
    padding-top: 5px;
    margin: 0;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.2em;
    text-align: left;
}
.strategy-graph{
    padding: 12px;
    width: 100%;
    background: linear-gradient(rgb(232, 232, 232), rgb(232, 232, 232)) no-repeat center/2px 100%;

}
.strategy-chart{
    width: 100%;
    background-color: var(--bg-secondary);
    height: 1em;
}
.strategy-chart .fill{
    height: 100%;
}
.strategy-chart .green{
    background-color: #05A334;
}
.strategy-chart .red{
    background-color: rgb(255, 0, 0);
}
.strategy-size, .strategy-arrow{
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.strategy-size i{
    color: var(--text-primary);
}
.small{
    display: flex;
    height: .3em;
    align-items: center;
    margin-top: 10px;
    background-color: rgba(0,0,0,0);
}
.small .green{
    background-color: #057226;
}
.small .red{
    background-color: rgb(204, 0, 0);
}
.hide-strat{
    cursor: pointer;
}

.strat-edit-drop{
    padding: 10px;
    font-size: 1.3em;
    background-color: rgba(0,0,0,0);
    color: var(--text-primary);
    border: none;
    outline: none;
}

.strat-edit-drop option{
    color: var(--bg-secondary);
}

.edit-month{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2em;
}
.panel-form-collection{
    display: flex;
    padding: 50px;
    align-items: center;
    flex-direction: column;

}
.panel-form{
    width: 40em;
    padding: 20px;
    border-bottom: 2px gray solid;
}
.form-row{
    display: grid;
    grid-template-columns: 2fr 3fr;
    align-items: center;
    padding: 2px;
}
.form-subject{
    font-size: 1.2em;
    padding: 0;
    margin: 0;
    font-weight: 500;
    color: var(--text-primary);
}
.form-question{
    font-size: 1.1em;
    padding: 0;
    margin: 0;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-row .chart-container{
    padding: 5px;
    background: linear-gradient(rgb(232, 232, 232), rgb(232, 232, 232)) no-repeat center/2px 100%;
}

.check-container{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: center;
}
.subject{
    margin-bottom: 10px;
}

.radio-button{
    width: 15px;
    height: 15px;
    border-radius: 2em;
}

.radio-button.white-btn{
    border: 2px lightgray solid;
    border-radius: 1px;
    width: 10px;
    height: 10px;
}
.radio-button.red-btn{
    border: 3px red solid;
}
.radio-button.yellow-btn{
    border: 3px yellow solid;
}
.radio-button.green-btn{
    border: 3px green solid;
}

[radio-state="on"].white-btn {
    background-color: lightgray;
}
[radio-state="on"].red-btn {
    background-color: red;
}
[radio-state="on"].yellow-btn {
    background-color: yellow;
}
[radio-state="on"].green-btn {
    background-color: green;
}
.comment-row{
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.comment-row .form-question{
    padding-bottom: 2px;
}
.comment-area{
    width: 100%;
    border-radius: 10px;
}
.age-control{
    display: flex;
    width: 100%;
    padding: 20px;
    justify-content: center;
    align-items: center;
}
.age-control h3{
    padding: 5px;
    margin: 0;
    font-size: .9em;
    font-weight: 400;
    color: var(--text-primary);
}
.sex-legend{
    position: absolute;
    display: grid;
    text-align: center;
    grid-template-columns: 1fr 1fr;
    height: 5em;
    width: 2.5em;
    align-items: center;
}
.sex-legend i{
    font-size: 2em;
}

.sex-legend .fa-male{
    color: #507619;
}

.sex-legend .fa-female{
    color: #72A623;
}

[toggled="0"].fas{
    font-weight: 400;
}

.top-control{
    display: grid;
}

.flex-grid{
    width: 100%;
    display: grid;
    column-gap: 2px;
    text-align: center;
}

.row-5-2{
    grid-template-columns: 2fr 2fr 2fr 2fr 3fr;
}
.row-5{
    grid-template-columns: 3fr 2fr 2fr 2fr 2fr;
}
.row-4{
    grid-template-columns: 1fr 1fr 1fr 1fr;
}
.row-3{
    grid-template-columns: 1fr 1fr 1fr;
}
.row-2{
    grid-template-columns: 1fr 1fr;
}

[state="clicked"].button-green{
    background-color: #057226;
}

.gap{
    margin-top: 20px;
}

.tmntkt{
    grid-template-columns: 2fr 1fr 8fr;
}
.tmntkt .strategy-graph{
    padding: 5px 0;
}
.tmntkt .strategy-size{
    height: 3.4em;
}
.tmntkt .small{
    margin-top: 0;
}
.tmntkt h2{
    font-size: 1.6em;
    text-align: center;
}
.strat-label{
    padding: 1px;
    margin: 0;
    font-size: .6em;
    color: var(--text-secondary);
    font-weight: 500;
}

.small-label{
    margin-top: 10px;
}

.pm-bar{
    grid-template-columns: 2fr 1fr 8fr;
    align-items: center;
}

.pm-bar .strategy-graph{
    max-width: 90%;
}
.pm-bar h2{
    font-size: 1.6em;
    font-weight: 700;
    text-align: center;
    color: red;
}
.pm-bar .strategy-graph{
    background: none;
}

.red-text{
    color: red;
}
/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
  }
  
  /* Hide default HTML checkbox */
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* The slider */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #404040;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    bottom: 0px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: #404040;
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px #404040;
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
  }
  
  /* Rounded sliders */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }
.toggleable-strat{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

.toggle-control{
    display: grid;
    grid-template-columns: 5fr 3fr 5fr;
    justify-items: center;
    align-items: center;
    width: 10em;
}
.chart{
    width: 100%;
}
.chart img{
    width: 100%;
}
.toggle-control h2{
    padding: 5px;
    color: var(--text-primary);
    font-size: .9em;
}

.teaser-modal{
    width: 30em;
    border-radius: .7em;
    text-align: center;
}
.teaser-modal .panel-title{
    width: 90%;
    padding: 0px 25px;
    display: grid;
    color: var(--text-primary);
    grid-template-columns: 1fr 2fr 1fr;
    align-content: center;
    align-items: center;
}

.teaser-modal .panel-title h2{
    padding: 20px;
    margin: 0;
}

.big-button{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
    width: 100%;
    height: 3em;
    font-size: 1.5em;
    font-weight: 700;
    color: rgb(242, 242, 242);
    background-color: lightblue;
    transition: .05s;
}
.clickable:hover{
    filter: brightness(85%);
}

.btn-1{
    background-color: #3B6B83;
}
.btn-2{
    background-color: #008856;
}
.btn-3{
    background-color: #F08C1E;
}
.btn-4{
    background-color: #89C650;
}
.btn-5{
    background-color: #E42F48;
}
.btn-6{
    background-color: #46C2F0;
}