
#tool_calc_container {
    z-index: 20;
    height: fit-content;
    max-height: 1000px;
    margin-left: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    background-color: hsl(0,0%,100%);
    border-radius: 1.5rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
    padding: 0.3rem;
    transition: 0.5s;
    vertical-align: middle;
    align-items: center;
    background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%);
}

#cr3_tool_ctrl_showbtn{
    width:2.5rem;
    height:2.5rem;
    display: block;
    margin-left: auto;
    position: absolute;
    right: 0.2rem;
}

#tool_calc_container > .cr3_tool_ctrl > label * {
    width: 100%;
    height: 100%;
}

#tool_calc_container.cr3_calc_hide {
    width:3rem;
    max-height: 3rem;
}

#tool_calc_container.cr3_calc_hide > #tool_calc_selec {
    right:3em;
}

#cr3_tool_calc_btn {
    height: auto;
    width: auto;
}

#tool_calc_param_container {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1.1rem;
}

.tool_calc_param {
    display: flex;
    margin-bottom: 0.3rem;
    justify-content: space-between;
}

.tool_calc_param > input{
    margin-left: 2rem;
    text-align: center;
}

.tool_calc_param > label{
    white-space: nowrap;
}

.tool_calc_btn_menu {
    width:90%;
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 0.6rem;
    margin-top: 1rem;
}

#tool_calc_selec {
    width: 70%;
    position: relative;
    right:1em;
    margin-top:0.6rem;
}

#tool_calc_result{
    margin: 0;
    text-align: center;
}

@media (max-width:1360px) {  
    #CR3_container {
        position: absolute !important;
    }
}

input[type="checkbox"]#cr3_tool_expl_btn:checked~ #explanation{
    display: flex;
}

#explanation {
    z-index: 23;
    position: absolute;
    max-height: 50%;
    right: 0;
    bottom: 2rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;

    background-color: hsl(0,0%,100%);
    border-radius: 1.5rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
    padding: 1rem;
    transition: 0.5s;
    vertical-align: middle;
    align-items: center;
    background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%);
}

#tool_calc_expl_expl {
    display: flex;
    flex-flow: column;
    overflow: hidden;
}

.tool_calc_expl_title {
    font-weight: bold;
    font-size: 1.2rem;;
    text-align: center;
    margin-left: 1.2rem;
    margin-right: 1.2rem;
    margin-bottom: 0.6rem;
    flex:1;
}

.tool_calc_expl_text {
    width: 100%;
    flex: 1 1 auto;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
    overflow: auto;
}

.tool_calc_explslide{
    flex-direction: column;
    display: flex;
    overflow: hidden;
}

.cr3_calc_expl_btn > label{
    cursor: pointer;
}
.cr3_calc_expl_btn > label > input{
    display: none;
}
.cr3_calc_expl_btn > label > img{
    width: 1.5rem;
}

.cr3_calc_expl_btn {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    width: 1.5rem;
    text-align: center;
}

#tool_calc_explslide_cont{
    width: 100%;
}

.tool_calc_btn_menu > a{
    flex:1;
    cursor: pointer;
    color: #888;
    font-weight: bold;
    font-size: 20px;
    border-radius: 0 3px 3px 0;
    user-select: none;
    text-decoration: underline;
    width: 40%;
    text-align: center;
}
  
.tool_calc_btn_menu > a:hover{
    color: #0a58ca;
}

/* Position the "next button" to the right */
.next {
    border-radius: 3px 0 0 3px;
}

#explanation .cr3_tool_btn  {
    flex:1;
}

@media (max-width:480px),
       (max-height:480px) {
    #explanation .cr3_tool_btn  {
        display: none;
    }
    #explanation {
        top: 0;
        max-height: 98%;
        width: 100%;
    }
}