/* ============================================================
   Окна-формы «Записаться на встречу» и «Обратный звонок»
   Разметку выводит NetCat (инфоблоки 3399 и 3671 — те же, что
   у старого сайта), поэтому классы старые: .popup, .popup-container,
   .grey-btn… Оформление повторяет окна на my-suit.ru один в один:
   значения сняты с main.optimize.min.css старого сайта.

   Отличие одно — шрифты. На старом сайте каждое начертание было
   отдельным семейством (AlethiaPro-ExtraLight, GothamPro-Light),
   здесь это веса одного семейства.
   ============================================================ */

/* у страницы нет светлого начертания GothamPro — нужно тексту окна
   и согласию; файл тот же, что на старом сайте */
@font-face {
  font-family: "GothamPro";
  src: url("../fonts/GothamPro-Light.woff2") format("woff2"),
       url("../fonts/GothamPro-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}

.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background-color: rgba(0, 0, 0, .58);
  visibility: hidden;
  opacity: 0;
  transition: .2s;
}
.popup.show { visibility: visible; opacity: 1; }

/* пока окно открыто, страница под ним не прокручивается */
body.is-popup-open { overflow: hidden; }

.popup-container {
  position: relative;
  width: calc(100% - 20px);
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.15;
  text-align: center;
}

.popup__title {
  position: relative;
  padding-bottom: 25px;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 38px;
  line-height: 1.15;
  text-transform: uppercase;
}
.popup__title::after {
  content: "";
  position: absolute;
  bottom: 0; left: calc(50% - 57px);
  width: 114px; height: 3px;
  background: linear-gradient(135deg, #a8725a 0%, #d29979 100%);
}

.popup__text p {
  margin: 18px 0;
  font-family: var(--font-text);
  font-weight: 300;
  font-size: 18px;
  line-height: 32px;
}


/* ---------------------------- форма ---------------------------- */

.popup form { margin-top: 20px; }

.popup form .row {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.popup form input[type="text"],
.popup form input[type="tel"],
.popup form input[type="email"] {
  width: 250px;
  margin: 0 0 30px;
  padding: 15px;
  border: 0;
  border-bottom: 1px solid #aaa;
  border-radius: 0;
  background: none;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 23px;
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
  outline: none;
}
.popup form input::placeholder { color: var(--ink); opacity: 1; transition: .2s; }
.popup form input:hover::placeholder,
.popup form input:focus::placeholder { color: rgba(39, 46, 53, .6); }

/* флажок России слева в поле телефона — как на старом сайте.
   Список стран (Россия / ОАЭ) не переносили: для ОАЭ есть свой домен */
.select_country_wrapper { position: relative; }
.select_country_current {
  position: absolute;
  top: calc(50% - 24px); left: 0;
  width: 20px; height: 20px;
}
.russia-icon {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cdefs%3E%3CclipPath id='ru'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23ru)'%3E%3Crect width='20' height='20' fill='%23fff'/%3E%3Crect y='6.7' width='20' height='6.6' fill='%230039A6'/%3E%3Crect y='13.3' width='20' height='6.7' fill='%23D52B1E'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* согласие: своя галочка терракотой вместо системного чекбокса */
.personaly_checks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.personaly_checks .privacy {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 0;
  text-align: left;
}
.personaly_checks input[type="checkbox"] {
  position: absolute;
  width: 12px; height: 12px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.personaly_checks label {
  position: relative;
  padding-left: 24px;
  font-family: var(--font-text);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(170, 170, 170, .57);
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.personaly_checks label::before {
  content: "";
  position: absolute;
  top: .15em; left: 0;
  width: 12px; height: 12px;
  border: 1px solid #a8725a;
  border-radius: 2px;
  transition: background-color .2s;
}
.personaly_checks input[type="checkbox"]:checked + label::before {
  background: #a8725a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpolygon points='1.4 3.85 0 5.19 5 10 14 1.35 12.6 0 5 7.31 1.4 3.85' fill='%23fff'/%3E%3C/svg%3E") center / 10px auto no-repeat;
}
.personaly_checks input[type="checkbox"]:focus-visible + label::before { outline: 2px solid #a8725a; outline-offset: 2px; }
.personaly_checks label a { color: #a8725a; text-decoration: none; }

/* кнопка «Отправить»: заливка градиентом, тёмный текст */
.popup .grey-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 260px;
  max-width: 260px;
  height: 80px;
  margin: 30px auto 0;
  padding: 1px 6px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to right, #a8725a 0, #d29a79 100%);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.15;
  color: #191918;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: .2s;
}
.popup .grey-btn:hover { box-shadow: 0 0 5px 0 #a8725a; }
.popup .grey-btn:disabled { opacity: .6; cursor: default; }


/* --------------------------- закрыть --------------------------- */

.popup__close {
  position: absolute;
  right: 90px; bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  cursor: pointer;
}
.popup.ajax-success .popup__close { position: static; }

.popup__close .cross {
  position: relative;
  display: block;
  width: 30px; height: 30px;
  margin: 15px 0 10px;
}
.popup__close .cross::before,
.popup__close .cross::after {
  content: "";
  position: absolute;
  left: 14px;
  width: 2px; height: 30px;
  background-color: var(--ink);
}
.popup__close .cross::before { transform: rotate(45deg); }
.popup__close .cross::after  { transform: rotate(-45deg); }


/* =========================== адаптив =========================== */

@media (max-width: 980px) {
  .popup-container { height: calc(100vh - 30px); padding: 15px 80px 20px 30px; }
  .popup-content { overflow: auto; }
  .popup form .row { flex-direction: column; align-items: center; }
  .popup__close { top: 0; right: 20px; bottom: auto; }
  .select_country_wrapper { width: 370px; }
}

@media (max-width: 660px) {
  .popup__title { font-size: 24px; }
  /* «закрыть» встаёт над формой */
  .popup-container {
    flex-direction: column-reverse;
    width: 100%;
    height: 100vh;
    padding: 15px 30px 20px;
  }
  .popup .grey-btn { width: 200px; max-width: 200px; height: auto; padding: 15px 0; }
  .popup__close { position: static; margin-bottom: 15px; }
  .popup__close .cross { margin-top: 0; }
}

@media (max-width: 480px) {
  .select_country_wrapper { width: 100%; }
}
