[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1e1e2e;
  --md-primary-fg-color--light: #2a2a3e;
  --md-primary-fg-color--dark: #141420;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  --md-typeset-a-color: #82aaff;
  --bh-bg: #1c1d2b;
  --bh-border: rgba(255, 255, 255, 0.07);
  --bh-text: #dde1f0;
  --bh-subtext: #8890aa;
  --bh-hover: rgba(255, 255, 255, 0.06);
  --bh-icon: #8890aa;
  --bh-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  --bh-scrollbar-thumb: rgba(255, 255, 255, 0.12);
  --bh-scrollbar-track: transparent;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1e1e2e;
  --md-primary-fg-color--light: #2a2a3e;
  --md-primary-fg-color--dark: #141420;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  --md-typeset-a-color: #2094f3;
  --bh-bg: #ffffff;
  --bh-border: rgba(0, 0, 0, 0.08);
  --bh-text: #1a1a2e;
  --bh-subtext: #6b7080;
  --bh-hover: rgba(0, 0, 0, 0.04);
  --bh-icon: #9098aa;
  --bh-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --bh-scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --bh-scrollbar-track: transparent;
}

.bh-wrapper {
  position: relative;
}

.bh-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

.bh-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  max-width: calc(100vw - 24px);
  background: var(--bh-bg);
  border: 1px solid var(--bh-border);
  border-radius: 12px;
  box-shadow: var(--bh-shadow);
  z-index: 999;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform-origin: top right;
}

.bh-dropdown.bh-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.bh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 11px;
  border-bottom: 1px solid var(--bh-border);
}

.bh-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bh-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
}

.bh-label svg {
  color: var(--bh-icon);
  flex-shrink: 0;
}

.bh-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: #2094f3;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.15s;
}

.bh-clear:hover {
  opacity: 0.75;
}

.bh-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 5px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--bh-scrollbar-thumb) var(--bh-scrollbar-track);
}

.bh-list::-webkit-scrollbar {
  width: 4px;
}

.bh-list::-webkit-scrollbar-track {
  background: var(--bh-scrollbar-track);
}

.bh-list::-webkit-scrollbar-thumb {
  background: var(--bh-scrollbar-thumb);
  border-radius: 4px;
}

.bh-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  text-decoration: none;
  color: var(--bh-text);
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}

.bh-item:hover {
  background: var(--bh-hover);
  text-decoration: none;
  color: var(--bh-text);
}

.bh-item-icon {
  flex-shrink: 0;
  color: var(--bh-icon);
  display: flex;
  align-items: center;
  opacity: 0.7;
}

.bh-item-text {
  font-size: 0.83rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  font-family: inherit;
}

.bh-empty {
  padding: 18px 15px;
  font-size: 0.82rem;
  color: var(--bh-subtext);
  text-align: center;
  font-family: inherit;
}
