/* ============================================================
   Дополнительные стили, которые в Тильде задавались скриптами
   (появление страницы, полоса загрузки, маска телефона, форма
   в Zero Block, лайтбокс отзывов). Подключается последним.
   ============================================================ */

/* ----- Плавное появление страницы при первом визите (блок T360) ----- */
@media screen and (min-width: 980px) {
  html.t-first-visit .t-records { opacity: 0; }
  html.t-first-visit .t-records_animated { transition: opacity ease-in-out 0.5s; }
  html.t-first-visit .t-records.t-records_visible { opacity: 1; }
}

/* ----- Полоса загрузки сверху страницы (блок T360) ----- */
.t360__bar { background-color: #0d8050; }

/* ----- Маска телефона (разметка как у Тильды) ----- */
.t-input-phonemask { border: 0 !important; }
.t-input_pvis.t-input-phonemask__wrap { padding-top: 0; padding-bottom: 0; }
.t-input-phonemask__wrap { position: relative; display: flex; align-items: center; }
.t-input .t-input-phonemask,
.t-input-phonemask { height: auto; padding: 0; background-color: transparent; }
.t-input-phonemask__select {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 5px;
  margin-left: 0;
  font-size: 16px;
  cursor: pointer;
}
.t-input-phonemask__select-triangle {
  position: relative;
  margin-left: 6px;
  border-style: solid;
  border-width: 5px 4px 0;
  border-color: #9a9a9a transparent transparent;
}
.t-input-phonemask__select-code { white-space: nowrap; margin-left: 10px; }
/* Флаг РФ рисуется всегда: код страны фиксированный (+7), выбора стран нет */
.t-input-phonemask__select-flag {
  display: inline-block;
  width: 18px;
  min-width: 18px;
  height: 13px;
  background: linear-gradient(to bottom, #ffffff 0 33.4%, #0039a6 33.4% 66.7%, #d52b1e 66.7% 100%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* ----- Форма в Zero Block «Запишитесь на бесплатную консультацию» ----- */
.tn-atom .t-input-block { position: relative; }
#lead-form .tn-atom__form input::placeholder { color: #000000; opacity: 0.5; }
#lead-form .tn-atom__form .t-submit {
  border-radius: 100px;
  font-size: 16px;
  font-family: var(--t-headline-font, Arial);
  cursor: pointer;
  background-color: #0d8050;
  transition: background-color 0.2s ease-in-out;
}
#lead-form .tn-atom__form .t-submit .t-submit__text { color: #ffffff; }
#lead-form .tn-atom__form .t-submit:hover { background-color: #1a9e66; }
@media screen and (max-width: 479px) {
  #lead-form .tn-atom__form .t-submit { height: 60px !important; font-size: 13px; }
}

/* ----- Шапка: фон выпадающего меню на мобильных (Тильда ставила скриптом) ----- */
@media screen and (max-width: 960px) {
  #header .t-menu-base { background-color: #ffffff; }
}

/* ----- Слайдеры ----- */
.t-slds__main {
  touch-action: pan-y;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* ----- Просмотр отзывов в полный размер ----- */
.t-zoomable { cursor: zoom-in; }
body.t-zoomer__active { overflow: hidden; }
.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.site-lightbox_show { display: flex; }
.site-lightbox__bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}
.site-lightbox__img {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.site-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.site-lightbox__close::before,
.site-lightbox__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 28px;
  background: #ffffff;
  transform: translate(-50%, -50%) rotate(45deg);
}
.site-lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
@media screen and (max-width: 640px) {
  .site-lightbox { padding: 15px; }
}
