.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.docs-search[hidden] { display: none; }
.docs-search { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 88px 20px 20px; }
.docs-search__backdrop { position: absolute; inset: 0; border: 0; background: rgba(1, 5, 9, .72); backdrop-filter: blur(10px); cursor: default; }
.docs-search__panel { position: relative; width: min(720px, 100%); max-height: min(720px, calc(100dvh - 120px)); overflow: hidden; border: 1px solid rgba(126, 108, 255, .42); border-radius: 14px; background: rgba(7, 16, 25, .985); box-shadow: 0 28px 90px rgba(0,0,0,.48), 0 0 60px rgba(83, 65, 210, .12); }
.docs-search__input-row { min-height: 62px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); }
.docs-search__search-icon { width: 20px; height: 20px; color: #7989ff; }
.docs-search__input-row input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.docs-search__input-row input::placeholder { color: #748197; }
.docs-search__input-row kbd, .docs-search__footer kbd { border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.035); color: #8e9bad; font-size: 10px; padding: 3px 6px; }

.docs-search__status {
  padding: 14px 18px 4px;
  color: #738197;
  font-size: 12px;
  line-height: 1.45;
}

.docs-search__status[hidden] { display: none; }
.docs-search__results { padding: 10px; overflow-y: auto; max-height: 510px; }
.docs-search__result { min-height: 76px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; color: inherit; text-decoration: none; }
.docs-search__result + .docs-search__result { margin-top: 2px; }
.docs-search__result.is-active { border-color: rgba(111, 101, 255, .55); background: linear-gradient(90deg, rgba(83, 78, 210, .18), rgba(83, 78, 210, .06)); }
.docs-search__result-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #7282ff; background: rgba(255,255,255,.025); font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.docs-search__result-icon--section { color: #a6b0ff; }
.docs-search__result-content { min-width: 0; display: block; }
.docs-search__result-meta { display: block; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #68778c; font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.docs-search__result strong { display: block; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e7edf7; font-size: 14px; }
.docs-search__result-excerpt { display: block; overflow: hidden; color: #91a0b3; font-size: 12px; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.docs-search__result mark { padding: 0; border-radius: 2px; background: rgba(126, 136, 255, .18); color: #d9ddff; }
.docs-search__enter-icon { width: 22px; text-align: center; color: #66748a; font-size: 14px; opacity: 0; }
.docs-search__result.is-active .docs-search__enter-icon { opacity: 1; }
.docs-search__empty { margin: 0; padding: 36px 20px 42px; text-align: center; color: #8795a8; font-size: 13px; }
.docs-search__footer { min-height: 44px; display: flex; align-items: center; gap: 18px; padding: 0 16px; border-top: 1px solid var(--line); color: #78879a; font-size: 11px; }
.docs-search__footer span { display: inline-flex; align-items: center; gap: 5px; }

body.search-open { overflow: hidden; }

html[data-theme="light"] .docs-search__panel {
  border-color: rgba(90, 88, 206, .26);
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 28px 80px rgba(36, 45, 64, .18), 0 0 48px rgba(83, 65, 210, .08);
}

html[data-theme="light"] .docs-search__status,
html[data-theme="light"] .docs-search__result-meta {
  color: #78869a;
}

html[data-theme="light"] .docs-search__result strong {
  color: #273449;
}

html[data-theme="light"] .docs-search__result-excerpt {
  color: #65748a;
}

html[data-theme="light"] .docs-search__result.is-active {
  border-color: rgba(88, 88, 205, .34);
  background: linear-gradient(90deg, rgba(83, 78, 210, .09), rgba(83, 78, 210, .03));
}

html[data-theme="light"] .docs-search__result mark {
  background: rgba(79, 87, 190, .12);
  color: #3f47a9;
}

@media (max-width: 700px) {
  .docs-search { padding: 12px; place-items: start stretch; }
  .docs-search__panel { width: 100%; max-height: calc(100dvh - 24px); border-radius: 12px; }
  .docs-search__input-row { min-height: 58px; padding: 0 14px; }
  .docs-search__results { max-height: calc(100dvh - 190px); }
  .docs-search__result { grid-template-columns: 34px minmax(0, 1fr); min-height: 72px; padding: 9px 10px; }
  .docs-search__result-icon { width: 30px; height: 30px; }
  .docs-search__enter-icon { display: none; }
  .docs-search__footer { justify-content: space-between; gap: 8px; }
  .docs-search__footer span:first-child { display: none; }
}
