.calc-section {
  display: flex;
  flex-direction: column;
  gap: 1.78rem;
  padding-bottom: 3rem;
  color: #333333;
}
@media (max-width: 767px) {
  .calc-section {
    gap: 2.5rem;
  }
}
.calc-section p {
  margin: 0;
  color: inherit;
}
.calc-section button {
  font-family: inherit;
}
.calc-section__head {
  display: flex;
  flex-direction: column;
  gap: 1.11rem;
}
@media (max-width: 767px) {
  .calc-section__head {
    gap: 1.43rem;
  }
}
.calc-section__title {
  margin: 0;
  font-size: 3.22rem;
  font-weight: 900;
  line-height: 1.1;
  color: #000000;
  text-transform: uppercase;
}
@media (max-width: 767px) {
  .calc-section__title {
    font-size: 1.79rem;
    line-height: 1.2;
    color: #111111;
  }
}
.calc-section__title span {
  color: #dd0500;
}
.calc-section__description {
  font-size: 1.11rem;
  line-height: 1.4;
}
@media (max-width: 767px) {
  .calc-section__description {
    font-size: 1.07rem;
    line-height: 1.67;
  }
}
.calc-section__line {
  height: 2px;
  margin: 0;
  border: 0;
  background-color: #dd0500;
}

.calc {
  display: flex;
  flex-direction: column;
  gap: 2.22rem;
  padding: 2rem 2.22rem;
  background-color: #f2f2f2;
}
@media (max-width: 767px) {
  .calc {
    gap: 1.79rem;
    padding: 1.96rem 1.79rem;
  }
}
.calc__fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.67rem;
}
@media (max-width: 1023px) {
  .calc__fields {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .calc__fields {
    grid-template-columns: 1fr;
    gap: 1.43rem;
  }
}
.calc__field {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.calc__field--error .calc__input,
.calc__field--error .calc__select-toggle {
  border-color: #dd0500;
}
.calc__label {
  display: block;
  flex: 1 0 auto;
  margin-bottom: 0.56rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.43;
  color: #333333;
}
@media (max-width: 767px) {
  .calc__label {
    margin-bottom: 0.54rem;
    font-size: 1.07rem;
    line-height: 1.67;
  }
}
.calc__input {
  display: flex;
  align-items: center;
  height: 2.89rem;
  padding: 0 0.78rem 0 0.89rem;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  transition: border-color 0.2s;
}
@media (max-width: 767px) {
  .calc__input {
    height: 4.29rem;
    padding: 0 1.25rem 0 1.43rem;
  }
}
.calc__input:focus-within {
  border-color: #777777;
}
.calc__input input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: transparent;
  font-size: 0.89rem;
  font-weight: 500;
  color: #333333;
}
@media (max-width: 767px) {
  .calc__input input {
    font-size: 1.25rem;
  }
}
.calc__unit {
  flex: none;
  margin-left: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #777777;
}
@media (max-width: 767px) {
  .calc__unit {
    font-size: 1.25rem;
  }
}
.calc__select {
  position: relative;
}
.calc__select--open {
  z-index: 5;
}
.calc__select--open .calc__select-toggle::after {
  transform: translateY(-50%) rotate(180deg);
}
.calc__select--open .calc__select-list {
  display: block;
}
.calc__select-toggle {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 2.89rem;
  padding: 0 2.22rem 0 0.89rem;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  text-align: left;
  transition: border-color 0.2s;
}
@media (max-width: 767px) {
  .calc__select-toggle {
    height: 4.29rem;
    padding: 0 3.5rem 0 1.43rem;
  }
}
.calc__select-toggle::after {
  position: absolute;
  top: 50%;
  right: 0.78rem;
  width: 0.89rem;
  height: 0.89rem;
  content: '';
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 13.2857L2 4.71428L14 4.71428L8 13.2857Z' fill='%23777777'/%3E%3C/svg%3E")
    center/contain no-repeat;
  transform: translateY(-50%);
  transition: transform 0.2s;
}
@media (max-width: 767px) {
  .calc__select-toggle::after {
    right: 1.25rem;
    width: 1.43rem;
    height: 1.43rem;
  }
}
.calc__select-value {
  overflow: hidden;
  font-size: 0.89rem;
  font-weight: 500;
  color: #333333;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .calc__select-value {
    font-size: 1.25rem;
  }
}
.calc__select-value--placeholder {
  color: #777777;
}
.calc__select-list {
  position: absolute;
  top: calc(100% + 0.22rem);
  left: 0;
  right: 0;
  display: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  list-style: none;
}
.calc__select-option {
  display: flex;
  align-items: center;
  height: 2.67rem;
  padding: 0 0.89rem;
  font-size: 0.89rem;
  font-weight: 500;
  color: #333333;
  cursor: pointer;
  transition: background-color 0.2s;
}
@media (max-width: 767px) {
  .calc__select-option {
    height: 4.29rem;
    padding: 0 1.43rem;
    font-size: 1.25rem;
  }
}
.calc__select-option + .calc__select-option {
  border-top: 1px solid #e0e0e0;
}
.calc__select-option:hover,
.calc__select-option--selected {
  background-color: #f2f2f2;
}
.calc__error {
  position: absolute;
  top: calc(100% + 0.33rem);
  left: 0;
  font-size: 0.67rem;
  line-height: 1.3;
  color: #dd0500;
}
@media (max-width: 767px) {
  .calc__error {
    position: static;
    margin-top: 0.45rem;
    font-size: 1.07rem;
  }
}
.calc__error:empty {
  display: none;
}
.calc__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
@media (max-width: 767px) {
  .calc__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1.79rem;
  }
}
.calc__button {
  flex: none;
  width: 14.44rem;
  height: 3.11rem;
  background-color: #dd0500;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}
@media (max-width: 767px) {
  .calc__button {
    width: 100%;
    height: 5rem;
    font-size: 1.25rem;
  }
}
.calc__button:hover {
  background-color: #b80400;
}
.calc__info {
  font-size: 0.89rem;
  line-height: 1.4;
  color: #333333;
  text-align: right;
}
@media (max-width: 767px) {
  .calc__info {
    font-size: 1.07rem;
    text-align: left;
  }
}
.calc__result {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.33rem;
}
@media (max-width: 767px) {
  .calc__result {
    align-items: flex-start;
    gap: 0.71rem;
  }
}
.calc__result-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0 0.6rem;
}
@media (max-width: 767px) {
  .calc__result-line {
    justify-content: flex-start;
    gap: 0 0.54rem;
  }
}
.calc__result-text {
  font-size: 0.89rem;
  font-weight: 600;
  color: #222222;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .calc__result-text {
    font-size: 1.16rem;
  }
}
.calc__result-value {
  font-size: 1.56rem;
  font-weight: 700;
  line-height: 1.14;
  color: #dd0500;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .calc__result-value {
    font-size: 1.96rem;
    line-height: 1.18;
  }
}
.calc--done .calc__info {
  display: none;
}
.calc--done .calc__result {
  display: flex;
}

.calc-info__title {
  margin: 0 0 0.89rem;
  font-size: 1.67rem;
  font-weight: 900;
  line-height: 1.2;
  color: #000000;
  text-transform: uppercase;
}
@media (max-width: 767px) {
  .calc-info__title {
    margin-bottom: 1.43rem;
    font-size: 1.79rem;
    color: #111111;
  }
}
.calc-info__wrap {
  display: flex;
  align-items: stretch;
  gap: 1.78rem;
}
@media (max-width: 767px) {
  .calc-info__wrap {
    flex-direction: column;
    gap: 1.43rem;
  }
}
.calc-info__panel {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.67rem;
  padding: 1.8rem 2rem;
  background-color: #f2f2f2;
}
@media (max-width: 767px) {
  .calc-info__panel {
    gap: 0.36rem;
    padding: 1.07rem 1.79rem 1.79rem;
  }
}
.calc-info__formula {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.89rem;
  font-size: 1.33rem;
  line-height: 1.2;
}
@media (max-width: 767px) {
  .calc-info__formula {
    gap: 0.71rem;
    font-size: 1.76rem;
  }
}
.calc-info__formula-label {
  font-weight: 800;
  color: #333333;
  text-transform: uppercase;
}
.calc-info__formula-value {
  font-weight: 700;
  color: #dd0500;
  white-space: nowrap;
}
.calc-info__legend {
  display: flex;
  flex-direction: column;
  gap: 0.67rem;
  font-size: 0.89rem;
  line-height: 1.5;
}
@media (max-width: 767px) {
  .calc-info__legend {
    gap: 0.36rem;
    font-size: 1.07rem;
    line-height: 1.67;
  }
}
.calc-info__legend b {
  font-weight: 700;
}
.calc-info__table {
  flex: none;
  width: 37.74%;
  border: 1px solid #e0e0e0;
  border-collapse: collapse;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.3;
}
@media (max-width: 767px) {
  .calc-info__table {
    width: 100%;
  }
}
.calc-info__table th,
.calc-info__table td {
  padding: 0 0.89rem;
  text-align: left;
}
@media (max-width: 767px) {
  .calc-info__table th,
  .calc-info__table td {
    padding: 0 1.25rem;
  }
}
.calc-info__table th:first-child,
.calc-info__table td:first-child {
  width: 61%;
}
@media (max-width: 767px) {
  .calc-info__table th:first-child,
  .calc-info__table td:first-child {
    width: 76%;
  }
}
.calc-info__table th {
  height: 2.78rem;
  background-color: #f2f2f2;
  font-size: 0.89rem;
  font-weight: 700;
}
@media (max-width: 767px) {
  .calc-info__table th {
    height: 4.1rem;
    font-size: 1.25rem;
  }
}
.calc-info__table td {
  height: 2.94rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.83rem;
  font-weight: 600;
}
@media (max-width: 767px) {
  .calc-info__table td {
    height: 4.64rem;
    font-size: 1.25rem;
  }
}
.calc-info__table td:first-child {
  font-weight: 500;
}

.calc-classes {
  padding: 2rem 2rem;
  background-color: #f2f2f2;
}
@media (max-width: 767px) {
  .calc-classes {
    padding: 1.96rem 0;
    background-color: #ffffff;
  }
}
.calc-classes__title {
  margin: 0;
  padding-right: 2.5rem;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: #000000;
  text-transform: uppercase;
}
@media (max-width: 767px) {
  .calc-classes__title {
    font-size: 1.61rem;
    line-height: 1.22;
    color: #111111;
  }
}
.calc-classes__title span {
  color: #dd0500;
}
.calc-classes__title::after {
  width: 0.97em;
  background-size: 0.97em;
}
@media (max-width: 767px) {
  .calc-classes__title::after {
    width: 1.22em;
    background-size: 1.22em;
  }
}
.calc-classes__row {
  display: grid;
  grid-template-columns: 24% 1fr 24%;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1rem;
  line-height: 1.5;
  color: #000000;
}
@media (max-width: 767px) {
  .calc-classes__row {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'name coef' 'desc coef';
    gap: 0.45rem;
    padding: 1.16rem 0;
    border-bottom-color: #d9d9d9;
    font-size: 1.07rem;
  }
}
.calc-classes__row:last-child {
  border-bottom: 0;
}
.calc-classes__row--head {
  border-bottom-color: #dd0500;
  font-weight: 600;
}
@media (max-width: 767px) {
  .calc-classes__row--head {
    padding-top: 0;
    border-bottom-width: 2px;
    opacity: 0.75;
  }
}
.calc-classes__row--head .calc-classes__name {
  font-weight: 600;
}
@media (max-width: 767px) {
  .calc-classes__row--head .calc-classes__desc {
    display: none;
  }
}
.calc-classes__name,
.calc-classes__desc,
.calc-classes__coef {
  padding: 1rem;
}
@media (max-width: 767px) {
  .calc-classes__name,
  .calc-classes__desc,
  .calc-classes__coef {
    padding: 0;
  }
}
.calc-classes__name {
  font-weight: 500;
}
@media (max-width: 767px) {
  .calc-classes__name {
    grid-area: name;
    font-weight: 600;
    color: #222222;
  }
}
@media (max-width: 767px) {
  .calc-classes__desc {
    grid-area: desc;
    color: #333333;
  }
}
@media (max-width: 767px) {
  .calc-classes__coef {
    grid-area: coef;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
  }
}
.calc-classes__mobile {
  display: none;
}
@media (max-width: 767px) {
  .calc-classes__mobile {
    display: inline;
  }
}

.calc-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.44rem;
  font-size: 0.83rem;
  line-height: 1.47;
}
@media (max-width: 767px) {
  .calc-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 1.12rem;
    line-height: 1.44;
  }
}
.calc-footer__text {
  font-weight: 500;
  color: #777777;
}
@media (max-width: 767px) {
  .calc-footer__text {
    font-weight: 400;
  }
}
.calc-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  font-size: inherit;
  font-weight: 600;
  color: #dd0500;
  text-decoration: none;
}
.calc-footer__link::after {
  width: 0.61rem;
  height: 0.57rem;
  content: '';
  background: url('../img/link-arrow.svg') center/contain no-repeat;
}
.calc-footer__link:hover {
  color: #b80400;
}

.calc-modal {
  display: none;
  width: 1100px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  padding: 2.5rem 2.5rem 0;
  overflow: auto;
  background: #fff;
}
@media (max-width: 767px) {
  .calc-modal {
    padding: 3rem 1.25rem 0;
  }
}
.calc-modal .calc-section {
  padding-bottom: 2rem;
}

.form__car-class {
  position: relative;
}
.form__car-class .form__input {
  padding-right: 56px;
  cursor: pointer;
}
.form__car-class .form__input-car-class:hover + .form__car-class-btn::after,
.form__car-class-btn:hover::after {
  transform: translateX(3px);
}
.form__car-class-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.form__car-class-btn::after {
  width: 11px;
  height: 10px;
  content: '';
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.9624 10.3338' fill='none'%3E%3Cpath d='M5.79545 10.3338L4.69815 9.24716L7.98473 5.96058H0V4.37322H7.98473L4.69815 1.09197L5.79545 0L10.9624 5.1669L5.79545 10.3338Z' fill='%23DD0500'/%3E%3C/svg%3E")
    center/contain no-repeat;
  transition: transform 0.2s;
}

.article__main--event .calc-section .calc__fields {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 767px) {
  .article__main--event .calc-section .calc__fields {
    grid-template-columns: 1fr;
  }
}
.article__main--event .calc-section h3.calc-info__title {
  margin: 0 0 0.89rem;
  font-size: 1.67rem;
  font-weight: 900;
  line-height: 1.2;
  color: #000000;
}
@media (max-width: 767px) {
  .article__main--event .calc-section h3.calc-info__title {
    margin-bottom: 1.43rem;
    font-size: 1.79rem;
    color: #111111;
  }
}
.article__main--event .calc-section h3.calc-classes__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: #000000;
}
.article__main--event .calc-section a.calc-footer__link {
  font-weight: 600;
  color: #dd0500;
  text-decoration: none;
}
