/* LOTNOIR — полноэкранный поиск. Подключить в <head>: <link rel="stylesheet" href="search.css"> */

body.ln-search-open { overflow: hidden; }
/* TODO: поставь сюда селектор своего таббара, если он лезет поверх оверлея */
body.ln-search-open .tabbar { display: none !important; }

#ln-search {
  position: fixed; inset: 0; z-index: 9999;
  display: none; flex-direction: column;
  background: #0a0a0a; color: #fff;
  padding-top: var(--tg-content-safe-area-inset-top, 0px);
  font: inherit;
}
#ln-search.open { display: flex; }

.ln-s-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px 6px; }
.ln-s-field {
  flex: 1; box-sizing: border-box; margin: 0; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 12px 0 14px;
  background: #161618; border: 1px solid #242428; border-radius: 23px;
  color: #8a8a8e;
}
.ln-s-field:focus-within { border-color: #3a3a40; }
.ln-s-field input {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0;
  background: none; border: 0; outline: 0;
  color: #fff; font: inherit; font-size: 16px; /* 16px — чтобы iOS не зумил */
  -webkit-appearance: none; appearance: none;
}
.ln-s-field input::placeholder { color: #6e6e73; }
.ln-s-field input::-webkit-search-cancel-button,
.ln-s-field input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.ln-s-clear { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: #2a2a2e; color: #cfcfd4; }
.ln-s-clear[hidden] { display: none; }
.ln-s-cancel { flex: none; display: flex; align-items: center; height: 46px; margin: 0; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 16px; line-height: 1; }

.ln-s-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.ln-s-title { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 4px; font-size: 13px; color: #8a8a8e; }
.ln-s-link { padding: 4px 0; border: 0; background: none; color: #8a8a8e; font: inherit; font-size: 13px; }
.ln-s-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #161618; font-size: 14px; color: #cfcfd4; }

.ln-s-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid #1c1c1f; cursor: pointer; }
.ln-s-row:active { opacity: .6; }
.ln-s-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #161618; color: #cfcfd4; overflow: hidden; font-weight: 700; }
.ln-s-ico img { width: 100%; height: 100%; object-fit: cover; }
.ln-s-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ln-s-main { font-size: 16px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-s-main b { font-weight: 700; }
.ln-s-sub { margin-top: 2px; font-size: 13px; color: #6e6e73; }
.ln-s-x, .ln-s-chev { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: #5a5a60; }

.ln-s-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ln-s-chip { padding: 9px 14px; border: 1px solid #242428; border-radius: 999px; background: #161618; color: #fff; font: inherit; font-size: 14px; }
.ln-s-chip:active { opacity: .6; }

.ln-s-empty { padding: 56px 12px 0; text-align: center; color: #8a8a8e; font-size: 15px; line-height: 1.45; }
.ln-s-empty-t { margin-bottom: 8px; color: #fff; font-size: 18px; font-weight: 600; }
.ln-s-btn { margin-top: 20px; padding: 14px 22px; border: 0; border-radius: 23px; background: #fff; color: #000; font: inherit; font-size: 15px; font-weight: 600; }
.ln-s-btn:disabled { opacity: .7; }

#ln-search button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.ln-s-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 6px -16px 4px; padding: 0 16px; scrollbar-width: none; }
.ln-s-scroll::-webkit-scrollbar { display: none; }
.ln-s-scroll .ln-s-chip { flex: none; }
.ln-s-field svg, .ln-s-ico svg, .ln-s-x svg, .ln-s-chev svg, .ln-s-clear svg { fill: none; stroke: currentColor; flex: none; }
