.overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;

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

  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.1);
  transition:
    opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
body.is-modal-open .overlay {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}
body.is-modal-open {
  overflow: hidden;
}
.modal {
  width: 100%;
  margin: 0 16px;

  box-shadow:
    0 1px 1px 0 rgba(0, 0, 0, 0.14),
    0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
  background-color: #fcfcfc;
  border-radius: 4px;

  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
}

.modal-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 100%;
  width: 24px;
  height: 24px;
  background-color: #e7e9fc;
  border-width: 1px;
  border-color: rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;

  cursor: pointer;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: #d8daf3;
}
.modal-close-btn-icon {
  width: 8px;
  height: 8px;
}
.modal-title {
  display: block;
  color: #2e2f42;
  text-align: center;
  font-size: 16px;

  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.32px;
  margin-bottom: 16px;
}
.modal-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.modal-field-title {
  color: #8e8f99;
  display: block;

  font-size: 12px;

  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.48px;
  margin-bottom: 4px;
}
.modal-wrapper-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-field-input:focus ~ .modal-wrapper-input-icon {
  color: #4d5ae5;
}
.modal-wrapper-input-icon-bigger {
  height: 24px;
}
.modal-wrapper-input {
  position: relative;
}
.modal-field-input {
  border-radius: 4px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  height: 40px;
  width: 100%;
  padding-left: 38px;
  font-size: 12px;

  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.02em;
  color: rgb(12, 12, 12);
  transition: border-color 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-field-input:focus {
  border-color: #4d5ae5;
  outline: none;
}

.comment-modal-area {
  width: 100%;
  min-height: 120px;
  border-radius: 4px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  font-size: 12px;

  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.02em;
  color: rgb(12, 12, 12);

  padding-top: 8px;
  padding-left: 16px;

  resize: none;
}
.comment-modal-area::placeholder {
  color: rgba(46, 47, 66, 0.4);
}
.comment-modal-area:focus {
  border-color: #4d5ae5;
  outline: none;
}
.modal-check-label {
  color: #8e8f99;
  padding-left: 8px;
  cursor: pointer;

  font-size: 12px;

  line-height: 1.16;
  letter-spacing: 0.04em;

  padding-bottom: 10;
}
.modal-check-privacy {
  color: #4d5ae5;

  font-family: "Roboto", sans-serif;
  line-height: 16px;
  text-decoration: underline;
}
.modal-check {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.modal-btn-submit {
  text-align: center;
  padding: 16px 32px;
  min-width: 170px;

  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;

  color: #fff;
  background-color: #4d5ae5;
  border-radius: 4px;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-btn-submit:hover {
  background-color: #424ed8;
}
.modal-submit-section {
  display: flex;
  justify-content: center;
}
.checkbox-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
}
.checkbox {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid #2e2f4266;

  cursor: pointer;
}

.checkbox:checked + .checkbox-custom-icon {
  display: block;
}

.checkbox-custom-icon {
  display: none;
  position: absolute;
  left: 0;
  top: 0;

  width: 16px;
  height: 16px;

  pointer-events: none;
}
@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    height: 584px;
  }
}

@media screen and (min-width: 1158px) {
  .modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    height: 584px;
  }

  body.is-modal-open .modal {
    transform: translate(-50%, -50%);
  }
}
