/* Попап + затемнение - анимация появления/скрытия */
.header__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;
}

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

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

.header__form-window {
  position: relative;
  width: 100%;
  max-width: 940px;
  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;
}

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

.header__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;
  transition: color .2s;
  background-image: url(/upload/header__form-close.png);
  background-repeat: no-repeat;
  background-size: 12px 12px;
  background-position: center;
  transition: all .4s;
}

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

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

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

.header__form-logo {
  width: 80px;
  object-fit: contain;
  margin: 0 0 10px 0;
}

.header__form-title {
  margin: 0 0 12px;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  color: #2B2B2B;
}

.header__form-subtitle {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.3;
  color: #2B2B2B;
}

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

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

.header__form-input-box {
  position: relative;
  flex: 1 1 50%;
  border-radius: 8px;
  border: 1px solid #064A6966;
  background: #F5F7FB;
}

.header__form-input {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  padding: 14px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #2B2B2B;
}

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

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

/* Кастомный select "Город" */
.header__form-input-box--select {
  padding: 0;
  border: none;
  background: none;
}

.header__form-select {
  position: relative;
  width: 100%;
  height: 100%;
}

.header__form-select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #F5F7FB;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .2s;
}

.header__form-select.is-invalid .header__form-select-trigger {
  border-color: #FF5A5A;
}

.header__form-select-pin {
  flex: 0 0 auto;
  color: #8A93A1;
}

.header__form-select-placeholder {
  flex: 1 1 auto;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #8A93A1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__form-select-placeholder.is-selected {
  color: #2B2B2B;
}

.header__form-select-trigger::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 0;
  bottom: 0;
  margin: auto;
  background-image: url(/upload/header__form-down.png);
  background-repeat: no-repeat;
  background-size: contain;
  width: 16px;
  height: 11px;
}

.header__form-select-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(6, 25, 40, .25);
  max-height: 280px;
  overflow-y: auto;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: #064A69 transparent;
}

.header__form-select.is-open .header__form-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__form-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.header__form-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.header__form-select-dropdown::-webkit-scrollbar-thumb {
  background: #064A69;
  border-radius: 10px;
}

.header__form-select-option {
  padding: 14px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #2B2B2B;
  cursor: pointer;
  border-bottom: 1px solid #EEF1F5;
  transition: background .15s;
}

.header__form-select-option:last-child {
  border-bottom: none;
}

.header__form-select-option:hover,
.header__form-select-option.is-selected {
  background: #F5F7FB;
}

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

.header__form-icon {
  object-fit: contain;
  width: 18px;
  height: 40px;
}

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

.header__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;
}

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

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

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

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

.header__form-agreement-text {
  font-size: 13px;
  line-height: 1.3;
  color: #2B2B2B;
}

.header__form-agreement-text a {
  color: #179BD7;
}

.header__form-submit {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #77B94C;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 18px;
  cursor: pointer;
  transition: background .3s;
  margin-bottom: 24px;
}

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

.header__form-notice {
  display: flex;
  gap: 12px;
}

.header__form-notice-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #179BD7;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__form-notice-title {
  font-family: Manrope;
  font-weight: 500;
  font-size: 22px;
  color: #2B2B2B;
  margin-bottom: 8px;
  line-height: 100%;
}

.header__form-notice-desc {
  font-size: 16px;
  line-height: 130%;
  color: #2B2B2BB2;
  font-weight: 400;
}


.header__form-photo {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  right: 0;
  max-width: 700px;
    border-radius: 24px;
}

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

  .header__form-row {
    flex-direction: column;
  }
  .header__form-photo {
    display: none;
  }
  .header__form-col {
    max-width: 100%;
  }
  .header__form-title {
    max-width: 80%;
  }
}
@media screen and (max-width: 550px) {
.header__form-title {
  font-size: 18px;
}
.header__form-subtitle {
  font-size: 14px;
}
}