/* ============================================================
   Журнал — поиск (поле, фильтры, выдача, палитра)
   ============================================================ */
.srch { display: flex; flex-direction: column; min-width: 0; }
.srch__bar { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--line-strong); background: var(--paper-raise); border-radius: 0; padding: 0.6rem 0.85rem; }
.srch__bar:focus-within { border-color: var(--accent); }
.srch__ic { display: inline-flex; width: 18px; height: 18px; color: var(--ink-faint); flex: none; }
.srch__ic svg { width: 100%; height: 100%; }
.srch__in { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-family: var(--grotesk); font-size: var(--t-small); color: var(--ink); }
.srch__in::placeholder { color: var(--ink-faint); }

.srch__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 0.2rem; }
.srch__chip {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: 0.04em;
  border: 1px solid var(--line-strong); background: var(--paper-raise); border-radius: 0;
  padding: 0.3rem 0.75rem; cursor: pointer; color: var(--ink-soft); transition: all 0.15s var(--ease);
}
.srch__chip:hover { border-color: var(--ink); color: var(--ink); }
.srch__chip.is-on { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-wash); }

.srch__list { margin-top: 0.5rem; display: flex; flex-direction: column; }
.srch__hint, .srch__empty { font-family: var(--grotesk); font-size: var(--t-small); color: var(--ink-faint); padding: 0.8rem 0.2rem; }
.srch__row {
  display: flex; align-items: baseline; gap: 0.7rem; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 0.6rem 0.3rem; cursor: pointer;
}
.srch__row:hover { background: var(--accent-wash); }
.srch__k {
  flex: none; min-width: 88px; font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint);
}
.srch__k--person { color: var(--accent); }
.srch__k--venue { color: oklch(0.470 0.090 250); }
.srch__k--pub { color: oklch(0.470 0.085 150); }
.srch__t { font-family: var(--grotesk); font-size: var(--t-small); color: var(--ink); min-width: 0; }
.srch__s { margin-left: auto; flex: none; font-family: var(--mono); font-size: var(--t-micro); color: var(--ink-faint); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .srch__s { display: none; } }

/* палитра-оверлей */
.srch-modal { position: fixed; inset: 0; z-index: 1300; background: oklch(0.235 0.012 60 / 0.42); display: grid; place-items: start center; padding: 9vh 1rem 1rem; }
.srch-sheet { width: min(640px, 96vw); background: var(--paper); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px oklch(0.235 0.012 60 / 0.28); border-radius: 3px; padding: 1rem 1.1rem 1.2rem; max-height: 80vh; overflow: auto; }
.srch-sheet .srch__list { max-height: 56vh; overflow: auto; }

/* кнопка-триггер в шапке */
/* кнопка-триггер: только иконка, без «прямоугольника» кнопки
   (у <button> по умолчанию есть рамка/фон — сбрасываем, как у колокольчика). */
.mast-search {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; padding: 0; margin: 0;
  -webkit-appearance: none; appearance: none;
  cursor: pointer; color: var(--ink-faint);
  transition: color 0.25s var(--ease);
}
.mast-search:hover { color: var(--ink); }
.mast-search__ic { display: inline-flex; width: 18px; height: 18px; }
.mast-search__ic svg { width: 100%; height: 100%; }

/* компактный режим (встраивание в кабинеты) */
.srch--compact .srch__list { max-height: 320px; overflow: auto; }

/* встраивание в кабинеты/админки */
.u-search, .ad-search, .ed-search { margin: 0 0 1rem; }
/* cabinet: search sits OUTSIDE .u-main, so it must self-center to the same
   1160 / --bleed container as the profile header, tabs and main below it —
   otherwise it runs full-bleed and looks shifted left of everything else. */
.u-search { max-width: 1160px; margin: 0.4rem auto 1rem; padding-inline: var(--bleed); }
