@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300..800&family=Roboto+Slab:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* reset */
.tri-switch *{
    padding:0;
    margin:0;
    box-sizing: content-box;
}

/* ergon override */
.calc-form .responsive{
    /* override ergon energy site styles */
    overflow-x: visible !important;
    overflow: visible;
}
.authored-content th, .authored-content td{
    padding:0px !important;
    /* padding-left: 10px !important;
    padding-right: 10px !important; */
    border: 0px !important;
}
.authored-content table{
    border:0px;
}
.litepicker{
    top: auto!important;
    left: auto !important;
}
input[type=radio], input[type=checkbox]{
    width:0;
    margin:0;
}
/* typography */
#calculator .roboto {
    font-family: "Roboto Slab", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

#calculator .opensans,
#calculator .litepicker {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

#calculator .material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24
}

#calculator h1 {
    padding-top: 30px;
    padding-bottom: 30px;
}

#calculator h4 {
    font-family: "Roboto Slab", serif;
    font-size: 1.1em;
    text-transform: none;
    margin-top:25px;
    margin-bottom:25px;
}

#calculator .large-type {
    font-size: 13px !important;
    color: #223a2a;
    font-weight: 500;
}

/* main layout */
.calculator,
.calc-form{
    max-width: 750px;
    min-width: 335px;
    margin: auto;
}

.calc-form {
    margin: 0
}

.calc-form table {
    width: 100%;
}

/* tri state toggle - https://codepen.io/Navdeep-Mishra-the-solid/pen/abPVEEz */
/* accessible note - https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/ */

/* switch container outline */
.switch-outline {
    position: absolute;
    width: calc(100% + 4px);
    height: 54px;
    top: -2px;
    z-index: -3;
}

/* provide focus state to switch when selected */
#calculator input[type="radio"]:focus+label+span.switch-outline,
#calculator input[type="radio"]:hover+label+span.switch-outline {
    transition: box-shadow 0.5s ease;
    box-shadow: 0 0 0 4px hsl(39, 100%, 69%) !important;
}

#calculator input[type="radio"]:focus,
#calculator input[type="radio"]:focus-visible {
    box-shadow: none !important;
    outline: 0;
}

.tri-switch {
    border: 2px solid #223a2a;
    position: relative;
    height: 55px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    font-family: "Roboto Slab", serif;
    background: #fff;
}

#active-label {
    position: absolute;
    left: 0;
    /* width: 249px; */
    width: calc(33.33333333% + 1px);
    height: 100%;
    background: #006710;
    transition: .5s left ease;
    z-index: 1;
}

/* layer to hide radios */
#inactive-label {
    position: absolute;
    left: 0;
    width: 100%;
    background: #fff;
    height: 50px;
}

/* labels */
.tri-switch label {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    width: 250px;
    text-align: center;
    border-right: 1px solid #223a2a;
    cursor: pointer;
    color: #000;
}

#tri-switch-radio3+label {
    border-right: 0px;
}

.full-label #tri-switch-radio1:checked~#active-label {
    left: 0;
}

#tri-switch-radio2:checked~#active-label {
    left: 33.33333333%;
}

#tri-switch-radio3:checked~#active-label {
    left: 66.66666666%;
}

#tri-switch-radio1:checked+label,
#tri-switch-radio2:checked+label,
#tri-switch-radio3:checked+label {
    color: #fff;
    transition: 0.5s ease;
}

/* table */
.calc-form table{
    border:none;
}
.calc-header-row{
    height:62px;
}
.calc-form tr.invalid-row td:first-child { 
    /* background-color:#ffb4b4; */
    border-left:2px solid #df7a3f;
}
.calc-form tbody>tr:first-child>td>button.removebill {
    display: none;
    /* hide remove button for first row */
}
.calc-form .removebill span{
    color: #006710;
}
.calc-form .calc-row {
    height: 50px;
    border-bottom:1px solid #fff;
}

.calc-form th {
    font-family: "Roboto Slab", serif;
    padding: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    background: #223a2a;
    color: #fff;
    text-align: center;
    font-weight: normal;
    min-width:70px;
    vertical-align:middle;
    border-right:1px solid #fff !important;
}

.calc-form th.action {
    padding: 0;
    min-width: 37px;
}

.calc-form td {
    font-family: "Open Sans", sans-serif;
    background: #f1f2f5;
    vertical-align: middle;
    font-size: 14px;
    font-weight: bold;
    height: 50px;
    border-right: 1px solid #fff !important;
}

.calc-form td.kWh {
    position: relative;
    display: flex;
    align-items: center;
    height:50px;
}

/* add multiple kWh widget */
button.multikWh {
    background: #006710;
    color: #fff;
    border: none;
    cursor: pointer;
    height: 41px;
    display:flex;
    align-items:center;
}

button.multikWh:hover,
button.multikWh:focus {
    outline: none;
    box-shadow: 0 0 0 4px hsl(39, 100%, 69%);
    transition: box-shadow 0.5s ease;
}

.kWh-widget {
    position: absolute;
    width: 240px;
    height: 320px;
    border: 2px solid #223a2a;
    background: #fff;
    top: 49px;
    left: 0px;
    outline: none;
    display: none;
    z-index: 4;
}
.kWh-header{
    height:80px;
    color:#fff;
    display: flex;
    flex-direction:column;
    font-family: "Roboto Slab", serif;
    font-weight:400;
    position:relative;
}
.kWh-header1{
    display:flex;
    background-color: #223a2a;
    align-items: center;
    justify-content: center;
    height:40px;
}
.kWh-header1 .close{
    background:transparent;
    color:#fff;
    border:none;
    position:absolute;
    right:0;
}
.kWh-header1 .close span{
    font-size:18px;
    cursor:pointer;
}
.kWh-header2{
    display:flex;
    background-color: #006710;
    height:50px;
    align-items: center;
    text-align:left;
    padding-left:10px;
    padding-right:10px;
}
.kWh-widget-body {
    height: calc(100%-40px);
    /* overflow-y: scroll;
    scrollbar-color: #006710 transparent;
    scrollbar-width: 5px;
    scrollbar-width: thin;     */
    overflow:hidden;
}
.kWh-row {
    display:flex;
    justify-content: space-around;
    margin-top:4px;
    margin-bottom:4px;
}

.kWh-entry {
    display: table-cell;
    vertical-align:middle;
}

.kWh-entry button {
    background: #fff;
    color:#006710;
}

.kWh-entry input[type="text"] {
    border: 2px solid #999;
}

.kWh-entry input[type="text"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px hsl(39, 100%, 69%);
    transition: box-shadow 0.5s ease;
}

.kWh-entry .remove {
    background: #fff !important;
    vertical-align: middle;
}

.kWh-footer {
    background: #fff;
    display: flex;
    height: 50px;
    justify-content: center;
}

.kWh-footer button {
    height: 32px;
    padding: 20px;
    margin: 5px;
}

/* forms */
.calc-form .text-center {
    text-align: center;
}

.calc-form .input-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell input {
    border-radius: 0px;
}

.datepicker {
    cursor: pointer;
}

.action {
    width: 0px;
}

.bill {
    width: 20px;
}

.large {
    width: 170px;
}

.medium {
    width: 125px;
}

.small {
    width: 90px;
    text-align: right;
}

.x-small {
    width: 56px;
    text-align: center;
}

.calc-form input.no-style {
    border: 2px solid #ccc;
    background: #fefefe;
    text-align: center;
    outline: none;
}

.calc-form input {
    padding: 10px;
    font-size: 12px;
    font-family: 'Open Sans';
    font-weight: 500;
    border: 2px solid #006710;
    /* height:42px; */
}

.calc-form input.bill-entry:focus {
    outline: none;
    box-shadow: 0 0 0 4px hsl(39, 100%, 69%);
    transition: box-shadow 0.5s ease;
}

.calc-form input.selected {
    outline: none;
    box-shadow: 0 0 0 4px hsl(39, 100%, 69%);
    transition: box-shadow 0.5s ease;
}

.calc-form label {
    display: none;
}

/* action buttons */
.button-area {
    display: flex;
    justify-content: center;
}

.action-button {
    padding: 20px;
    padding-left: 35px;
    padding-right: 35px;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1em;
    display: flex;
    align-items: center;
    width: fit-content;
    text-transform: uppercase;
    color: #fff;
    border: 0px;
    font-family: 'Open Sans';
    font-weight: 700;
    cursor: pointer;
    margin-right: 10px;
    flex-direction:row;
}

.action-button:hover {
    transition: box-shadow 0.5s ease;
    box-shadow: 0 0 0 4px hsl(39, 100%, 69%);
}

.action-button span {
    padding-right: 10px;
}

.clear-button {
    color: #006710;
}

#calculator .add-button {
    background: #006710;
}

.calc-form .removebill {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding-top:7px;
}

.calc-form .removekWh {
    border: 0;
    cursor: pointer;
}

/* #calculator .removebill:after, */
/* .calc-form .removekWh:after { */
    /* display: inline-block; */
    /* This will render the 'X' */
    /* content: "\00d7"; */
    /* font-size: 2em; */
    /* color: #006710 */
/* } */

/* cards */
#calculator .card-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#calculator .card-container {
    padding: 8px;
}

#calculator .card {
    background: #EDEDED;
    height: 235px;
    width: 235px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#calculator .card-body {
    font-family: "Roboto Slab", serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 10px;
}

#calculator .card-title {
    font-size: 2.4em;
    margin: 0px;
    text-align: center;
}

#calculator .card-text {
    font-size: 1.2rem;
    margin: 0px;
    text-align: center;
}

/* bg overlay */
.calculator-modal-bg {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(1px);
    z-index: 4;
    display: none;
}

/* disclaimer */
.disclaimer-container p {
    font-family: "Open Sans", sans-serif;
    font-style: italic;
    font-size: 0.7em;
}

/* colors */
#calculator .green {
    background: #006710;
    color: #fff;
}

#calculator .darkgreen {
    background: #223a2a;
    color: #fff;
}

.orange {
    background: #df7a3f;
    color: #fff;
}

.white-font {
    color: #fff;
}

.black-font {
    color: #000;
}

/* animations */
.fadein {
    /* animation: fadeIn 1s; */
    animation: fadeIn;
    animation-duration: 1s;
}

.fadeout {
    animation: fadeOutDown;
    animation-duration: 2s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@media screen and (max-width:750px) {
    #calculator {
        padding: 0px;
    }

    /* tri switch */
    #active-label{
        width:33.33333333%;
    }
    #tri-switch-radio2:checked~#active-label {
        left:33.33333333%;
    }    
    /*#tri-switch-radio3:checked~#active-label {*/
    /*    margin-left: -1px;*/
    /*}*/

    /* table */
    .calc-header-row {
        display: none;
    }

    .calc-form .calc-row {
        display: flex;
        flex-direction: column;
        position: relative;
        padding-top: 15px;
        height: auto;
    }

    .calc-form td{
        border-right:0px !important;
    }

    .calc-form td.kWh {
        display: inline-block;
        /* height: auto; */
    }

    .calc-body td:nth-child(3){
        height:61px;
        padding-top:10px !important;
    }

    .calc-row .action {
        position: absolute;
        right: 30px;
        margin-right: 10px;
        top: 17px;
    }

    .calc-row .cell {
        padding: 5px;
        text-align: left !important;
    }

    .calc-row .cell:first-child {
        padding: 0px;
    }

    .calc-row .billno {
        font-family: "Roboto Slab", serif !important;
        background-color: #223a2a !important;
        color: #fff;
        height: 50px;
        line-height: 48px;
        font-size: 16px !important;
        padding-left: 15px !important;
    }

    .calc-row .billno::before {
        content: 'Bill '
    }

    .calc-form label {
        float: left;
        width: 150px;
        text-align: right;
        padding-right: 10px;
        padding-top: 10px;
        display: inline;
    }

    .calc-form label~input {
        float: left;
    }

    .calc-form .removebill {
        width: 29px;
        height: 37px;
        background: transparent !important;
        border-radius: 20px;
        font-weight: 800;
        display: flex;
        align-items: center;
    }

    .calc-form .removebill span {
        color: #fff;
    }

    .litepicker{
        top:40% !important;
        bottom:30% !important;
        left: 50% !important;
    }

    /* kWh widget */
    .kWh-widget{
        left:100px;
        top:42px;
    }

    .small {
        text-align: left;
    }

    .button-area{
        flex-direction:column;
        align-items:center;
    }

    /* cards */
    #calculator .card-row {
        flex-direction: column;
    }

    #calculator .card {
        width: 100%;
        height: 150px;
    }
}

@media screen and (max-width:470px) {
    .tri-switch {
        height: 80px;
    }

    .switch-outline {
        height: 81px;
    }

    #tri-switch-radio2:checked~#active-label {
        left: 33.33333333%;
    }

    #tri-switch-radio3:checked~#active-label {
        left: 66.66666666%;
    }
}

/* accessible */

.sr-only {
    clip: rect(0 0 0 0);
    clip-path: inset(100%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* tool tip */
.calc-form .tooltip {
    position: absolute;
    top: 0;
    font-size: 14px;
    background: #000;
    color: #ffffff;
    padding: 5px 8px;
    border-radius: 5px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.calc-form .tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    background: #000;
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.calc-form .tooltip-wrapper{
    position:relative;
}

.calc-form .tooltip-wrapper:hover .tooltip {
    top: -45px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    left:0;
}

.calc-form .tooltip-wrapper:hover .tooltip {
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}

.calc-form .tooltip-wrapper:hover .tooltip::before {
    background: #000;
    color: #ffffff;
}