/* Geology Explorer — top-bar global search box (js/search.js).
 * Styled to match the existing toolbar (.action-btn / .panel-header-search) and
 * the app's CSS variables.
 */
.geo-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
}

.geo-search-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--row);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 3px 8px;
  transition: border-color .12s, background .12s;
}
.geo-search-field:hover { border-color: var(--accent); }
.geo-search.is-open .geo-search-field,
.geo-search-field:focus-within {
  border-color: var(--accent);
  background: var(--row-hover);
}

.geo-search-ico-search {
  width: 15px; height: 15px;
  flex: 0 0 auto;
  color: var(--accent);
  display: block;
}

#geo-search-input {
  appearance: none;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  padding: 3px 0;
  width: 150px;
  max-width: 40vw;
}
#geo-search-input::placeholder { color: var(--ink-dim); }

.geo-search-clear {
  appearance: none;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 6px;
  flex: 0 0 auto;
}
.geo-search-clear:hover { color: var(--ink); }

/* ---- type-ahead dropdown ---- */
.geo-search-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 260px;
  max-width: 360px;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  z-index: 80;
}

.geo-search-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
}
.geo-search-item.is-active,
.geo-search-item:hover { background: var(--row-hover); }

.geo-search-ico { flex: 0 0 auto; font-size: 15px; line-height: 1; }

.geo-search-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.geo-search-name {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.geo-search-sub {
  color: var(--ink-dim);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geo-search-kind {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
  opacity: .85;
}

.geo-search-more {
  padding: 6px 8px;
  color: var(--ink-dim);
  font-size: 11.5px;
  font-style: italic;
  text-align: center;
}

@media (max-width: 720px) {
  #geo-search-input { width: 110px; }
  .geo-search-list { min-width: 220px; }
}
