.modal {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  left: 50%;
  top: 60%;
  transform: translate(calc(-50% + var(--scrollbar-width)*2), -50%);
  background-color: #fff;
  z-index: 100;
  color: #212121;
  transition: 0.3s ease;
}
.modal form {
  height: 100%;
}
.modal--visible {
  left: 50%;
  opacity: 1 !important;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  top: 50%;
  transition: 0.5s ease;
}
.modal--success,
.modal--error {
  width: 600px;
  min-height: 342px;
  z-index: 3333;
}
.modal--calculation {
  width: 65vw;
  min-height: 647px;
}
.modal--partners {
  width: 65vw;
  min-height: fit-content;
}
.modal--consultation {
  width: 453px;
  min-height: 500px;
  border-radius: 4px;
}
.modal__wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 52px;
}
.modal__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 140%;
  margin-bottom: 12px;
  text-align: center;
}
.modal__description {
  font-family: Montserrat;
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
  margin-bottom: 30px;
  text-align: center;
}
.modal--consultation .modal__block {
  display: grid;
  row-gap: 20px;
  width: 100%;
}
.modal--partners .modal__block, .modal--calculation .modal__block {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 20px;
  column-gap: 20px;
  margin-bottom: 20px;
}
.modal__input {
  position: relative;
  width: 100%;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  height: 60px;
}
.modal__phone-select {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);

}
.modal__phone-select-item:hover {
  background-color: #f3f3f3;
  transition: 0.5s ease;
}

.modal__phone-select-block {
  position: relative;
}
.modal__phone-select-list {
  position: absolute;
  top: 80%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: 0.5s ease;
}
.modal__phone-select-block--active .modal__phone-select-list{
  top: 100%;
  opacity: 1;
  pointer-events: auto;
  transition: 0.5s ease;
}
.modal__phone-select-item {
  padding: 10px;
  background-color: #fff;
  border-radius: 10px;
  z-index: 3;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.13);
}
.modal__phone-select-head {
  position: relative;
  display: flex;
  align-items: center;
  column-gap: 4px;
}
.modal__phone-select svg,
.modal__select svg {
  width: 8px;
  height: 5px;
}
.modal__input input {
  width: 100%;
  height: 100%;
  padding: 0 20px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
}
.modal__input--phone input {
  padding-left: 61px;
}
.modal--success .modal__wrapper,
.modal--error .modal__wrapper {
  padding-top: 67px;
  font-size: 18px;
  font-weight: 400;
  line-height: 140%;
  text-align: center;
}
.modal__close {
  position: absolute;
  width: 46px;
  height: 46px;
  background-color: #fff;
  border-radius: 50%;
  filter: drop-shadow(0px 4px 6px rgba(61, 83, 96, 0.25));
  right: 0;
  top: 0;
  transform: translate(50%, -50%);
}
.modal__close svg {
  width: 14px;
  height: 14px;
}
.modal__close-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}
.modal__sign {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}
.modal__sign--error svg {
  width: 30px;
  height: 30px;
}
.modal__sign--success svg {
  width: 38px;
  height: 29px;
}
.modal--success .modal__sign {
  border: 3px solid #6cff6c;
}
.modal--error .modal__sign {
  border: 3px solid #dc2626;
}
.modal--success .modal__title,
.modal--error .modal__title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 120%;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.modal__again {
  text-decoration: underline;
}
.modal__agree {
  padding-top: 4px;
  display: grid;
  grid-template-columns: minmax(0, max-content) 1fr;
  column-gap: 10px;
}
.modal--partners .modal__agree, .modal--calculation .modal__agree {
  margin-bottom: 40px;
}
.modal__agree input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.modal__agree-block {
  width: 15px;
  height: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 2px;
  margin-top: 2px;
  background-color: #fff;
  transition: 0.5s ease;
}
.modal__agree-block svg {
  width: 10px;
  height: 8px;
}
.modal__agree--active .modal__agree-block {
  border: 1px solid transparent;
  background-color: #212121;
  transition: 0.5s ease;
}
.modal__agree p {
  color: #111827;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
}
.modal__agree p a {
  text-decoration: underline;
}
.modal--consultation .block-button {
  padding-left: 0;
  padding-right: 0;
  width: 100%;
  margin-top: 20px;
}
.modal__textarea {
  width: 100%;
  min-height: 126px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  padding: 20px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
  color: #4b5563;
}
.modal__textarea:focus {
  outline: none;
}
.modal__select {
  position: relative;
}
.modal__select-list {
  position: absolute;
  left: 0;
  top: 90%;
  opacity: 0;
  pointer-events: none;
  transition: 0.5s ease;
  width: 100%;
  z-index: 50;
  border-radius: 4px;
  overflow: hidden;
  font-size: 14px;
  border: 1px solid #d1d5db;
}
.modal__select-item {
  background-color: #fff;
  padding: 5px;
  cursor: pointer;
  transition: 0.5s ease;
}
.modal__select-item:hover {
  background-color: #f3f3f3;
  transition: 0.5s ease;
}
.modal__select--active .modal__select-list {
  top: 100%;
  opacity: 1;
  pointer-events: auto;
  transition: 0.5s ease;
}
.modal__select-head {
  position: relative;
  padding-bottom: 14px;
}
.modal__select-head svg {
  position: absolute;
  right: 14px;
  bottom: 14px;
  transform: translateY(-100%);
}

.modal__input--select {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.modal__input-name {
  position: absolute;
  left: 20px;
  top: 7px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 400;
  line-height: 140%;
  opacity: 0.6;
}
@media (max-width: 1400px) {
  .modal--partners, .modal--calculation {
    width: 90vw;
  }
}
@media (max-width: 1199px) {
  .modal__scroll {
    height: 100%;
  }
  .modal--partners .modal__block, .modal--calculation .modal__block {
    column-gap: 10px;
    row-gap: 10px;
    margin-bottom: 10px;
  }
  .modal--partners .modal__wrapper, .modal--calculation .modal__wrapper {
    padding-left: 20px;
    padding-right: 20px;
    height: 96%;
    overflow-y: auto;
  }
  .modal.modal--partners, .modal.modal--calculation {
    min-width: unset;
    width: 100vw;
    height: 100vh;
    transform: translate(0%, 0%);
    left: 0;
    top: 0;
  }
  .modal.modal--partners .modal__close, .modal.modal--calculation .modal__close {
    transform: translate(0%, 0%);
    filter: none;
  }
}

@media (max-width: 767px) {
  .modal--partners .modal__wrapper, .modal--calculation .modal__wrapper {
    height: 83.5%;
    padding-bottom: 0;
  }
  .modal--calculation .modal__block, .modal--partners .modal__block {
    grid-template-columns: 1fr;
    row-gap: 16px;
    margin-bottom: 16px;
  }
  .modal__input {
    height: 52px;
  }
  .modal {
    min-width: unset;
    width: 100vw;
    height: 100vh;
    transform: translate(0%, 0%);
    left: 0;
    top: 0;
  }
  .modal__wrapper {
    padding: 60px 20px;
  }
  .modal__close {
    transform: translate(0%, 0%);
    filter: none;
  }
  .modal--success .modal__title,
  .modal--error .modal__title {
    font-size: 20px;
  }
  .modal--success .modal__wrapper,
  .modal--error .modal__wrapper {
    font-size: 16px;
    padding-top: 40px;
    padding-left: 20px;
    padding-right: 20px;
  }
}
.error-fields {
  border-bottom: 1px solid red;
}
.error-validation, .error-validation__calc, .error-validation__partner {
  font-size: .8em;
  text-align: center;
  color: red;
  display: none;
}
.error-validation__calc, .error-validation__partner {
  padding-bottom: 15px;
}
.active {
  display:block;
}