@font-face {
    font-family: "NBRB";
    src:
        url("./fonts/nbrb.woff2") format("woff2"),
        url("./fonts/nbrb.woff") format("woff"),
        url("./fonts/nbrb.ttf") format("truetype");
    font-display: swap;
}

.credit-calculator__currency-symbol {
    font-family: "NBRB", "Cera Pro", Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
}

.credit-calculator__currency-symbol::before {
    content: "\e901";
}

.credit-calculator {
    padding: 70px 0;
    background: linear-gradient(
        157.07deg,
        var(--credit-gradient-top, #9fb0ff) 14.86%,
        var(--credit-gradient-bottom, #637deb) 85.14%
    );
    font-family: "Cera Pro", Arial, sans-serif;
}

.credit-calculator *,
.credit-calculator *::before,
.credit-calculator *::after {
    box-sizing: border-box;
}

.credit-calculator .calculator-profit__wrapper {
    width: calc(100% - 30px);
    max-width: 1270px;
    margin: 0 auto;
}

.credit-calculator__body {
    display: flex;
    width: 100%;
    max-width: 1210px;
    min-height: 550px;
    margin: 0 auto;
}

.credit-calculator__calc,
.credit-calculator__result {
    min-width: 0;
}

.credit-calculator__calc {
    flex: 0 0 59.09%;
    padding: 60px 110px;
    border-radius: 70px 0 0;
    background: #fff;
    color: #0b0d13;
}

.credit-calculator__result {
    display: flex;
    flex: 0 0 40.91%;
    padding: 50px;
    border-radius: 0 0 70px;
    background: linear-gradient(145deg, #41454f 0%, #0e0f12 100%);
    color: #fff;
}

.credit-calculator .calculator-profit__title {
    margin: 0 0 45px;
    color: #0b0d13;
    font-family: inherit;
    font-size: 42px;
    font-weight: 600;
    line-height: 1.1;
}

.credit-calculator__form {
    display: grid;
    gap: 33px;
}

.credit-calculator .calculator-profit__field {
    margin-bottom: 0;
}

.credit-calculator .calculator-profit__field-label {
    display: block;
    margin-bottom: 5px;
    color: #77797f;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
}

.credit-calculator__compound {
    display: flex;
    width: 100%;
    border-radius: 20px;
    background: rgba(11, 13, 19, 0.05);
}

.credit-calculator__compound--amount,
.credit-calculator__compound--term {
    position: relative;
    height: 73px;
    overflow: visible;
}

.credit-calculator__currency-static,
.credit-calculator__term-unit {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 0 0 142px;
    align-items: center;
    margin: 7px 0 7px 7px;
    padding: 0 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 25px rgba(19, 25, 34, 0.1);
    color: #0b0d13;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.credit-calculator__currency-static {
    gap: 12px;
}

.credit-calculator__currency-code {
    font-weight: 600;
}

.credit-calculator__currency-icon {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    object-fit: cover;
    border-radius: 50%;
}

.credit-calculator__amount-field,
.credit-calculator__term-field {
    position: relative;
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: stretch;
}

.credit-calculator__input--amount,
.credit-calculator__input--term {
    width: 100%;
    height: 73px;
    padding: 0 48px 0 16px;
    border: 0;
    border-radius: 0 20px 20px 0;
    outline: 0;
    background: transparent;
    color: #0b0d13;
    font: inherit;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    appearance: textfield;
}

.credit-calculator__amount-clear,
.credit-calculator__term-clear {
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #a4a6aa;
    font: inherit;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.credit-calculator__amount-clear:hover,
.credit-calculator__term-clear:hover {
    color: #77797f;
}

.credit-calculator__amount-clear.is-hidden,
.credit-calculator__term-clear.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.credit-calculator .profit__prop.is-hidden {
    display: none;
}

.credit-calculator .calculator-profit__disclaimer.is-hidden {
    display: none;
}

.credit-calculator .calculator-profit__footer .calculator-profit__disclaimer + .calculator-profit__disclaimer {
    margin-top: 8px;
}

.credit-calculator__input::-webkit-outer-spin-button,
.credit-calculator__input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.credit-calculator__input--amount:focus,
.credit-calculator__input--term:focus {
    background: transparent;
}

.credit-calculator__term-unit {
    position: relative;
    overflow: visible;
    padding: 0;
}

.credit-calculator__term-unit.is-open {
    z-index: 10;
}

.credit-calculator__unit-trigger {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px 0 20px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0b0d13;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.credit-calculator__unit-label {
    min-width: 0;
    text-align: left;
}

.credit-calculator__unit-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 2px solid #0b0d13;
    border-bottom: 2px solid #0b0d13;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.credit-calculator__term-unit.is-open .credit-calculator__unit-chevron {
    transform: rotate(-135deg);
}

.credit-calculator__unit-select {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.credit-calculator__unit-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 100%;
    padding: 8px 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(19, 25, 34, 0.15);
}

.credit-calculator__unit-dropdown[hidden] {
    display: none;
}

.credit-calculator__unit-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0b0d13;
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.credit-calculator__unit-option:hover {
    background: rgba(11, 13, 19, 0.04);
}

.credit-calculator__unit-option.is-selected {
    font-weight: 600;
}

.credit-calculator__unit-option.is-disabled,
.credit-calculator__unit-option:disabled {
    color: #a4a6aa;
    cursor: not-allowed;
}

.credit-calculator__unit-check {
    visibility: hidden;
    width: 12px;
    flex: 0 0 12px;
    color: #0b0d13;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.credit-calculator__unit-option.is-selected .credit-calculator__unit-check {
    visibility: visible;
}

.credit-calculator__range {
    --range-progress: 0%;
    position: absolute;
    z-index: 3;
    height: 4px;
    margin: 0;
    border: 0;
    border-radius: 4px;
    outline: 0;
    background: linear-gradient(
        to right,
        #f3154a 0,
        #f3154a var(--range-progress),
        #a4a6aa var(--range-progress),
        #a4a6aa 100%
    );
    appearance: none;
}

.credit-calculator__range--amount,
.credit-calculator__range--term {
    bottom: 0;
    left: 50%;
    width: 93%;
    transform: translate(-50%, 50%);
}

.credit-calculator__range::-webkit-slider-thumb {
    width: 30px;
    height: 30px;
    border: 3px solid #f3154a;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(19, 25, 34, 0.2);
    cursor: pointer;
    appearance: none;
}

.credit-calculator__range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 3px solid #f3154a;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(19, 25, 34, 0.2);
    cursor: pointer;
}

.credit-calculator .calculator-result {
    width: 100%;
}

.credit-calculator .profit {
    width: 100%;
}

.credit-calculator__result-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.credit-calculator .profit__profit,
.credit-calculator .profit__profit.new,
.credit-calculator [id^="minus_"],
.credit-calculator [id^="plus_"],
.credit-calculator [id^="profitsum_"] {
    display: none !important;
}

.credit-calculator__result-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 17px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.3;
}

.credit-calculator__tooltip {
    position: relative;
    flex-shrink: 0;
    margin-left: 2px;
}

.credit-calculator__tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    line-height: 0;
}

.credit-calculator__tooltip-icon {
    display: block;
    width: 20px;
    height: 21px;
    transition: filter 0.3s ease;
    filter: brightness(0) invert(1);
}

.credit-calculator__tooltip-trigger:hover .credit-calculator__tooltip-icon,
.credit-calculator__tooltip.is-open .credit-calculator__tooltip-icon {
    filter: brightness(0) saturate(100%) invert(52%) sepia(66%) saturate(749%) hue-rotate(199deg) brightness(99%) contrast(92%);
}

.credit-calculator__tooltip-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 20;
    width: 100vw;
    max-width: 420px;
    transform: translateX(-50%);
}

.credit-calculator__tooltip-popover-wrap {
    position: relative;
}

.credit-calculator__tooltip-content {
    padding: 15px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 25px rgba(19, 25, 34, 0.1);
    color: #0b0d13;
    font-family: "Cera Pro", Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
}

.credit-calculator__tooltip-arrow {
    position: absolute;
    bottom: -15px;
    left: calc(50% - 8px);
    width: 0;
    height: 0;
    border-width: 8px;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
    transform: rotate(-90deg);
}

.credit-calculator__main-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.credit-calculator__term-step {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.credit-calculator__term-step:hover:not(:disabled):not(.is-disabled) {
    filter: brightness(0.5);
}

.credit-calculator__term-step:disabled,
.credit-calculator__term-step.is-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.credit-calculator__term-step-icon {
    display: block;
    width: 35px;
    height: 35px;
}

.credit-calculator__main-value {
    min-width: 0;
    flex: 1 1 auto;
    color: #fff;
    font-size: 52px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.credit-calculator__result-divider {
    height: 1px;
    margin: 36px 0 31px;
    background: rgba(255, 255, 255, 0.2);
}

.credit-calculator .profit__prop {
    display: block;
}

.credit-calculator .profit__prop:not(:last-child) {
    margin-bottom: 20px;
}

.credit-calculator .profit__prop-name {
    display: block;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.3;
}

.credit-calculator .profit__prop-value {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
}

.credit-calculator .calculator-profit__footer {
    margin-top: 35px;
}

.credit-calculator .calculator-profit__disclaimer {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
}

@media screen and (max-width: 1279px) {
    .credit-calculator__calc {
        flex-basis: 55%;
        padding: 60px 40px;
    }

    .credit-calculator__result {
        flex-basis: 45%;
        padding: 50px 40px;
    }
}

@media screen and (max-width: 900px) {
    .credit-calculator__body {
        display: block;
        max-width: 715px;
        min-height: 0;
    }

    .credit-calculator__calc,
    .credit-calculator__result {
        width: 100%;
    }

    .credit-calculator__calc {
        padding: 45px 40px 35px;
        border-radius: 50px 0 0;
    }

    .credit-calculator__result {
        padding: 40px;
        border-radius: 0 0 50px;
    }
}

@media screen and (max-width: 767px) {
    .credit-calculator {
        padding: 50px 0;
    }

    .credit-calculator .calculator-profit__wrapper {
        width: calc(100% - 20px);
    }

    .credit-calculator__calc {
        padding: 30px 20px;
        border-radius: 30px 0 0;
    }

    .credit-calculator__result {
        padding: 30px 20px;
        border-radius: 0 0 30px;
    }

    .credit-calculator .calculator-profit__title {
        margin-bottom: 30px;
        font-size: 26px;
        line-height: 1.1;
    }

    .credit-calculator__form {
        gap: 25px;
    }

    .credit-calculator .calculator-profit__field-label {
        font-size: 16px;
    }

    .credit-calculator__compound--amount,
    .credit-calculator__compound--term {
        height: 59px;
    }

    .credit-calculator__currency-static,
    .credit-calculator__term-unit {
        flex-basis: 115px;
        margin: 4px 0 4px 4px;
        padding: 0 14px;
        border-radius: 17px;
        font-size: 14px;
    }

    .credit-calculator__currency-icon {
        width: 21px;
        height: 21px;
        flex-basis: 21px;
    }

    .credit-calculator__input--amount,
    .credit-calculator__input--term {
        height: 59px;
        padding-right: 42px;
        padding-left: 12px;
        font-size: 18px;
    }

    .credit-calculator__amount-clear,
    .credit-calculator__term-clear {
        right: 12px;
        font-size: 22px;
    }

    .credit-calculator__unit-trigger {
        gap: 8px;
        padding: 0 12px 0 14px;
        font-size: 14px;
    }

    .credit-calculator__unit-chevron {
        width: 7px;
        height: 7px;
        flex-basis: 7px;
    }

    .credit-calculator__unit-dropdown {
        top: calc(100% + 6px);
        padding: 6px 0;
        border-radius: 17px;
    }

    .credit-calculator__unit-option {
        padding: 10px 14px;
        font-size: 14px;
    }

    .credit-calculator__main-value {
        font-size: 32px;
    }

    .credit-calculator__result-divider {
        margin: 29px 0 25px;
    }

    .credit-calculator .profit__prop:not(:last-child) {
        margin-bottom: 15px;
    }

    .credit-calculator .profit__prop-name {
        margin-bottom: 3px;
    }

    .credit-calculator .profit__prop-value {
        font-size: 20px;
    }

    .credit-calculator__tooltip-popover {
        max-width: 300px;
    }

    .credit-calculator__range {
        touch-action: pan-x;
    }

    .credit-calculator__range::-webkit-slider-thumb {
        width: 34px;
        height: 34px;
    }

    .credit-calculator__range::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
}

@media screen and (max-width: 640px) {
    .credit-calculator__tooltip {
        position: static;
    }

    .credit-calculator__tooltip-popover {
        left: 0;
        transform: none;
    }
}

@media screen and (max-width: 379px) {
    .credit-calculator__calc,
    .credit-calculator__result {
        padding-right: 20px;
        padding-left: 20px;
    }

    .credit-calculator__main-value {
        font-size: 29px;
    }

    .credit-calculator__tooltip-popover {
        max-width: 280px;
        transform: translateX(-69%);
    }

    .credit-calculator__tooltip-arrow {
        left: calc(69% - 8px);
    }
}
