/* ============================================================
   Smart Write — Global search overlay
   Layout reuses library.css (.library, .lib-head, .lib-body, …).
   Only overlay positioning and search-result rows are defined here.
   ============================================================ */

.search-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 220;
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.search-overlay > .library {
  height: 100%;
  flex: 1;
  min-height: 0;
}

.search-shelf__head {
  cursor: default;
  user-select: auto;
}

.search-group__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-result:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.search-result__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.search-result__sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result__crumb {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
