/*
Theme Name: Blocksy Child
Theme URI: https://firmapole.ru/
Description: Дочерняя тема Blocksy для сайта firmapole.ru
Author: Firmapole
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

/* ==========================================================================
   START: Блок контактов в шапке сайта
   ========================================================================== */

.fp-top-contacts {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  color: #2f3a2f;
  font-weight: 500;
}

.fp-email-area {
  display: inline-flex;
  align-items: center;
}

.fp-email-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f4f8f1;
  border: 1px solid #d9e7d2;
  border-radius: 999px;
}

.fp-email-link {
  text-decoration: none;
  color: #2e5b2e;
  font-weight: 600;
}

.fp-email-link:hover {
  color: #3b743b;
}

.fp-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #e6f1df;
  color: #2e5b2e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fp-copy-btn:hover {
  background: #d7e9cd;
}

.fp-email-copied-msg {
  display: none;
  align-items: center;
  padding: 6px 10px;
  background: #edf7e8;
  border: 1px solid #cfe3c4;
  border-radius: 999px;
  color: #3d7a2a;
  font-weight: 600;
}

.fp-contact-sep {
  color: #b7c3b2;
}

.fp-phone-link {
  text-decoration: none;
  color: #2f3a2f;
  font-weight: 600;
  white-space: nowrap;
}

.fp-phone-link:hover {
  color: #3b743b;
}

.fp-messenger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f4f8f1;
  border: 1px solid #d9e7d2;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.fp-messenger-icon:hover {
  background: #eaf3e4;
}

.fp-messenger-icon img {
  display: block;
}

.fp-top-link {
  text-decoration: none;
  color: #2e5b2e;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.fp-top-link:hover {
  color: #3b743b;
}

@media (max-width: 767px) {
  .fp-top-contacts {
    gap: 8px 10px;
    font-size: 14px;
  }

  .fp-email-wrapper,
  .fp-email-copied-msg {
    padding: 5px 9px;
  }

  .fp-messenger-icon {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   END: Блок контактов в шапке сайта
   ========================================================================== */


/* ==========================================================================
   START: Сверхстабильный sticky header для Blocksy
   Логотип уменьшается, контакты и текст не масштабируются
   ========================================================================== */

:root {
  --hdr-transition: 0.22s ease;
}

/* Плавность только для тех элементов, которые реально меняют размер */
.ct-sticky-container [data-row="top"] > div,
.ct-sticky-container [data-row="top"] [data-items],
.ct-sticky-container [data-row="top"] .ct-container,
.ct-sticky-container [data-id="logo"] .site-logo-container,
.ct-sticky-container [data-id="logo"] .site-logo-container img,
.ct-sticky-container [data-id="logo"] .site-logo-container picture,
.ct-sticky-container [data-id="logo"] .site-logo-container svg {
  transition:
    min-height var(--hdr-transition),
    height var(--hdr-transition),
    max-height var(--hdr-transition),
    padding-top var(--hdr-transition),
    padding-bottom var(--hdr-transition);
}

/* --------------------------------------------------------------------------
   БОЛЬШОЙ ХЭДЕР (страница вверху)
   -------------------------------------------------------------------------- */

header#header.ct-header [data-row="top"] > div {
  min-height: 110px;
}

header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container {
  --logo-max-height: 90px;
  height: 90px;
}

header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container img,
header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container picture,
header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container svg {
  max-height: 90px;
  width: auto;
}

header#header.ct-header [data-row="top"] [data-items],
header#header.ct-header [data-row="top"] .ct-container {
  padding-top: 0;
  padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   STICKY ДО SHRINK — тоже большой
   -------------------------------------------------------------------------- */

.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] > div {
  min-height: 110px !important;
}

.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container {
  --logo-max-height: 90px !important;
  height: 90px !important;
}

.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container img,
.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container picture,
.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container svg {
  max-height: 90px !important;
  width: auto;
}

.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-items],
.ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] .ct-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   КОНТАКТЫ — полностью статичны
   -------------------------------------------------------------------------- */

.fp-top-contacts {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  transform: none !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  transition: none !important;
  will-change: auto !important;
}

/* Убираем лишние вертикальные отступы у внутренних элементов */
.fp-top-contacts p,
.fp-top-contacts div,
.fp-top-contacts span,
.fp-top-contacts a,
.fp-top-contacts small,
.fp-top-contacts strong {
  margin-top: 0;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   КОМПАКТНЫЙ ХЭДЕР
   Сжатие только за счёт высоты строки и логотипа
   -------------------------------------------------------------------------- */

.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] > div {
  min-height: 60px !important;
}

.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container {
  --logo-max-height: 42px !important;
  height: 42px !important;
}

.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container img,
.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container picture,
.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container svg {
  max-height: 42px !important;
  width: auto;
}

.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-items],
.ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] .ct-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Контакты даже в compact остаются без анимации */
.ct-sticky-container > div[data-sticky="yes:shrink"] .fp-top-contacts {
  transform: none !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* --------------------------------------------------------------------------
   МОБИЛЬНАЯ ВЕРСИЯ
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  /* Большой header вверху */
  header#header.ct-header [data-row="top"] > div {
    min-height: 88px;
  }

  header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container {
    --logo-max-height: 68px;
    height: 68px;
  }

  header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container img,
  header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container picture,
  header#header.ct-header [data-row="top"] [data-id="logo"] .site-logo-container svg {
    max-height: 68px;
  }

  header#header.ct-header [data-row="top"] [data-items],
  header#header.ct-header [data-row="top"] .ct-container {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Большой sticky до прилипания */
  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] > div {
    min-height: 88px !important;
  }

  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container {
    --logo-max-height: 68px !important;
    height: 68px !important;
  }

  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container img,
  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container picture,
  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container svg {
    max-height: 68px !important;
  }

  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] [data-items],
  .ct-sticky-container > div[data-sticky="fixed:shrink"] [data-row="top"] .ct-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Компактный sticky после начала прокрутки */
  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] > div {
    min-height: 54px !important;
  }

  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container {
    --logo-max-height: 34px !important;
    height: 34px !important;
  }

  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container img,
  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container picture,
  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-id="logo"] .site-logo-container svg {
    max-height: 34px !important;
  }

  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] [data-items],
  .ct-sticky-container > div[data-sticky="yes:shrink"] [data-row="top"] .ct-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Контакты на мобильном — полностью статичны */
  .fp-top-contacts {
    font-size: 13px;
    line-height: 1.15;
    transform: none !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    transition: none !important;
  }
}

/* Уважение к системной настройке reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ct-sticky-container [data-row="top"] > div,
  .ct-sticky-container [data-row="top"] [data-items],
  .ct-sticky-container [data-row="top"] .ct-container,
  .ct-sticky-container [data-id="logo"] .site-logo-container,
  .ct-sticky-container [data-id="logo"] .site-logo-container img,
  .ct-sticky-container [data-id="logo"] .site-logo-container picture,
  .ct-sticky-container [data-id="logo"] .site-logo-container svg {
    transition: none !important;
  }
}

/* ==========================================================================
   END: Сверхстабильный sticky header
   ========================================================================== */
   
   
 /* Выпадающий контейнер со списком подсказок DaData.
   Появляется под полем ввода компании/ИНН. */
.dadata-dropdown {
  position: absolute; /* Позиционируем список относительно ближайшего родителя с position: relative. */
  top: 100%; /* Ставим dropdown сразу под полем ввода. */
  left: 0; /* Прижимаем к левому краю поля. */
  right: 0; /* Растягиваем до правого края поля вместо проблемного width: 100%. */
  z-index: 9999; /* Поднимаем список выше других элементов страницы и формы. */
  background: #fff; /* Белый фон списка подсказок. */
  border: 1px solid #dcdcdc; /* Светлая рамка вокруг dropdown. */
  border-radius: 6px; /* Слегка скругляем углы. */
  margin-top: 4px; /* Небольшой отступ от поля ввода. */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* Лёгкая тень для визуального отделения от фона. */
  display: none; /* По умолчанию список скрыт, JS покажет его при наличии подсказок. */
  overflow: hidden; /* Обрезаем всё лишнее по краям. */

  writing-mode: horizontal-tb; /* Принудительно возвращаем обычное горизонтальное направление текста. */
  text-orientation: mixed; /* Нормальное отображение букв. */
  white-space: normal; /* Разрешаем обычный перенос строк. */
  word-break: normal; /* Запрещаем ломать слова по одной букве. */
  overflow-wrap: anywhere; /* Если строка слишком длинная, переносим её мягко. */
  box-sizing: border-box; /* Включаем рамку и отступы в общую ширину блока. */
}

/* Один вариант в списке подсказок. */
.dadata-option {
  display: block; /* Каждый вариант — отдельной строкой. */
  width: 100%; /* Вариант занимает всю ширину dropdown. */
  padding: 10px 12px; /* Внутренние отступы для удобного клика и читаемости. */
  cursor: pointer; /* Показываем, что элемент можно выбрать мышкой. */
  background: #fff; /* Белый фон элемента. */
  color: #222; /* Цвет текста. */
  line-height: 1.4; /* Нормальная высота строки для читаемости. */
  text-align: left; /* Выравниваем текст по левому краю. */
  box-sizing: border-box; /* Ширина считается вместе с padding. */

  writing-mode: horizontal-tb; /* Сбрасываем возможное вертикальное направление от темы. */
  text-orientation: mixed; /* Буквы отображаются нормально. */
  white-space: normal; /* Текст переносится стандартно. */
  word-break: normal; /* Не ломаем слова по символам. */
  overflow-wrap: anywhere; /* Длинные строки переносим безопасно. */
}

/* Выключаем текстовые сообщения ошибок CF7 */
.wpcf7-not-valid-tip,
.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  display: none !important;
}

/* Подсветка всех полей с ошибкой */
.wpcf7-not-valid {
  border-color: #dc3232 !important;
  box-shadow: 0 0 0 1px rgba(220, 50, 50, 0.25);
}