/* include/search_new.css — новый поиск с саджестами, макет figma/search (Figma 16 Global Navigation 303:5663).
   Разметка — blocks/search_new.php, логика — js/search_new.js. Все классы с префиксом sn-. */

html.sn-lock,
html.sn-lock body {
  overflow: hidden;
}

/* Десктопный хедер АХАА (.search_inner): кнопка вместо #wh, открывает ту же шторку */
.search_inner #sn_open.sn-desktop-open {
  display: block;
  box-sizing: border-box;
  height: 34px;
  width: 100%;
  margin: 0;
  padding: 0 10px 0 35px;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: #9e9db0;
  font-family: 'Prosto', 'Arial', sans-serif;
  font-size: 14px;
  letter-spacing: 0.5px;
  line-height: 34px;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.search_inner #sn_open.sn-desktop-open span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search_inner #wh_btn {
  pointer-events: none;
}

#search_inner.gapp-top__search .gapp-top__open {
  display: flex;
  flex: 1 0 0;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 39px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #72798c;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-size: 17px;
  line-height: 24px;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

#search_inner.gapp-top__search .gapp-top__open span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#search_inner.gapp-top__search .gapp-top__open img {
  display: block;
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  max-width: none;
}

.sn-flash {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1090;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms linear;
}

.sn-flash.sn-on {
  z-index: 1200;
  opacity: 1;
  pointer-events: auto;
  transition: none;
}

.sn-flash.sn-hold {
  z-index: 1090;
}

.sn-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #f5f6fa;
  color: #09034b;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-weight: 400;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.sn-modal.sn-open {
  display: flex;
  pointer-events: auto;
}

.sn-modal.sn-in {
  opacity: 1;
}

.sn-modal *,
.sn-modal *::before,
.sn-modal *::after {
  box-sizing: border-box;
}

.sn-modal img {
  display: block;
  max-width: none;
}

.sn-modal button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.sn-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 480px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
}

.sn-results {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 15px;
  min-height: 0;
  padding-bottom: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sn-sheet {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0 0 29px 29px;
  background: #fff;
}

.sn-sheet.sn-compact {
  padding-bottom: 10px;
}

.sn-bar {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 24px 0 5px;
}

.sn-back {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
}

.sn-back img {
  width: 24px;
  height: 24px;
}

.sn-field {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 49px;
  padding: 0 15px 0 20px;
  border-radius: 20px;
  background: #f2f4f7;
}

.sn-field input {
  flex: 1;
  min-width: 0;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #09034b;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  line-height: 24px;
  -webkit-appearance: none;
  appearance: none;
}

.sn-field:not(.sn-has) input {
  caret-color: transparent;
}

.sn-ghost {
  position: absolute;
  top: 0;
  right: 64px;
  bottom: 0;
  left: 20px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #72798c;
  font-size: 17px;
  line-height: 24px;
  white-space: nowrap;
  pointer-events: none;
}

.sn-field.sn-has .sn-ghost {
  display: none;
}

.sn-caret {
  flex-shrink: 0;
  width: 1.5px;
  height: 18px;
  margin-right: 1px;
  background: #09034b;
  animation: sn-caret 1.05s steps(1) infinite;
}

@keyframes sn-caret {
  0%,
  45% { opacity: 1; }
  50%,
  100% { opacity: 0; }
}

.sn-tool {
  flex-shrink: 0;
  width: 39px;
  height: 39px;
}

.sn-tool img {
  width: 39px;
  height: 39px;
}

.sn-pane {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 180ms ease, opacity 150ms ease;
}

.sn-pane.sn-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
}

.sn-pane__in {
  min-height: 0;
  overflow: hidden;
}

.sn-pad {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px;
}

.sn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 5px 0 0;
  color: #09034b;
  text-align: left;
  text-decoration: none;
}

.sn-ico {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.sn-ico img {
  width: 24px;
  height: 24px;
}

.sn-ico--ai {
  background: linear-gradient(90deg, #e9e7ff 0%, #fee7ef 100%);
}

.sn-ico--catalog {
  background: #fde8ed;
}

.sn-ico--cert {
  background: #e5f0fe;
}

.sn-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.sn-text b {
  overflow: hidden;
  color: #09034b;
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sn-text span {
  overflow: hidden;
  color: #72798c;
  font-size: 12px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sn-sep {
  display: flex;
  align-items: center;
  height: 20px;
}

.sn-sep img {
  width: 100%;
  height: 20px;
}

.sn-miss {
  margin: 0;
  padding: 15px 0;
  color: #72798c;
  font-size: 15px;
  line-height: 20px;
}

.sn-card {
  padding-top: 10px;
  border-radius: 29px;
  background: #fff;
}

.sn-card__in {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 15px;
}

.sn-label {
  margin: 0;
  padding: 15px 0;
  color: #72798c;
  font-size: 15px;
  line-height: 20px;
}

.sn-line {
  display: block;
  width: 100%;
  color: #09034b;
  font-size: 17px;
  line-height: 24px;
  text-align: left;
  text-decoration: none;
}

.sn-good {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  color: #09034b;
  text-align: left;
  text-decoration: none;
}

.sn-good p {
  margin: 0;
  color: #09034b;
  font-size: 15px;
  line-height: 20px;
}

.sn-good b {
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
}

.sn-hidden {
  display: none !important;
}

/* Веб-версия (figma/search/web.html): строка поиска 88, поле 59; на мобилке — на всю ширину */
.sn-web .sn-col {
  max-width: none;
}

/* Десктоп АХАА: как .top_menu / контент — max 1400px по центру */
@media (min-width: 1240px) {
  .sn-web .sn-col {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}

.sn-web .sn-bar {
  height: 88px;
}

.sn-web .sn-field {
  height: 59px;
}

.sn-web .sn-sheet.sn-compact {
  padding-bottom: 0;
}

/* глобальное a:hover рисует красную линию снизу (styles_2020.css) */
.sn-modal a,
.sn-modal a:hover,
.sn-modal a:focus,
.sn-modal a:active {
  border-bottom: 0;
  text-decoration: none;
}

.sn-think {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding-top: 20px;
}

.sn-dots {
  position: relative;
  flex-shrink: 0;
  width: 29px;
  height: 24px;
}

.sn-dots i {
  position: absolute;
  top: 9.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2600a2;
  animation: sn-dot 1.05s ease-in-out infinite;
}

.sn-dots i:nth-child(1) { left: 5px; animation-delay: 0s; }
.sn-dots i:nth-child(2) { left: 12px; animation-delay: 0.15s; }
.sn-dots i:nth-child(3) { left: 19px; animation-delay: 0.3s; }

@keyframes sn-dot {
  0%,
  80%,
  100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.sn-think__text {
  flex: 1;
  min-width: 0;
  margin: 0;
  background: linear-gradient(90deg, #2600a2 0%, #ff0586 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 17px;
  line-height: 24px;
}

.sn-answer {
  margin: 0;
  padding-top: 20px;
  color: #09034b;
  font-size: 17px;
  line-height: 24px;
}

.sn-modal .sn-ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: 44px;
  padding: 0 15px;
  border-radius: 61px;
  background: linear-gradient(90deg, #e9e7ff 0%, #fee7ef 100%);
  color: #09034b;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
}

/* Приложение: нативный заголовок скрыт, шторка занимает весь экран — отступ под статус-бар, как у .gapp-top (app_nav.css) */
body.gnav-app .sn-sheet {
  padding-top: 61px;
}
