.main-contacts {
  --msg-inner-width: auto;
  --msg-inner-max-width: none;
  --msg-font-size: 14px;
  --msg-line-height: 18px;
  position: relative;
  background: rgba(126, 153, 223, 0.3);
}

.contacts {
  --height-k: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 17px;
}
.contacts__inner {
  padding: 20px 10px 20px;
}
.contacts__text {
  padding-top: 9px;
  margin-bottom: 15px;
  text-align: center;
}

.form {
  --body-padding: 10px;
  --input-font-size: 14px;
  --button-font-size: 14px;
  --button-padding: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
}
.form__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--body-padding);
}
.form__body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75) url(../img/icon/loading.gif) center/40px no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.form__body._sending::after {
  opacity: 1;
  pointer-events: auto;
}
.form__item {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}
.form__label {
  font-weight: 200;
  margin-bottom: 5px;
}
.form__input {
  font-size: var(--input-font-size);
  padding: 7px 10px;
  transition: all 0.15s;
}
.form__input:focus {
  box-shadow: 0 0 10px #ffffff;
}
.form__input._error {
  box-shadow: 0 0 10px red;
  background: #ffd5dd;
}
.form__rules-open {
  border-bottom: 1px dashed #cecece;
  color: #ffffff;
}
.form__button {
  font-size: var(--button-font-size);
  margin-top: 15px;
  padding: var(--button-padding);
  transition: all 0.3s;
}
.form__button:hover {
  transform: scale(1.03);
}
.form textarea {
  width: 100%;
  height: 80px;
  resize: vertical;
}

.checkbox {
  --label-line-height: 17px;
}
.checkbox__input {
  display: none;
}
.checkbox__input:checked + .checkbox__label::after {
  transform: scale(1);
}
.checkbox__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-weight: 300;
  cursor: pointer;
  line-height: var(--label-line-height);
}
.checkbox__label::before {
  content: "";
  align-self: flex-start;
  flex: 0 0 17px;
  height: 17px;
  background: #ffffff;
  margin-right: 8px;
  transform: translateY(3px);
}
.checkbox__label::after {
  content: "";
  width: 13px;
  height: 13px;
  position: absolute;
  top: 5px;
  left: 2px;
  background: #858686;
  transform: scale(0);
  transition: all 0.2s;
}

.checkbox._error .checkbox__label::before {
  box-shadow: 0 0 10px red;
}

.rules {
  --close-top: 13px;
  --close-right: 7px;
  --close-width-height: 28px;
  --close-background-size: 16px;
  --title-font-size: 15px;
  --title-margin-bottom: 15px;
  --text-margin-bottom: 10px;
  --text-font-size: 13px;
  --text-line-height: 15px;
  --close-btn-font-size: 14px;
  --close-btn-padding: 7px 15px;
  position: absolute;
  top: 0;
  left: 0;
  padding: 50px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 100%;
  background: #353535;
  color: #ffffff;
  border-bottom: 1px solid #cecece50;
  overflow-y: scroll;
  transform: translateX(120%);
  transition: all 0.3s;
}
.rules::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 5px;
}
.rules::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
.rules__close {
  display: block;
  position: absolute;
  top: var(--close-top);
  right: var(--close-right);
  width: var(--close-width-height);
  height: var(--close-width-height);
  background: url(../img/icon/close-menu.svg) center/var(--close-background-size) no-repeat;
  border: 1px solid #cecece;
  cursor: pointer;
}
.rules__title {
  font-size: var(--title-font-size);
  font-weight: 600;
  margin-bottom: var(--title-margin-bottom);
  text-align: center;
}
.rules__text {
  text-indent: 20px;
  text-align: justify;
  margin-bottom: var(--text-margin-bottom);
  font-size: var(--text-font-size);
  line-height: var(--text-line-height);
}
.rules__close-btn {
  font-size: var(--close-btn-font-size);
  padding: var(--close-btn-padding);
  border: 1px solid #cecece;
  margin-top: 15px;
  cursor: pointer;
}

.alert {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.alert__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--msg-inner-width);
  max-width: var(--msg-inner-max-width);
  padding: 0 15px;
}
.alert__close {
  display: block;
  position: absolute;
  top: 0px;
  right: 15px;
  width: 10px;
  height: 10px;
  background: #636363 url(../img/icon/close-menu.svg) center/15px no-repeat;
  padding: 12px;
  border: 1px solid #cecece;
  cursor: pointer;
}
.alert__message {
  background: #ffffff;
  box-shadow: 0 0 10px red;
  padding: 30px 15px 10px;
  font-size: var(--msg-font-size);
  line-height: var(--msg-line-height);
  text-align: center;
}

.message-result {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.message-result__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--msg-inner-width);
  max-width: var(--msg-inner-max-width);
  padding: 0 15px;
}
.message-result__close {
  display: block;
  position: absolute;
  top: 0px;
  right: 15px;
  width: 10px;
  height: 10px;
  background: #636363 url(../img/icon/close-menu.svg) center/15px no-repeat;
  padding: 12px;
  border: 1px solid #cecece;
  cursor: pointer;
}
.message-result__message {
  background: #ffffff;
  padding: 30px 15px 10px;
  font-size: var(--msg-font-size);
  line-height: var(--msg-line-height);
  text-align: center;
}
.message-result__message._succes {
  box-shadow: 0 0 10px springgreen;
}
.message-result__message._err {
  box-shadow: 0 0 10px red;
}

@media (min-width: 375px) {
  .main-contacts {
    --msg-font-size: 16px;
    --msg-line-height: 19px;
  }

  .contacts {
    font-size: 16px;
    line-height: 18px;
  }

  .form {
    --body-padding: 12px;
    --input-font-size: 16px;
    --button-font-size: 15px;
    --button-padding: 7px;
  }
  .form__button:hover {
    transform: scale(1.02);
  }

  .checkbox {
    --label-line-height: 18px;
  }

  .rules {
    --title-font-size: 16px;
    --title-margin-bottom: 20px;
    --text-margin-bottom: 15px;
    --text-font-size: 14px;
    --text-line-height: 16px;
    padding: 55px 15px 15px;
  }
}
@media (min-width: 450px) {
  .main-contacts {
    --msg-inner-width: 75%;
    --msg-font-size: 17px;
    --msg-line-height: 20px;
  }

  .contacts {
    font-size: 17px;
    line-height: 20px;
  }

  .form {
    --body-padding: 15px;
    --input-font-size: 17px;
    --button-font-size: 16px;
  }

  .checkbox {
    --label-line-height: 20px;
  }

  .rules {
    --close-top: 15px;
    --close-right: 10px;
    --title-font-size: 17px;
    --title-margin-bottom: 20px;
    --text-margin-bottom: 15px;
    --text-font-size: 15px;
    --text-line-height: 16px;
    padding: 55px 30px 20px;
  }
}
@media (min-width: 600px) {
  .main-contacts {
    --msg-font-size: 18px;
    --msg-line-height: 22px;
  }

  .contacts {
    font-size: 18px;
  }

  .form {
    --input-font-size: 18px;
  }

  .rules {
    padding: 55px 100px 20px;
  }
}
@media (min-width: 768px) {
  .main-contacts {
    --msg-inner-max-width: 620px;
    --msg-font-size: 19px;
  }

  .contacts {
    font-size: 19px;
    line-height: 22px;
  }
  .contacts .container {
    padding: 0 100px;
  }

  .form {
    --button-font-size: 17px;
  }
  .form__button:hover {
    transform: scale(1);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
  }

  .checkbox {
    --label-line-height: 22px;
  }

  .rules {
    --close-top: 20px;
    --close-right: 100px;
    --close-width-height: 30px;
    --close-background-size: 18px;
    --title-font-size: 18px;
    --title-margin-bottom: 20px;
    --text-font-size: 16px;
    --text-line-height: 18px;
    --close-btn-font-size: 16px;
    --close-btn-padding: 8px 25px;
    background: rgba(0, 0, 0, 0.9);
  }
}
@media (min-width: 1000px) {
  .main-contacts {
    --msg-font-size: 20px;
    --msg-line-height: 23px;
  }

  .contacts {
    font-size: 20px;
    line-height: 23px;
  }
  .contacts .container {
    padding: 0 150px;
  }
  .contacts__text {
    max-width: 550px;
    margin: 0 auto;
    margin-bottom: 15px;
  }
  .contacts .titles-block {
    height: 41px;
    font-size: 26px;
    margin-bottom: 0;
  }

  .form {
    --input-font-size: 19px;
    --button-font-size: 18px;
  }

  .checkbox {
    --label-line-height: 23px;
  }

  .rules {
    --close-right: 150px;
    --title-font-size: 19px;
    --title-margin-bottom: 22px;
    --text-font-size: 17px;
    --text-line-height: 20px;
    --close-btn-font-size: 17px;
    padding: 55px 150px 20px;
  }
}
@media (min-width: 1200px) {
  .contacts__text {
    margin-bottom: 5px;
  }

  .form {
    max-width: 700px;
    margin: 0 auto;
  }

  .rules {
    --close-right: 250px;
    padding: 55px 250px 20px;
  }
}
@media (min-width: 1400px) {
  .rules {
    --close-right: 400px;
    padding: 55px 400px 20px;
  }
}