/* Попап + затемнение - анимация появления/скрытия */
.docs__form {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility .3s, opacity .3s ease;
  pointer-events: none;
}

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

.docs__form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 43, .5);
  cursor: pointer;
}

.docs__form-window {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 20px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  transform: scale(.95) translateY(10px);
  transition: transform .3s ease;
}

.docs__form.is-open .docs__form-window {
  transform: scale(1) translateY(0);
}

.docs__form-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #F5F7FB;
  color: #999;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 222;
  background-image: url(/upload/header__form-close.png);
  background-repeat: no-repeat;
  background-size: 12px 12px;
  background-position: center;
  transition: all .4s;
}

.docs__form-close:hover {
  transform: rotate(360deg);
}

.docs__form-body {
  display: flex;
  align-items: stretch;
}

.docs__form-col {
  max-width: 100%;
  width: 100%;
  padding: 30px 30px 30px 30px;
  font-family: 'Inter', sans-serif;
  min-width: 0;
  z-index: 2;
}

.docs__form-title {
  margin: 0 0 14px;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 110%;
  color: #064A69;
  max-width: 85%;
}

.docs__form-subtitle {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 130%;
  font-weight: 400;
  color: #2B2B2B;
}

/* honeypot - скрыт от людей, но остаётся в разметке для ботов */
.docs__form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.docs__form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.docs__form-input-box {
  position: relative;
  flex: 1 1 50%;
  border-radius: 8px;
  border: 1px solid #064A6966;
  background: #F5F7FB;
  height: 52px;
  transition: border-color .2s ease;
}

/* Стили для фокуса на полях */
.docs__form-input:focus,
.docs__form-textarea:focus {
  border: 1px solid #064A69;
  border-radius: 8px;
}

/* Для input-box при фокусе внутри */
.docs__form-input-box:focus-within {
  border: 1px solid #064A69;
  border-radius: 8px;
  background: #F5F7FB;
}

/* Для textarea отдельно, так как она в input-box */
.docs__form-input-box--full:focus-within {
  border: 1px solid #064A69;
  border-radius: 8px;
}

.docs__form-input-box--full .docs__form-textarea:focus {
  border: none;
  border-radius: 0;
}

.docs__form-input-box--full:focus-within .docs__form-textarea {
  border: none;
  border-radius: 0;
}

/* Стили для textarea - такая же высота как у полей ввода */
.docs__form-textarea {
  resize: vertical;
  height: 52px;
  padding: 14px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #2B2B2B;
  border: none;
  background: none;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.4;
  border-radius: 8px;
  transition: border-color .2s ease;
}

.docs__form-input-box--full {
  flex: 1 1 100%;
  height: auto;
  height: 52px;
}

.docs__form-input-box--full .docs__form-textarea {
  height: 52px;
}
.docs__form-row .docs__form-input-box--full .docs__form-textarea:focus {
	border: 1px solid #064A69;
    outline: none;
    border-radius: 8px;
}

.docs__form-input {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  padding: 14px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #2B2B2B;
  box-sizing: border-box;
  border-radius: 8px;
	height: 52px;
}

.docs__form-input::placeholder {
  color: #2B2B2BB2;
}

.docs__form-textarea::placeholder {
  color: #2B2B2BB2;
}

/* Убираем скролл, если текста мало */
.docs__form-textarea::-webkit-scrollbar {
  width: 6px;
}

.docs__form-textarea::-webkit-scrollbar-track {
  background: transparent;
}

.docs__form-textarea::-webkit-scrollbar-thumb {
  background: #064A69;
  border-radius: 10px;
}

/* Незаполненное обязательное поле при попытке отправки */
.docs__form-input-box.is-invalid {
  border-color: #FF5A5A;
}

/* Кастомный чекбокс согласия */
.docs__form-agreement {
  display: flex;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 20px;
}

.docs__form-agreement input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.docs__form-agreement-box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  border: 1.5px solid #C7D0DC;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}

.docs__form-agreement-check {
  opacity: 0;
  transition: opacity .15s;
}

.docs__form-agreement input:checked+.docs__form-agreement-box {
  background: #77B94C;
  border-color: #77B94C;
}

.docs__form-agreement input:checked+.docs__form-agreement-box .docs__form-agreement-check {
  opacity: 1;
}

.docs__form-agreement.is-invalid .docs__form-agreement-box {
  border-color: #FF5A5A;
}

.docs__form-agreement-text {
  font-size: 14px;
  line-height: 100%;
  color: #2B2B2B;
}

.docs__form-agreement-text a {
  ccolor: #2B2B2B;
	text-decoration: underline;
}

.docs__form-submit {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #77B94C;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background .3s;
	max-width: 325px;
	height: 47px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.docs__form-submit:hover {
  background: #539528;
}

/* Стили для ряда с чекбоксом и кнопкой */
.docs__form-row--agree {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
}

@media screen and (max-width: 768px) {
  .docs__form-body {
    flex-direction: column;
  }

  .docs__form-row {
    flex-direction: column;
  }
  
  .docs__form-photo {
    display: none;
  }
  
  .docs__form-col {
    max-width: 100%;
    padding: 20px;
  }
  
  .docs__form-title {
    font-size: 22px;
  }
}

@media screen and (max-width: 550px) {
  .docs__form-title {
    font-size: 18px;
  }
  
  .docs__form-subtitle {
    font-size: 14px;
  }
  
  .docs__form-window {
    margin: 10px;
  }
  
  .docs__form-col {
    padding: 16px;
  }
}