/* ═══════════════════════════════════════════════════════════════════════
   Глобальный поиск: лупа в шапке → оверлей с табами «Услуги | Блог».
   Светлая терракотовая шкала (сайт светлый на всех страницах); значения
   локальные, файл в SCALE-списке визуального линта. 2026-08-06.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── кнопка-лупа в шапке ── */
.site-nav__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #1A2B3C;
  cursor: pointer;
}
@media (hover: hover) {
  .site-nav__search-btn:hover { color: #C75B39; }
}
.site-nav__search-btn svg { width: 19px; height: 19px; }

/* ── оверлей ── */
.site-search {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: transparent;
  overflow: hidden;
}
.site-search::backdrop {
  background: rgba(26, 43, 60, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.site-search__panel {
  display: flex;
  flex-direction: column;
  background: #FFFBF7;
  color: #2D2D2D;
  font-family: 'Manrope', sans-serif;
  height: 100%;
  overflow: hidden;
}
/* десктоп: панель, а не весь экран */
@media (min-width: 720px) {
  .site-search {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 9vh;
  }
  .site-search__panel {
    width: min(640px, 92vw);
    height: auto;
    max-height: 72vh;
    border: 1px solid #E8DFD1;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(26, 43, 60, 0.25);
  }
}

/* ── строка ввода ── */
.site-search__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 22px);
  border-bottom: 1px solid #E8DFD1;
}
.site-search__bar svg { flex: 0 0 auto; color: #C75B39; width: 18px; height: 18px; }
.site-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: #2D2D2D;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  outline: none;
}
.site-search__input::placeholder { color: #6B6B6B; }
.site-search__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #F5F0EB;
  color: #1A2B3C;
  cursor: pointer;
}
@media (hover: hover) {
  .site-search__close:hover { color: #C75B39; }
}
.site-search__close svg { width: 15px; height: 15px; }

/* ── табы ── */
.site-search__tabs {
  display: flex;
  gap: 8px;
  padding: 12px clamp(16px, 4vw, 22px) 0;
}
.site-search__tab {
  padding: 8px 16px;
  border: 1px solid #E8DFD1;
  border-radius: 999px;
  background: none;
  color: #4A4A4A;
  font-family: 'Manrope', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.site-search__tab.is-on {
  background: #C75B39;
  border-color: #C75B39;
  color: #FFFBF7;
}

/* ── результаты ── */
.site-search__results {
  list-style: none;
  margin: 0;
  padding: 10px clamp(8px, 2vw, 12px) 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.site-search__results a {
  display: block;
  padding: 12px 12px;
  border-radius: 8px;
  text-decoration: none;
}
@media (hover: hover) {
  .site-search__results a:hover { background: #F5F0EB; }
}
.site-search__results b {
  display: block;
  color: #1A2B3C;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}
.site-search__results span {
  display: block;
  margin-top: 2px;
  color: #6B6B6B;
  font-size: 12.5px;
}
.site-search__empty {
  margin: 0;
  padding: 18px clamp(16px, 4vw, 22px) 22px;
  color: #6B6B6B;
  font-size: 14.5px;
  line-height: 1.6;
}
.site-search__empty a { color: #C75B39; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .site-search__panel { animation: none; }
}
