:root { font-family: "Inter", Arial, sans-serif; color: #000; background: #fff; font-synthesis: none; }
* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
button, input { font: inherit; }
[hidden] { display: none !important; }

#global-search {
  position: fixed;
  z-index: 80;
  top: 60px;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgb(0 0 0 / 14%);
  transform: translateX(-50%);
}
#global-search.is-open { display: block !important; }

#global-search-input-bar {
  width: 100%;
  height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid #ededed;
  background: #fff;
}
#global-search-icon { width: 19px; height: 19px; fill: none; stroke: #777; stroke-width: 1.5; stroke-linecap: round; }
#global-search-input { width: 100%; height: 24px; padding: 0; border: 0; outline: 0; background: transparent; color: #000; font-size: 14px; font-weight: 400; }
#global-search-input::placeholder { color: #aaa; opacity: 1; }
#global-search-input::-webkit-search-cancel-button { display: none; }
#global-search-input-bar kbd { padding: 2px 5px; border: 1px solid #ddd; border-radius: 5px; background: #f7f7f7; color: #888; font: 500 9px/1.4 "Inter", sans-serif; }

#global-search-results { width: 100%; min-height: 48px; max-height: min(420px, calc(100vh - 132px)); padding: 10px 8px 8px; overflow: hidden; background: #fff; }
.global-search-section-heading { height: 25px; display: flex; align-items: flex-start; justify-content: space-between; padding: 0 8px; }
#global-search-recents-title { margin: 0; color: #8b8b8b; font-size: 11px; font-weight: 500; line-height: 16px; }
#global-search-result-count { color: #aaa; font-size: 10px; line-height: 16px; }
#global-search-results-list { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b4b4b4 transparent; }
#global-search-result-highlight { display: none; }

.search-result {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.search-result:hover, .search-result.is-selected { background: #f5f5f5; }
.search-result.is-command-result { background: #fff; box-shadow: none; }
#global-search-results.is-command-specific .search-result.is-command-result { background: #b7f2fe; }
.result-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #f1f1f1; color: #6e6e6e; font-size: 12px; font-weight: 600; }
.is-command-result .result-icon { background: #ecfbfe; color: #2788a0; }
.result-copy { min-width: 0; display: block; }
.result-value { display: block; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.result-page { display: block; margin-top: 2px; overflow: hidden; color: #999; font-size: 11px; font-weight: 400; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.result-department { margin-left: 8px; color: #9a9a9a; font-size: 10px; font-weight: 500; white-space: nowrap; }
.access-separator { width: 1px; height: 18px; background: #cdcdcd; }
.request-access { min-height: 28px; padding: 0 9px; border: 0; border-radius: 7px; background: #bcecff; font-size: 11px; font-weight: 500; white-space: nowrap; }

#global-search-empty-message { height: 76px; display: grid; place-items: center; margin: 0; color: #999; font-size: 13px; }
#global-search-show-more { width: 100%; height: 32px; margin-top: 4px; border: 0; border-radius: 8px; background: transparent; color: #666; font-size: 11px; font-weight: 500; cursor: pointer; }
#global-search-show-more:hover, #global-search-show-more:focus-visible { background: #f5f5f5; outline: 0; }
.global-search-shortcuts { display: flex; justify-content: flex-end; gap: 14px; margin-top: 7px; padding: 8px 7px 1px; border-top: 1px solid #ededed; color: #999; font-size: 9px; }
.global-search-shortcuts span { display: inline-flex; align-items: center; gap: 4px; }
.global-search-shortcuts kbd { padding: 2px 5px; border: 1px solid #ddd; border-radius: 5px; background: #f7f7f7; color: #888; font: 500 9px/1.4 "Inter", sans-serif; }
.global-search-shortcuts kbd + kbd { margin-left: -3px; }
#global-search-scroll-track { display: none; }
#global-search-results.is-expanded #global-search-results-list { max-height: min(300px, calc(100vh - 190px)); }

#search-feedback { position: fixed; z-index: 100; right: 24px; bottom: 24px; padding: 10px 14px; border: 1px solid #dadada; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / 10%); font-size: 14px; }
#global-search button:focus-visible, #global-search input:focus-visible { outline: 2px solid #588bff; outline-offset: 2px; }

@media (max-width: 520px) {
  #global-search { top: 54px; width: calc(100vw - 24px); }
  .search-result { grid-template-columns: 26px minmax(0, 1fr); }
  .result-department { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .search-result { scroll-behavior: auto; }
}
