.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  padding: 72px 16px 24px 16px;
  position: absolute;
  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: #fcfcfc;
  border-radius: 4px;
  width: 288px;
  min-height: 623px;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  overflow-y: auto;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn {
  border-radius: 50%;
  padding: 0;
  width: 24px;
  height: 24px;
  background-color: #e7e9fc;
  color: #2e2f42;
  stroke-width: 1px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 24px;
  right: 24px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: #404bbf;
  border: none;
}

.modal-close-btn-icon {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn:hover .modal-close-btn-icon,
.modal-close-btn:focus .modal-close-btn-icon {
  fill: #fff;
}

.modal-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}
.modal-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
  display: block;
}

.modal-field {
  margin-bottom: 8px;
}

.modal-input-wrap {
  position: relative;
}

.modal-input {
  background-color: transparent;
  border: 1px solid rgba(46, 47, 66, 0.4);
  outline: transparent;
  border-radius: 4px;
  width: 256px;
  height: 40px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: text;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 16px 8px 38px;
}

.modal-input:hover,
.modal-input:focus {
  border: 1px solid #4d5ae5;
}

.modal-input:hover + .input-icon,
.modal-input:focus + .input-icon {
  fill: #4d5ae5;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  fill: #2e2f42;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.user-comment-text {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  width: 256px;
  height: 138px;
  resize: none;
  width: 100%;
  resize: none;
  padding: 8px 16px;
  outline: transparent;
  background-color: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.user-comment-text::placeholder {
  color: rgba(46, 47, 66, 0.4);
}

.user-comment-text:hover,
.user-comment-text:focus {
  border-color: #4d5ae5;
}
.modal-field-comment {
  margin-bottom: 16px;
}

.checkbox {
  margin-bottom: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.label-checkbox {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: flex;
  align-items: center;
}

.label-checkbox-span {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  fill: transparent;
  flex-shrink: 0;
}

.checkbox-privacy:checked + .label-checkbox .label-checkbox-span {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}
.checkbox-icon {
  fill: #f4f4fd;
}

.checkbox-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.close-btn {
  font-family: 'Roboto', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 auto;
  display: block;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover,
.close-btn:focus {
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #404bbf;
}

@media screen and (min-width: 768px) {
  .modal {
    padding: 72px 24px 24px 24px;
    width: 408px;
    min-height: 584px;
  }

  .modal-input {
    width: 360px;
  }
  .user-comment-text {
    width: 360px;
    height: 120px;
  }
}

@media screen and (min-width: 1158px) {
}
