﻿.dg-calculator__floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #fff;
    color: #676767;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 4px 10px 1px rgba(0,0,0,0.3);
    font-size: 21px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

    .dg-calculator__floating-btn.has-text {
        width: 120px;
        border-radius: 35px;
        gap: 10px;
    }

.dg-calculator__floating-btn-wrap {
    transform: rotate(0deg);
    -webkit-transition: all .15s cubic-bezier(0.15, 0.87, 0.45, 1.23);
    transition: all .15s cubic-bezier(0.15, 0.87, 0.45, 1.23);
}

.dg-calculator__floating-btn label {
    color: #000;
    font-size: 12px;
    text-align: left;
    line-height: 1.1;
    width: 55px;
    cursor: pointer;
    user-select: none;
}

.dg-calculator__floating-btn .ani {
    transform: rotate(45deg);
    -webkit-transition: all .15s cubic-bezier(0.15, 0.87, 0.45, 1.23);
    transition: all .15s cubic-bezier(0.15, 0.87, 0.45, 1.23);
}

.dg-calculator__floating-btn-wrap.close {
    background-position: -2px 1px;
    transform: rotate(-45deg);
    float: none;
    /*Bootstrap Overide*/
    opacity: 1;
    /*Bootstrap Overide*/
}

.dg-calculator__floating-btn-wrap.ani label {
    opacity: 0;
}


.dg-calculator__floating-btn:hover {
    transform: scale(1.1);
}

.dg-calculator__content-wrap {
    position: fixed;
    right: 25px;
    bottom: 100px;
    z-index: 1000;
    visibility: hidden;
}
    .dg-calculator__content-wrap.open {
        visibility: visible;
    }

.dg-calculator__content {
    padding: 0;
    margin-bottom: 15px;
    width: 300px;
    height: 50px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0px 12px 45px rgba(0, 0, 0, .15);
    text-align: center;
    margin: 0 0 10px 0;
    overflow: hidden;
    opacity: 0;
}

.dg-calculator__head {
    background-color: #ddd;
    padding: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .dg-calculator__head h4 {
        font-size: 14px;
        color: #313131;
        margin: 0;
    }

.dg-calculator__close-corner {
    font-size: 16px;
    position: absolute;
    right: 20px;
    color: dimgrey;
}
    .dg-calculator__close-corner:hover {
        color: rgb(50, 50, 50);
        cursor: pointer;
    }

.dg-calculator__content-inner {
    padding: 15px 20px;
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    position: relative;
}

.dg-calculator__loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: grey;
    z-index: 5;
}

.dg-calculator__body {
    flex: 1;
}

.dg-calculator__with-search {
    margin: 10px 0;
}

.dg-calculator__content.popup-ani {
    -webkit-transition: all .8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all .8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dg-calculator__content.open {
    height: 315px;
    opacity: 1;
}

.dg-calculator__manual {
    margin-top: 15px;
}

.height-expanded-full .dg-calculator__content.open {
    height: 580px;
}

.width-expanded-full .dg-calculator__content {
    width: 420px;
}

.height-expanded .dg-calculator__content.open {
    height: 350px;
}

.width-expanded .dg-calculator__content {
    width: 320px;
}

.dg-calculator__floating-btn-wrap i.close:before {
    content: "\f067";
}

.dg-calculator__values {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .dg-calculator__values p {
        margin: 0;
        color: #4d4d4d;
        line-height: 1;
    }

    .dg-calculator__values.is-pending div {
        font-size: 18px;
    }

    .dg-calculator__values.is-pending i {
        display: none;
    }

    .dg-calculator__values div {
        font-size: 26px;
        position: relative;
        line-height: 1;
    }

    .dg-calculator__values i {
        position: absolute;
        top: 11px;
        right: -28px;
        font-size: 16px;
        color: blue;
        cursor: pointer;
    }

        .dg-calculator__values i:hover {
            color: darkblue;
        }

.dg-calculator__selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dg-calculator__result {
    margin: 20px 0 5px 0;
}

.dg-calculator__manual-result {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: blue;
    color: #fff;
    margin-top: 20px;
    min-height: 155px;
}

    .dg-calculator__manual-result p {
        font-size: 18px;
        text-align: left;
        line-height: 1.2;
        max-width: 115px;
    }

    .dg-calculator__manual-result div {
        font-size: 50px;
    }

.dg-calculator__result-header {
    background-color: #ebebeb;
    display: flex;
    align-items: center;
}

    .dg-calculator__result-header.more {
        padding-right: 17px;
    }

.dg-calculator__result-body {
    max-height: 177px;
    overflow-y: auto;
}

.dg-calculator__result-item {
    display: flex;
    align-items: center;
}

    .dg-calculator__result-item + .dg-calculator__result-item {
        border-top: 1px solid #ebebeb;
    }

    .dg-calculator__result-item:nth-child(even) {
        background-color: #f3f3f3;
    }

.dg-calculator__result-header div {
    font-weight: bold;
}

.dg-calculator__result-header div,
.dg-calculator__result-item div {
    padding: 10px;
    line-height: 1.2;
    font-size: 12px;
    flex: 1;
    text-align: center;
}

    .dg-calculator__result-header div:first-child,
    .dg-calculator__result-item div:first-child {
        text-align: left;
        max-width: 115px;
        min-width: 115px;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

.dg-calculator__actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .dg-calculator__actions .btn-primary:disabled {
        opacity: 0.4;
        filter: grayscale(1);
    }

.dg-calculator__footer-actions a {
    text-decoration: none;
}

    .dg-calculator__footer-actions a[disabled=true] {
        opacity: 0.4;
        pointer-events: none;
    }

.dg-calculator__calculate-btn {
    position: relative;
    overflow: hidden;
}

.dg-calculator__btn-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #000;
    z-index: 5;
}

:root {
    --switches-bg-color: #bbb;
    --switches-label-color: white;
    --switch-bg-color: white;
    --switch-text-color: #555;
}

.switches-container {
    width: 120px;
    position: relative;
    display: flex;
    padding: 0;
    position: relative;
    background: var(--switches-bg-color);
    line-height: 2.2;
    border-radius: 3rem;
}

    /* input (radio) for toggling. hidden - use labels for clicking on */
    .switches-container input {
        visibility: hidden;
        position: absolute;
        top: 0;
    }

    /* labels for the input (radio) boxes - something to click on */
    .switches-container label {
        width: 50%;
        padding: 0;
        margin: 0;
        text-align: center;
        cursor: pointer;
        color: var(--switches-label-color);
    }

/* switch highlighters wrapper (sliding left / right)
        - need wrapper to enable the even margins around the highlight box
    */
.switch-wrapper {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    padding: 0.15rem;
    z-index: 3;
    transition: transform .5s cubic-bezier(.77, 0, .175, 1);
    /* transition: transform 1s; */
}

/* switch box highlighter */
.switch {
    border-radius: 3rem;
    background: var(--switch-bg-color);
    height: 100%;
}

    .switch div {
        width: 100%;
        text-align: center;
        opacity: 0;
        display: block;
        color: var(--switch-text-color);
        transition: opacity .2s cubic-bezier(.77, 0, .175, 1) .125s;
        will-change: opacity;
        position: absolute;
        top: 0;
        left: 0;
    }

/* slide the switch box from right to left */
.switches-container input:nth-of-type(1):checked ~ .switch-wrapper {
    transform: translateX(0%);
}

/* slide the switch box from left to right */
.switches-container input:nth-of-type(2):checked ~ .switch-wrapper {
    transform: translateX(100%);
}

/* toggle the switch box labels - first checkbox:checked - show first switch div */
.switches-container input:nth-of-type(1):checked ~ .switch-wrapper .switch div:nth-of-type(1) {
    opacity: 1;
}

/* toggle the switch box labels - second checkbox:checked - show second switch div */
.switches-container input:nth-of-type(2):checked ~ .switch-wrapper .switch div:nth-of-type(2) {
    opacity: 1;
}

.dg-calculator__form-group {
    display: flex;
    gap: 20px;
}

.dg-calculator__form-item {
    position: relative;
    margin: 0 0 15px;
}

.dg-calculator__form-group .dg-calculator__form-item {
    margin: 15px 0;
}

    .dg-calculator__form-group .dg-calculator__form-item.no-bottom-space {
        margin-bottom: 0;
    }

.dg-calculator__form-item input {
    display: block;
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    border-bottom: solid 1px #bbb;
    transition: all .3s ease;
    padding: 0 10px
}

    .dg-calculator__form-item input:focus {
        border-color: #000;
    }

    .dg-calculator__form-item input:focus-visible {
        outline: none;
        border-color: #000;
    }

.dg-calculator__form-item label {
    position: absolute;
    cursor: text;
    z-index: 2;
    top: 13px;
    left: 2px;
    font-size: 14px;
    background: #fff;
    padding: 0;
    color: #999;
    transition: all .3s ease;
    pointer-events: none;
}

.dg-calculator__form-item input:focus + label,
.dg-calculator__form-item input:valid + label,
.dg-calculator__form-item.has-value label {
    font-size: 11px;
    top: -11px;
}

.dg-calculator_manual-handicap {
    position: relative;
    margin-top: 10px;
}

    .dg-calculator_manual-handicap i {
        position: absolute;
        top: 0;
        right: 0;
        color: blue;
        cursor: pointer;
    }

.dg-calculator__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 5;
    box-shadow: 0px 5px 3px rgba(0,0,0,0.3);
    max-height: 130px;
    overflow-x: auto;
}

.dg-calculator__dropdown-loader {
    padding: 10px;
    text-align: center;
}

.dg-calculator__dropdown-item {
    padding: 5px 10px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    background-color: #fff;
    color: #000;
}

    .dg-calculator__dropdown-item:hover {
        background-color: #e5e5e5;
    }

    .dg-calculator__dropdown-item + .dg-calculator__dropdown-item {
        border-top: 1px solid #e5e5e5;
    }


@media all and (max-width: 480px) {

    .dg-caluclator.result {
        margin: 20px 0 15px 0;
    }

    .dg-calculator__result-header.more {
        padding-right: 0px;
    }

    .dg-calculator__result-header div:first-child,
    .dg-calculator__result-item div:first-child {
        min-width: 90px;
    }

    .dg-calculator__content-wrap {
        right: 10px;
        bottom: 70px;
        left: 10px;
    }

    .dg-calculator__content,
    .width-expanded-full .dg-calculator__content {
        width: 100%;
    }

    .height-expanded-full .dg-calculator__content.open {
        height: 530px;
    }

    .dg-calculator__result-body {
        max-height: 138px;
    }

    .dg-calculator__manual-result {
        padding: 20px 30px;
        min-height: 125px;
    }

    .dg-calculator__floating-btn {
        position: fixed;
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

        .dg-calculator__floating-btn label {
            font-size: 10px;
            width: 45px;
        }

    .dg-calculator__floating-btn-wrap i {
        font-size: 18px;
    }


    .dg-calculator__floating-btn.has-text {
        width: 95px;
        border-radius: 35px;
        gap: 5px;
    }
}
