/* =========================================================
   КАЛЬКУЛЯТОР — НОВЫЙ КОМПАКТНЫЙ ВИД
   HTML И JS НЕ ТРОГАЕМ
   ========================================================= */


/* =========================================================
   ОСНОВНОЙ КОНТЕЙНЕР
   ========================================================= */

.calculator {
    max-width: 1180px;
    padding: 28px 30px 45px;
    background: #fff;
}


/* =========================================================
   ОСНОВНАЯ СЕТКА
   ========================================================= */

.calculator__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 40px;
    row-gap: 0;
    align-items: start;
}


/* =========================================================
   MAIN
   ========================================================= */

.calculator__main {
    display: contents;
}


/* =========================================================
   СЕКЦИИ
   ========================================================= */

section.calculator__section {
    padding: 0;
}


/* =========================================================
   ЗАГОЛОВКИ
   ========================================================= */

.calculator__title {
    margin: 0 0 14px;

    color: #252525;

    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;

    text-align: center;
    text-transform: none;
}


/* =========================================================
   НАЛОГООБЛОЖЕНИЕ — СЛЕВА
   ========================================================= */

.calculator__main > .calculator__section:nth-child(2) {
    grid-column: 1;
    grid-row: 1;

    margin: 0 0 10px;
}


/* =========================================================
   ИП / ЮРЛИЦО — СПРАВА
   ========================================================= */

.calculator__main > .calculator__section:nth-child(1) {
    grid-column: 2;
    grid-row: 1;

    margin: 0 0 10px;
}


/* =========================================================
   КОЛИЧЕСТВО ОПЕРАЦИЙ
   ========================================================= */

.calculator__main > .calculator__section:nth-child(3) {
    grid-column: 1;
    grid-row: 2;

    margin: 0 0 10px;
}


/* =========================================================
   КОЛИЧЕСТВО СОТРУДНИКОВ
   ========================================================= */

.calculator__main > .calculator__section:nth-child(4) {
    grid-column: 1;
    grid-row: 3;

    margin: 0 0 10px;
}


/* =========================================================
   ДОПОЛНИТЕЛЬНЫЕ ОПЦИИ
   ========================================================= */

.calculator__main > .calculator__section--options {
    grid-column: 1;
    grid-row: 4;

    margin: 0;
}


/* =========================================================
   ДОПОЛНИТЕЛЬНЫЕ УСЛУГИ — СПРАВА
   ========================================================= */

.calculator__main > .calculator__services {
    grid-column: 2;
    grid-row: 2 / span 3;

    display: flex;

    flex-direction: column;
    gap: 14px;

    width: 100%;

    margin: 0;
    padding: 20px 0;

    align-self: start;
}


/* =========================================================
   ИП / ЮРИДИЧЕСКОЕ ЛИЦО
   ========================================================= */

.calculator__buttons--legal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.calculator__buttons--legal .calculator__button {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: auto;
    min-width: 0;
    min-height: 18px;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    box-shadow: none;

    color: #626262;

    font-size: 20px;
    line-height: 18px;
    font-weight: 400;

    text-align: left;

    cursor: pointer;
}


/* Кружок */

.calculator__buttons--legal .calculator__button::before {
    content: "";

    display: block;

    flex: 0 0 15px;

    width: 15px;
    height: 15px;

    margin-right: 9px;

    border: 1px solid #cfcfcf;
    border-radius: 50%;

    background: #fff;

    box-sizing: border-box;
}


/* Активный */

.calculator__buttons--legal
.calculator__button--active::before {
    border: 4px solid var(--calculator-accent, #c11760);
    background: #fff;
}


/* Hover */

.calculator__buttons--legal .calculator__button:hover,
.calculator__buttons--legal .calculator__button--active:hover {
    background: transparent;
    color: #222;
    box-shadow: none;
}


/* =========================================================
   НАЛОГОВЫЕ РЕЖИМЫ — В ОДНУ СТРОКУ
   ========================================================= */

.calculator__buttons--tax {
    display: flex;

    flex-direction: row;
    align-items: center;

    flex-wrap: nowrap;

    gap: 25px;

    width: 100%;
}

.calculator__buttons--tax .calculator__button {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: auto;
    min-width: 0;
    min-height: 18px;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    box-shadow: none;

    color: #626262;

    font-size: 20px;
    line-height: 18px;
    font-weight: 400;

    text-align: left;
    white-space: nowrap;

    cursor: pointer;
}


/* Кружок */

.calculator__buttons--tax .calculator__button::before {
    content: "";

    display: block;

    flex: 0 0 15px;

    width: 15px;
    height: 15px;

    margin-right: 9px;

    border: 1px solid #cfcfcf;
    border-radius: 50%;

    background: #fff;

    box-sizing: border-box;
}


/* Активный */

.calculator__buttons--tax
.calculator__button--active::before {
    border: 4px solid var(--calculator-accent, #c11760);
    background: #fff;
}


/* Убираем переносы */

.calculator__buttons--tax .calculator__button br {
    display: none;
}


/* Патент */

.calculator__buttons--tax
.calculator__button--patent {
    flex-direction: row;
    gap: 0;
}

.calculator__buttons--tax
.calculator__button--patent span {
    margin-left: 4px;

    color: #999;

    font-size: 9px;
    line-height: 18px;
}


/* Hover */

.calculator__buttons--tax .calculator__button:hover,
.calculator__buttons--tax .calculator__button--active:hover {
    background: transparent;
    color: #222;
    box-shadow: none;
}


/* =========================================================
   ЧЕКБОКС НДС
   ========================================================= */

.calculator__section:nth-child(2) > .calculator__checkbox {
    display: flex;
    align-items: center;
    margin-top: 25px;
    gap: 9px;
}


/* =========================================================
   ЧЕКБОКСЫ
   ========================================================= */

.calculator__checkbox {
    position: relative;

    display: flex;
    align-items: flex-start;

    gap: 9px;

    cursor: pointer;
}


/* Настоящий checkbox */

.calculator__checkbox-input {
    position: absolute;

    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;    
    margin: 0;
    padding: 0;

    opacity: 0;

    cursor: pointer;

    z-index: 2;
}


/* Визуальный квадратик */

.calculator__checkbox-mark {
    position: relative;

    flex: 0 0 15px;

    width: 15px;
    height: 15px;

    margin-top: 1px;

    border: 1px solid #d0d0d0;
    border-radius: 2px;

    background: #fff;

    box-sizing: border-box;

    pointer-events: none;
}


/* Галочка */

.calculator__checkbox-input:checked + .calculator__checkbox-mark {
    background: #c11760;
    border-color: #c11760;
}

.calculator__checkbox-input:checked + .calculator__checkbox-mark::after {
    content: "";

    position: absolute;

    left: 4px;
    top: 1px;

    width: 4px;
    height: 7px;

    border: solid #fff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}


/* Текст */

.calculator__checkbox-text {
    color: #626262;
    font-size: 15px;
    line-height: 0;
    font-weight: 400;
}


/* Заблокированный checkbox */

.calculator__checkbox.is-disabled {
    opacity: .45;
    cursor: default;
}

.calculator__checkbox.is-disabled .calculator__checkbox-input {
    cursor: default;
}


/* =========================================================
   ДОПОЛНИТЕЛЬНЫЕ УСЛУГИ
   ========================================================= */

.calculator__services .calculator__checkbox {
    display: flex;

    align-items: center;

    width: 100%;

    gap: 9px;

    margin: 0;
}

.calculator__services .calculator__checkbox-text {
    color: #626262;
    font-size: 16px;
    line-height: 20px;
}


/* =========================================================
   RANGE
   ========================================================= */

.calculator__range {
    width: 100%;
}


/* =========================================================
   ЗНАЧЕНИЕ RANGE — ПО ЦЕНТРУ
   ========================================================= */

.calculator__range-output {
    display: flex;

    justify-content: center;
    align-items: center;

    width: 100%;

    margin-bottom: 10px;
}

.calculator__range-output span {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 54px;
    min-width: 54px;
    height: 28px;

    border: 1px solid #ddd;
    border-radius: 15px;

    background: #fff;

    box-shadow: none;

    color: #333;

    font-size: 12px;
}


/* =========================================================
   SLIDER
   ========================================================= */

.calculator__range-wrapper {
    position: relative;

    width: 100%;
}

.calculator__range-slider {
    height: 4px;

    border: 0;
    border-radius: 5px;

    background: #e8e8e8;
}

.calculator .calculator__range-slider .ui-slider-range {
    height: 4px;

    border-radius: 5px;

    background: #c11760;
}


/* Ползунок */

.calculator .calculator__range-slider .ui-slider-handle {
    top: -6px;

    width: 16px;
    height: 16px;

    margin-left: -7px;

    border: 2px solid #fff;
    border-radius: 50%;

    background: #c11760;

    box-shadow: 0 1px 5px rgba(0, 0, 0, .18);

    cursor: pointer;
}


/* =========================================================
   ПОДПИСИ RANGE
   ========================================================= */

.calculator__range-values {
    position: relative;
    width: 100%;
    height: 18px;
    margin-top: 12px;
    color: #777;
}

.calculator__range-values span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);

    display: block;

    font-size: 11px;
    line-height: 1;

    white-space: nowrap;
}

.calculator__range-values span::before {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 100%;

    width: 1px;
    height: 5px;

    margin-bottom: 3px;

    background: #cfcfcf;
}

/* =========================================================
   ДОПОЛНИТЕЛЬНЫЕ ОПЕРАЦИИ
   ========================================================= */

.calculator__range-result {
    display: flex;

    align-items: center;

    margin-top: 13px;

    color: #777;
}


/* Счётчик */

.calculator__operations-counter {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 82px;
    height: 28px;

    margin-right: 10px;

    border: 1px solid #ddd;
    border-radius: 15px;

    background: #fff;

    box-sizing: border-box;
}


/* + / − */

.calculator__operations-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;

    color: #777;

    font-size: 17px;
    line-height: 1;
    font-weight: 400;

    box-shadow: none;

    cursor: pointer;
}

.calculator__operations-button:hover {
    background: transparent;
    color: #333;
}

.calculator__operations-button:disabled {
    opacity: .45;
    cursor: default;
}


/* Значение */

.calculator__operations-extra-value {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 24px;

    color: #333;

    font-size: 11px;
    line-height: 1;
}


/* Текст */

.calculator__range-result > span {
    color: #777;

    font-size: 10px;
    line-height: 1.3;
}


/* =========================================================
   ДОПОЛНИТЕЛЬНЫЕ ОПЦИИ
   ========================================================= */

.calculator__option {
    margin: 0 0 25px;
}

.calculator__option:last-child {
    margin-bottom: 0;
}

.calculator__option-title {
    margin: 0 0 10px;

    color: #333;

    font-size: 17px;
    line-height: 1.3;
    font-weight: 400;

    text-align: left;
}


/* =========================================================
   ИТОГОВАЯ СТОИМОСТЬ
   ========================================================= */

.calculator__aside {
    grid-column: 1 / span 2;
    grid-row: 5;

    position: static;

    width: 100%;
    max-width: 410px;

    margin: 32px 0 0;
}

.calculator__price {
    width: 100%;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;

    box-shadow: none;

    text-align: left;
}

.calculator__price-title {
    margin: 0 0 15px;
    font-size: 20px;
    line-height: 1.35;
    text-transform: none;
}

.calculator__price-value {
    margin: 0;

    color: #222;

    font-size: 24px;
    line-height: 1.2;
    font-weight: 500;
}

.calculator__price-link {
    display: inline-flex;
    align-items: center;

    margin-top: 7px;

    color: #777;

    font-size: 10px;
}

.calculator__price-link span {
    display: inline-flex;
color: #ae3959;
    align-items: center;
    justify-content: center;

    width: 14px;
    height: 14px;

    margin-right: 5px;

    border: 1px solid #ae3959;
    border-radius: 50%;

    font-size: 9px;
}


/* Кнопка */

.calculator__submit {
    display: block;
    width: 210px;
    margin-top: 14px;
    padding: 15px 25px;
    border: 0;
    border-radius: 22px;
    background: #c11760;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.calculator__submit::after,
button.calculator__submit:before {
    display: none;
}


/* Примечание */

.calculator__price-note {
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.35;
}


/* =========================================================
   ТЕКСТ ПОД КАЛЬКУЛЯТОРОМ
   ========================================================= */

.calc__text {
    margin-top: 35px;
}

.calc__text p {
    margin: 0 0 10px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .calculator {
        padding: 25px 20px 40px;
    }

    .calculator__content {
        display: flex;
        flex-direction: column;

        gap: 0;
    }

    .calculator__main {
        display: block;
    }

    .calculator__main > .calculator__section,
    .calculator__main > .calculator__services {
        width: 100%;

        margin-bottom: 30px;
    }

    .calculator__main > .calculator__services {
        margin-top: 0;
    }

    .calculator__aside {
        order: 10;

        width: 100%;

        margin-top: 5px;
    }


    /* Налоги */

    .calculator__buttons--tax {
        flex-wrap: wrap;

        gap: 10px 18px;
    }

    .calculator__buttons--legal,
    .calculator__buttons--tax {
        align-items: flex-start;
    }


    /* Range */

    .calculator__range-values span {
        font-size: 8px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .calculator {
        padding: 22px 15px 40px;
    }

    .calculator__title {
        font-size: 14px;
    }

    .calculator__buttons--legal .calculator__button,
    .calculator__buttons--tax .calculator__button {
        font-size: 12px;
    }

    .calculator__buttons--tax {
        gap: 9px 14px;
    }

    .calculator__price {
        max-width: 100%;
    }

    .calculator__submit {
        width: 100%;
        max-width: 210px;
    }
}



.calculator__title.calculator__title--first {
    text-align: left;
    margin: 0 0 25px;
    font-size: 20px;
}

.calculator__range-result span {
    font-size: 14px;
}

.calculator__title.calculator__title--option {
    color: #C6276E;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    margin: 25px 0;
}

.calculator__title.calculator__title--form {
    text-align: left;
    font-size: 20px;
    margin-bottom: 25px;
}

.calculator__button.calculator__button--active {
    color: #c11760;
}

.calculator__price-value {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

a.calculator__price-link {
    font-size: 16px;
}

