.form-max-width{
    max-width: 864px;
    text-align: left;
}

.calculator-block{
    background: var(--white);
    padding: clamp(2rem,3vw,3rem);
    border-radius: 20px;
    text-align: start;
}

.calc-block-horizontal-flex{
    display: flex;
    justify-content: space-between;
    gap: clamp(2rem,3vw,3rem);
    align-items: start;
    flex-direction: row;
}

.calc-block-vertical-flex{
    display: flex;
    justify-content: space-between;
    gap: clamp(1.5rem,2vw,2rem);
    align-items: start;
    flex-direction: column;

    .calc-block-form-button{
        padding: 0;
        flex: 0 0 fit-content;
        width: 100%;
    }
}

.calc-block--descblock{
    flex: 0 0 348px;
}

.calc-block-formwrapper{
    width: 100%;
}

.calc-block-form {
    width: 100%;
    display: flex;
    gap: clamp(20px, 2vw, 24px);
    align-items: start;
}

.calc-block--title{
    font-weight: 600;
    font-size: clamp(18px, 2vw, 20px);
    line-height: clamp(28px, 2vw, 30px);
    color: var(--heading-color);
}

.calc-block--description{
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: var(--text-color);
}

.calc-block-form .calc-block-form-fields{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    width: 100%;
}

.calc-block-form .calc-block-form-fields.col-3{
    grid-template-columns: repeat(6, 1fr);
    gap: 16px 20px;
}

.calc-block-form .calc-block-form-fields.col-3 .field-text{
    grid-column-end: span 3;
}

.calc-block-form .calc-block-form-fields.col-3 .field-select{
    grid-column-end: span 3;
}

.calc-block-form .calc-block-form-fields.col-3 .field-number{
    grid-column-end: span 2;
}

.calc-block-form .calc-block-form-fields.col-3 .field-label{
    grid-column-end: span 6;
}


.field-checkbox{
    grid-column-end: span 2;
}

.calc-block-form-fields .calc-block-form-field.field-checkbox:nth-child(3) {
    margin-top: 8px;
}


.calc-block-form-button{
    padding: 23px 0;
    flex: 0 0 160px;
}

.calc-block-form-button button{
    width: 100%;
}

.calc__number-container{
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    color: var(--text-color);
}

.calc-form-input{
  --border-radius: 8px;
  margin-top: 4px;
  padding: 0.75rem 1.25rem;
  background-color: var(--main-bg-color);
  display: block;
  width: 100%;
  border: 1px solid var(--divider-color);
  border-radius: var(--border-radius);
  font-weight: 400;
  font-size: 1rem;
  line-height: 147%;
  transition: all 0.25s ease-in-out;
  color: var(--heading-color);
}

.calc-form-input[type='text']{
    padding: 0.75rem 1rem;
}

.calc__select-container{
    position: relative;
    display: inline-block;
    width: 100%;
}

.calc-form-input[type='select']{
    padding: 0.75rem 1rem;
    appearance: none;
    -webkit-appearance: none;
}

.calc__select-container::after{
    content: '';
    position: absolute;
    right: 22px;       /* позиция по горизонтали */
    top: 55%;
    transform: translateY(-50%) rotate(0deg);
    pointer-events: none;
    background: url("/local/templates/asprocloud_v2/images/svg/arrow_select.svg") 0px 0px no-repeat;
    width: 16px;
    height: 16px;
}


.calc-form-input.active{
    background: var(--white);
}

.calc-block-form-field-label._error .calc-form-input{
    border: 1px solid var(--brand-red);
}


.calc-block-form-field-label._error .calc__number-container::before,
.calc-block-form-field-label._error .calc__number-container::after{
    border-color: var(--brand-red);
}

.calc-block-form-field-label._error{
    color: var(--brand-red);
}
.calc-block-form-field-label._error::after{
  content: attr(data-error);
  position: relative;
  bottom: -2px;
  left: 0;
  color: var(--brand-red);
  line-height: 123%;
  font-size: 0.8125rem;
}

.calc-block-form-field-label{
    font-family: Inter;
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    color: var(--heading-color);
    white-space: nowrap;
    width: fit-content;
}



input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield; /* Для Firefox */
  appearance: textfield;
  text-align: center;
}

.calc__number-container{
    position: relative;
}

.calc__number-container::before,
.calc__number-container::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 400;
  font-size: 24px;
  line-height: 16px;
  color: #969aa5;
  background: var(--main-bg-color);
}

.calc-block-form .calc-block-form-fields.col-3{
    .calc__number-container::before,
    .calc__number-container::after {
        height: calc(48px - 1.5px);
    }
}

/* Кнопка минуса (слева) */
.calc__number-container::before {
  content: '−'; /* Минус */
  z-index: 2;
  border-left: 1px solid;
  border-color: var(--divider-color);
  border-radius: 8px 0 0 8px;
}

/* Кнопка плюса (справа) */
.calc__number-container::after {
  content: '+'; /* Плюс */
  z-index: 2;
  right: 0;
  border-right: 1px solid;
  border-color: var(--divider-color);
  border-radius: 0 8px 8px 0;
}

/* Эффекты при наведении */

.calc__number-container.hover--number-down:hover::before,
.calc__number-container.hover--number-up:hover::after{
    background: #f1f2f7;
    color: var(--brand-blue);
}

.calc__number-container input{
    transition: all 0.25s ease-in-out;
}

.calc__number-container.hover--number-up:hover input,
.calc__number-container.hover--number-down:hover input
{
    background: var(--white);
}

.calc__number-container.hover--number-down:hover::after,
.calc__number-container.hover--number-up:hover::before{
    background: var(--white);
    color:#969aa5;
}

.calc__checkbox-container{
    display: flex;
    gap: 8px;
    cursor: pointer;
}

.calc-form-input-checkbox{
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid var(--divider-color);
    cursor: pointer;
    text-align: center;
    flex: 0 0 20px;
    position: relative;
}


.calc-form-input-checkbox:hover {
  background: #F5F7FC;
  border-color: #D8DCE6;
}

.calc-form-input-checkbox.active--dot {
  border: 1px solid var(--brand-blue);
  background: var(--brand-blue);
}

.calc-form-input-checkbox.active--dot:hover {
  background: var(--brand-blue-hover);
}

.calc-form-input-checkbox.active--dot::before {
  content: "";
  position: relative;
  display: block;
  top: 30%;
  left: 20%;
  width: 12px;
  height: 8px;
  background: url("/local/templates/asprocloud_v2/images/svg/check.svg") 0px 0px no-repeat;
}




/* RESULT CALC */

.calc-block-form-result-inner-group{
    width: 100%;
}

.calc-block-form-result-inner-group-line{
    display: flex;
    gap: 6px;
    width: 100%;
    justify-content: space-between;
    align-items: end;

    .tarriff-title{
        font-weight: 400;
        font-size: 13px;
        line-height: 20px;
        color: var(--heading-color);
        white-space: nowrap;
    }
    .tarriff-title.big{
        font-weight: 600;
        font-size: clamp(16px, 2vw ,18px);
        line-height: clamp(26px, 2vw ,28px);
        color: var(--heading-color);
        white-space: nowrap;
    }

    .line{
        height: 1px;
        width: 100%;
        background: #E6E9F2;
        margin-bottom: 8px;
    }

    .price--result{
        font-weight: 600;
        font-size: clamp(13px, 2vw, 14px);
        line-height: clamp(20px, 2vw, 22px);
        color: var(--heading-color);
        white-space: nowrap;
    }

    .price--result.big{
        font-weight: 600;
        font-size: clamp(14px, 2vw, 15px);
        line-height: clamp(22px, 2vw, 24px);
        color: var(--heading-color);
        white-space: nowrap;
    }
}


.calc-block-form-result-inner{
    padding: clamp(1.5rem, 2vw, 2rem);
    background: #F5F7FC;
    border-radius: 12px;
    display: flex;
    gap: clamp(20px, 2vw, 24px);
    flex-direction: column;
    align-items: end;
}

.calc-block-form-result-inner.no-gap{
    gap: 0;
}

.calc-block-form-result-inner-result{
    text-align: end;
}

.calc-block-form-result-inner-result-total{
    font-weight: 600;
    font-size: clamp(16px,2vw,18px);
    line-height: 28px;
    color: var(--heading-color);
    white-space: nowrap;
}

.calc-block-form-result-inner-result-period{
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    color: #767682;
}


.calc-block-slogan{
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    color: var(--heading-color);
}

.calc-block-slogan-block{
    text-align: center;
}

.dotted-border-bottom-black{
    border-bottom: 1px dotted #333338;
}

.fit-content{
    max-width: fit-content;
}

.tooltip-text {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 0.5rem;
    flex-wrap: wrap;
    background-color: #333338;
    color: white;
    text-align: center;
    font-size: 13px;
    line-height: 20px;
    padding: 12px;
    border-radius: 8px;
    left: 52%;
    transform: translateX(-50%);
    bottom: calc(100% + 10px);
    z-index: 4;
    width: 200px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: break-word;  
}

.tooltip-text::before {
  content: "";
  width: 8px;
  margin-top: -4px;
  margin-left: -4px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: rotate(45deg);
  background-color: inherit;
  display: block;
  height: 8px;
}

.dotted_span{
    position: relative;
    border-bottom: 1px dotted #333338
}

.calc__label-container{
    font-weight: 600;
    font-size: 16px;
    line-height: 26px;
    color: #333338;
    margin: 12px 0 4px 0;
}

.calc--grey{
    background: #E6E9F2;
    border-radius: 20px;
}

.calculator-result{
    padding: clamp(32px,3vw,40px) clamp(32px,3vw,48px);
    background: #E6E9F2;
    border-radius: 0 0 16px 16px;
}

.calculator-result{
    font-weight: 600;
    font-size: clamp(18px,2vw,20px);
    line-height: clamp(28px,2vw,20px);
    color: #333338;
    display: flex;
    justify-content: space-between;
    gap: clamp(0.75rem, 2vw, 1rem);
    span{
        color: #969AA5;
    }
}

@media (max-width: 1145px) {
    .calc-block--descblock{
        flex: 0 0 234px;
    }
}

@media (max-width: 991px) {
    .calc-block-horizontal-flex{
        flex-direction: column;
    }

    .calc-block--descblock{
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .calc-block-form{
        flex-direction: column;
    }

    .calc-block-form-button{
        flex: 0 0 100%;
        padding: 0;
        width: 100%;
    }

    .calc-block-form-result-inner-group-line .line{
        margin-bottom: 6px;
    }
}

@media (max-width: 575px) {
    .calc-block-form-field{
        grid-column-end: span 2;
    }
    .calc-block-form-result-inner{
        align-items: start;
    }
    .calc-block-form-result-inner-group-line{
        flex-direction: column;
        gap: 2px;
        align-items: start;
    }

    .calc-block-form-result-inner.no-gap .calc-block-form-result-inner-group-line {
        gap: 20px;
    }
    .calc-block-form-result-inner-group-line .line{
        display: none;
    }
    .calc-block-form-result-inner-result{
        text-align: start;
    }

    .calc-block-form .calc-block-form-fields.col-3 .field-text{
        grid-column-end: span 6;
    }

    .calc-block-form .calc-block-form-fields.col-3 .field-select{
        grid-column-end: span 6;
    }

    .calc-block-form .calc-block-form-fields.col-3 .field-number{
        grid-column-end: span 6;
    }

    .calc-block-form .calc-block-form-fields.col-3 .field-label{
        grid-column-end: span 6;
    }

    .calculator-result{
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    .calc-block-form-result-inner-group-line{
        .tarriff-title{
            white-space: normal;
        }
    }
    .calc-block-form-field-label{
        white-space: normal;
    }
}
