/*
 * global-search.css — topbar global search dropdown styling.
 * Paired with static/js/global-search.js. Brand colors per CLAUDE.md.
 */

#global-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 420px;
  overflow-y: auto;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
  padding: 0.35rem;
}

#global-search-results.hidden {
  display: none;
}

.gs-group {
  padding: 0.15rem 0;
}

.gs-group + .gs-group {
  border-top: 1px solid #f1f3f5;
  margin-top: 0.15rem;
  padding-top: 0.35rem;
}

.gs-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  padding: 0.25rem 0.6rem;
}

.gs-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.gs-item:hover,
.gs-item.gs-active {
  background-color: #f3f4f6;
}

.gs-item.gs-active {
  outline: 2px solid rgba(55, 71, 90, 0.25);
  outline-offset: -2px;
}

.gs-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-item-sub {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-item-org {
  font-size: 0.68rem;
  font-weight: 600;
  color: #d68a70;
}

.gs-empty,
.gs-loading {
  padding: 1rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

.gs-error {
  color: #b91c1c;
}

/* ---- Dark theme ---- */
[data-theme="dark"] #global-search-results,
html.dark #global-search-results {
  background-color: #1f2632;
  border-color: #3a4453;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .gs-group + .gs-group,
html.dark .gs-group + .gs-group {
  border-top-color: #3a4453;
}

[data-theme="dark"] .gs-item:hover,
[data-theme="dark"] .gs-item.gs-active,
html.dark .gs-item:hover,
html.dark .gs-item.gs-active {
  background-color: #2a3340;
}

[data-theme="dark"] .gs-item-title,
html.dark .gs-item-title {
  color: #e5e7eb;
}

[data-theme="dark"] .gs-item-sub,
[data-theme="dark"] .gs-empty,
[data-theme="dark"] .gs-loading,
html.dark .gs-item-sub,
html.dark .gs-empty,
html.dark .gs-loading {
  color: #9ca3af;
}
