/* Поиск по документации — стили. Подключается страницами /docs/ рядом с aris.css.
   Все цвета — переменные aris.css, светлая/тёмная тема переключаются сами. */

.docsearch { position: relative; max-width: 620px; margin: 18px 0 0; }
.docsearch input {
  width: 100%; box-sizing: border-box;
  font: 400 14.5px/1.3 var(--mono);
  color: var(--ink);
  background: var(--navy2);
  border: 1px solid var(--hair); border-radius: 12px;
  padding: 11px 40px 11px 40px;
  outline: none;
  transition: border-color .3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.docsearch input::placeholder { color: var(--dim); }
.docsearch input:focus { border-color: var(--signal); }
.docsearch .ds-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--dim); pointer-events: none;
}
.docsearch .ds-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: transparent; color: var(--dim); cursor: pointer; display: none;
  font: 400 15px/1 var(--mono);
}
.docsearch .ds-clear:hover { color: var(--ink); }
.docsearch.has-q .ds-clear { display: block; }

.docsearch-pop {
  position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--navy);
  border: 1px solid var(--hair2); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  max-height: 60vh; overflow-y: auto;
  padding: 6px;
}
.docsearch-pop[hidden] { display: none; }
.ds-hint {
  font: 400 12px var(--mono); color: var(--dim); padding: 10px 14px 6px;
}
.ds-item {
  display: block; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
}
.ds-item:hover, .ds-item.sel { background: rgba(77, 111, 255, .1); }
.ds-item .ds-t { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.ds-item .ds-t b { color: var(--signal-hi); }
.ds-item .ds-s { font-size: 13px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-item .ds-s b { color: var(--signal-hi); font-weight: 500; }
.ds-item .ds-c {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font: 400 11px var(--mono); color: var(--muted);
  border: 1px solid var(--hair); border-radius: 999px; padding: 1px 8px;
}
.ds-none { font-size: 13.5px; color: var(--muted); padding: 12px 14px; }
.ds-foot {
  display: flex; justify-content: space-between; align-items: center;
  font: 400 11.5px var(--mono); color: var(--dim);
  border-top: 1px solid var(--hair); margin-top: 4px; padding: 8px 12px 4px;
}
.ds-foot a { color: var(--signal-hi); text-decoration: none; }
@media (max-width: 640px) { .docsearch-pop { max-height: 55vh; } }
