/*--------------------------------------------------------------
# BetTrackr HTMLSearchSelect styles v2 (token-driven dark theme)
#
# Requires tokens_v1.css AND theme_v1.css to be loaded first.
#
# Dropdown follows the sheet recipe (surface bg, hairline border,
# 12px radius, item hover surface-alt, selected item primary 700);
# the input follows the input recipe. Class names kept verbatim.
# Colors come exclusively from tokens_v1.css custom properties.
--------------------------------------------------------------*/

.htmlsearchselect {
  position: relative;
}

.htmlsearchselect-control {
  position: relative;
}

.htmlsearchselect-input-wrap {
  position: relative;
}

/* Input recipe: primary focus border + focus ring */
.htmlsearchselect-input {
  width: 100%;
}

.htmlsearchselect-input:focus {
  border-color: var(--bettrackr-primary);
  box-shadow: 0 0 0 0.25rem var(--bettrackr-focus-ring);
  outline: none;
}

.htmlsearchselect-clear {
  border-left: 0;
}

/* Sheet recipe */
.htmlsearchselect-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 2px;
  padding: 4px 0;
  border: 1px solid var(--bettrackr-border);
  border-radius: var(--bettrackr-r-input);
  background: var(--bettrackr-surface);
  box-shadow: var(--bettrackr-shadow);
}

.htmlsearchselect.htmlsearchselect-open .htmlsearchselect-menu,
.htmlsearchselect-menu.show {
  display: block;
}

.htmlsearchselect-item {
  display: block;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--bettrackr-text);
  white-space: normal;
}

/* Item hover: surface-alt wash */
.htmlsearchselect-item:hover {
  background: var(--bettrackr-surface-alt);
  color: var(--bettrackr-text);
  outline: none;
}

/* Selected / active item: primary 700 */
.htmlsearchselect-item.htmlsearchselect-active {
  background: var(--bettrackr-surface-alt);
  color: var(--bettrackr-primary);
  font-weight: 700;
  outline: none;
}

.htmlsearchselect-item.htmlsearchselect-active .htmlsearchselect-match,
.htmlsearchselect-item:hover .htmlsearchselect-match {
  color: var(--bettrackr-primary);
}

.htmlsearchselect-match {
  font-weight: 700;
  color: var(--bettrackr-primary);
}

.htmlsearchselect-hint {
  list-style: none;
  padding: 8px 12px;
}

.htmlsearchselect-group {
  list-style: none;
  padding: 6px 12px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bettrackr-text-muted);
  background: var(--bettrackr-surface-alt);
  border-top: 1px solid var(--bettrackr-border);
  cursor: default;
}

.htmlsearchselect-group:first-child {
  border-top: none;
}

.htmlsearchselect-subtitle {
  font-size: 0.75rem;
  color: var(--bettrackr-text-muted);
  margin-top: 1px;
}
