.calculator {
    margin-top: 42px;
    min-height: 400px;
    position: relative;
}

.calculator .page {
    padding: 0 var(--page-gapping);
}

.calculator h2 {
    margin-bottom: 0;
}

.calculator hr {
    border: none;
    border-top: 1px solid rgb(219, 219, 219);
}



.calculator input {
    background-color: #F6F6F9;
    padding: 12px 16px;
    border: none;
    border: 1px solid #c5c5c5;
    margin-bottom: 16px;
    font-size: var(--medium-font);
}

.calculator .pi-chart {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
}

.calculator .pi-chart .input-container{
    display: grid;
    grid-template-columns: 120px auto 80px;
    align-items: center;
    height: 80px;
}


.calculator .pi-chart .input-container span{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;

}

.calculator .pi-chart .input-container span:first-child{
    border-right: 1px solid rgb(206, 206, 206);
    height: 100%;
}


.calculator .pi-chart .content {
    margin: 2rem 0;
    margin-right: 2rem;
    background-color: white;
    box-shadow: 0px 14px 70px 0px rgba(0, 0, 0, 0.1);
    height: max-content;
    padding: 1rem;
}

.calculator .pi-chart input{
    width: 100%;
    padding: 0;
    margin: 0;
    display: block;
    margin: auto;
}



.calculator .pi-chart canvas {
    max-height: 300px;
}

.calculator .pi-chart .inner-input{
    width: 100%;
    position: relative;
    background-color: rgb(226, 226, 226);
    height: 1.8rem;
}

.calculator .pi-chart .inner-input .progress{
    width: 50%;
    background-color: var(--color-primary);
    height: 100%;
}

.calculator .pi-chart .inner-input .progress .handle{
    width: 2px;
    height: 100%;
    background-color: var(--color-primary);
    margin-left: auto;
    scale: 1.3;
    border-radius: 8px;
}


.calculator .pi-chart .inner-input input{
    position: absolute;
    height: 100%;
    top: 0;
    opacity: 0;
}





/* ---------------------- custom switch ---------------- */
.calculator .switch {
    display: block;
    position: relative;
    margin-left: auto;
    padding: 2px 4px;
    border: 1px solid rgb(201, 201, 201);
    margin-left: auto;
    width: max-content;
    margin-right: 80px;

}

.calculator .switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    top: 0;
    left: 0;
    opacity: 0;
}

.calculator .switch div {
    display: flex;
    gap: 2px;
}

.calculator .switch span {
    display: block;
    width: 32px;
    text-align: center;
    font-size: 14px;
}

.calculator .switch .left {
    background-color: #e9e9e9;
}

.calculator .switch input:checked~div .left {
    background-color: transparent;
}

.calculator .switch input:checked~div .right {
    background-color: #e9e9e9;
}



.calculator .chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.calculator .status {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}


.calculator .status .container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    background-color: white !important;
    box-shadow: 0px 14px 70px 0px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 4rem;
    padding: 1.5rem 1rem;
}

.calculator .status h2,
.calculator .status p {
    margin: 0;
    text-align: center;
}

.calculator .status span {
    width: 1px;
    display: block;
    background-color: rgb(207, 207, 207);
}



/* ---------------  bar graph section ----------------- */


.bar-graph .page {
    padding: 0 var(--page-gapping);
}

.bar-graph {
    margin-top: 60px;
}

.bar-graph .page>div {
    position: relative;
}

.bar-graph .page>div span {
    writing-mode: vertical-rl;
    text-align: center;
    position: absolute;
    left: 0;
    top: 50%;
    font-size: 14px;
    translate: -100% -50%;
}

.bar-graph .page #bar+span {
    right: 0;
    left: unset;
    translate: 100% -50%;
}



table {
    width: 100%;
    margin-top: 80px;
    border-collapse: collapse;
    border: none;
    margin-bottom: 40px;
}

table thead{
    background-color: #E8F0FF;
}

table td {
    text-align: center;
    word-break: keep-all;
    color: rgb(71, 71, 71);
}

table td,
table th {
    padding: 12px;
    font-size: 14px;
    white-space: pre;
}

table tr:nth-child(even) {
    background-color: #e8f0ffa1;
}

.table-holder{
    width: 100%;
    overflow: auto;
}

















@media only screen and (max-width: 900px) {

    .calculator .pi-chart {
        grid-template-columns: 100%;
    }

    .calculator .pi-chart .content {
        margin-right: 0;
    }
    

}

@media only screen and (max-width: 800px){
    .bar-graph span{
        display: none;
    }
}

@media only screen and (max-width: 700px){
    .calculator .status {
        grid-template-columns: 100%;
    }

    .calculator .status .container{
        margin-bottom: 0;
    }

    .calculator .status .container:last-child{
        margin-bottom: 2rem;
    }

    .calculator .pi-chart .input-container span{
        font-size: var(--small-font);
    
    }

    .calculator .pi-chart .input-container{
        grid-template-columns: 80px auto 60px;
        height: 60px;
    }

    .calculator .pi-chart .content{
        padding: 1rem 0;
    }

    .calculator .pi-chart .inner-input{
        height: 1.5rem;
    }
    
}