/* 25/10/2026: форма «Оставить заявку» (#modalOrder, CF7 №5) — вариант В с макета
   https://claude.ai/artifact/5cNmEziKQVHQtVRG4B6ehE. Тёмно-синяя карточка, мятная кнопка всегда яркая
   (CF7 acceptance_as_validation: on), выбор формата плашками, мессенджеры внизу. На телефоне (< 768 px)
   форма выезжает шторкой снизу, на ПК — окно по центру.
   Плашки и мессенджеры живут в самой форме CF7, поэтому базовый (светлый) вид ниже нужен для форм,
   встроенных в страницы (.gen-form-wrap в page.php), тёмный — только внутри #modalOrder. */

/* --- плашки формата и мессенджеры: базовый вид для светлых форм --- */
.kt-format {
  margin-bottom: 16px;
}
.kt-format__label {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: #56657a;
}
.kt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kt-chips .wpcf7-list-item {
  margin: 0;
}
.kt-chips label {
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kt-chips input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.kt-chips .wpcf7-list-item-label {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #c9d6e8;
  background: #f2f6fb;
  color: #195dac;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.kt-chips input:checked + .wpcf7-list-item-label {
  background: #4dffb4;
  border-color: #4dffb4;
  color: #07070a;
}
.kt-chips input:focus-visible + .wpcf7-list-item-label {
  outline: 2px solid #195dac;
  outline-offset: 2px;
}
.kt-alt {
  margin-top: 20px;
}
.kt-alt__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #8a97aa;
}
.kt-alt__or::before,
.kt-alt__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.kt-alt__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.kt-alt__row a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  background: #eef3fa;
  color: #195dac;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

/* --- модалка целиком --- */
html body #modalOrder {
  max-width: 455px;
}
html body #modalOrder .modal-content {
  position: relative;
  padding: 28px 22px 22px;
  border-radius: 24px;
  border: 1px solid rgb(77 255 180 / 0.3);
  background:
    radial-gradient(120% 60% at 100% 0%, rgb(77 255 180 / 0.12), transparent 55%),
    linear-gradient(165deg, #195dac 0%, #0b3b7a 55%, #082b5c 100%);
  box-shadow: 0 24px 60px rgb(3 16 40 / 0.45);
  color: #fff;
  text-align: left;
}
html body #modalOrder .modal-heading {
  margin-bottom: 18px;
  padding-right: 44px;
  text-align: left;
}
html body #modalOrder .modal-heading > * + * {
  margin-top: 8px;
}
html body #modalOrder .modal-title {
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  color: #fff;
}
html body #modalOrder .modal-subtitle {
  font-size: 15px;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.72);
}
html body #modalOrder .modal-form {
  color: rgb(255 255 255 / 0.72);
}
html body #modalOrder .modal-form__fieldset {
  margin-bottom: 18px;
}
html body #modalOrder .modal-form__fieldset .inputbox {
  margin-bottom: 12px;
}
html body #modalOrder .modal-form__fieldset .inputbox:last-of-type {
  margin-bottom: 16px;
}

/* поля */
html body #modalOrder .input {
  height: 52px;
  padding: 0 14px 0 44px;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
html body #modalOrder .input::placeholder {
  color: rgb(255 255 255 / 0.6);
  opacity: 1;
}
html body #modalOrder .input:focus {
  border-color: #4dffb4;
  background: rgb(255 255 255 / 0.12);
  box-shadow: 0 0 0 3px rgb(77 255 180 / 0.2);
}
/* иконка по центру поля (52 px), а не обёртки: под полем может появиться подсказка об ошибке */
html body #modalOrder .inputbox__wrapper--with-icon .icon {
  top: 26px;
  left: 15px;
  color: rgb(255 255 255 / 0.6);
}
html body #modalOrder .input:focus ~ .icon {
  color: #4dffb4;
}
html body #modalOrder .wpcf7-not-valid {
  border-color: #ff8a8a;
}
/* тема ставит подсказки ошибок абсолютом внутрь поля — на синем они налезали на текст */
html body #modalOrder .wpcf7-not-valid-tip {
  position: static;
  display: block;
  margin: 6px 2px 0;
  text-align: left;
  font-size: 13px;
  color: #ffb4b4;
}

/* плашки на синем */
html body #modalOrder .kt-format__label {
  color: rgb(255 255 255 / 0.72);
}
html body #modalOrder .kt-chips .wpcf7-list-item-label {
  border-color: rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.06);
  color: #fff;
}
html body #modalOrder .kt-chips input:checked + .wpcf7-list-item-label {
  background: #4dffb4;
  border-color: #4dffb4;
  color: #07070a;
}
/* фокус ставит сам fancybox на первую плашку при открытии: только светлая рамка, без кольца, чтобы не путали с выбором */
html body #modalOrder .kt-chips input:focus-visible + .wpcf7-list-item-label {
  outline: none;
  border-color: #fff;
}

/* согласие */
html body #modalOrder .checkradio__box {
  border: 1.5px solid rgb(255 255 255 / 0.5);
  border-radius: 6px;
}
html body #modalOrder .checkradio__content {
  font-size: 13px;
  line-height: 1.45;
  color: rgb(255 255 255 / 0.72);
}
html body #modalOrder .checkradio__content a {
  color: #fff;
}

/* кнопка: всегда яркая, без полупрозрачности до галочки */
html body #modalOrder .wpcf7-submit {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  background: #4dffb4;
  color: #07070a;
  font-weight: 800;
  font-size: 17px;
  opacity: 1;
  box-shadow: 0 8px 24px rgb(46 240 158 / 0.4);
}
/* hover только на устройствах с мышью: на телефоне после тапа он залипал и кнопка бледнела */
@media (hover: hover) {
  html body #modalOrder .wpcf7-submit:hover {
    background: #8affcc;
  }
}
html body #modalOrder .wpcf7-submit:focus {
  opacity: 1;
}
/* подсказка «отметь согласие»: тема ставит её абсолютом поверх текста — опускаем под галочку */
html body #modalOrder [data-name="modal-form-acceptance"] .wpcf7-not-valid-tip {
  position: static;
  display: block;
  margin: 6px 0 0 35px;
}
html body #modalOrder [data-name="modal-form-acceptance"] .wpcf7-not-valid .checkradio__box {
  border-color: #ff8a8a;
}
html body #modalOrder .wpcf7-spinner {
  display: block;
  margin: 8px auto 0;
}
html body #modalOrder .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: #fff;
  border-color: rgb(255 255 255 / 0.35);
}
html body #modalOrder .wpcf7-form.init .wpcf7-response-output,
html body #modalOrder .wpcf7-response-output:empty {
  display: none;
}

/* мессенджеры на синем */
html body #modalOrder .kt-alt__or {
  color: rgb(255 255 255 / 0.55);
}
html body #modalOrder .kt-alt__row a {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}
@media (hover: hover) {
  html body #modalOrder .kt-alt__row a:hover {
    background: rgb(255 255 255 / 0.18);
  }
}

/* крестик */
html body #modalOrder .fancybox-close-small {
  top: 18px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  opacity: 1;
}

/* --- окно «Спасибо!» после отправки (#modalResponse) — в той же гамме --- */
html body #modalResponse .modal-content {
  border-radius: 24px;
  border: 1px solid rgb(77 255 180 / 0.3);
  background: linear-gradient(165deg, #195dac 0%, #0b3b7a 60%, #082b5c 100%);
  box-shadow: 0 24px 60px rgb(3 16 40 / 0.45);
  color: #fff;
}
html body #modalResponse .modal-title {
  font-weight: 800;
  color: #fff;
}
html body #modalResponse .modal-title::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #4dffb4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307070a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 26px no-repeat;
}
html body #modalResponse .modal-text,
html body #modalResponse .modal-subtitle {
  color: rgb(255 255 255 / 0.8);
}
html body #modalResponse .fancybox-close-small {
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}

/* --- телефон: шторка снизу --- */
@media (max-width: 767px) {
  .fancybox-slide--html:has(> #modalOrder) {
    padding: 0;
  }
  html body #modalOrder {
    width: 100%;
    max-width: none;
    margin: 0;
    vertical-align: bottom;
    animation: kt-sheet-up 0.3s ease-out;
  }
  html body #modalOrder .modal-content {
    padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    border-width: 1px 0 0;
  }
  html body #modalOrder .modal-content::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 5px;
    margin-left: -20px;
    border-radius: 3px;
    background: rgb(255 255 255 / 0.35);
  }
  html body #modalOrder .modal-title {
    font-size: 26px;
  }
  html body #modalOrder .fancybox-close-small {
    top: 16px;
    right: 12px;
  }
}
@keyframes kt-sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body #modalOrder {
    animation: none;
  }
}
