/* ══════════════════════════════════════════════════════════════
   BOTRON DYNAMICS — SEARCH MODAL
   Brand Theme: #6c47c4
══════════════════════════════════════════════════════════════ */
:root{
  --brand: #6c47c4;
  --brand-light: rgba(108,71,196,0.12);
  --brand-subtle: rgba(108,71,196,0.08);
}
/* ── Overlay ── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8,12,18,0.60);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal Card ── */
.search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(108,71,196,0.08);
  overflow: hidden;
  transform: translateY(-12px) scale(0.97);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity 0.18s ease;
  opacity: 0;
}

.search-overlay.open .search-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Search Bar ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: var(--rule);
}

.search-bar .material-icons-round {
  color: #6c47c4;
  font-size: 20px;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  caret-color: #6c47c4;
}

.search-bar input::placeholder {
  color: var(--ink-20);
}

/* ── Close Button ── */
.search-close {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--ink-40);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-close:hover {
  background: rgba(108,71,196,0.10);
  color: #6c47c4;
}

/* ── Results Body ── */
.search-body {
  max-height: 420px;
  overflow-y: auto;
  padding: 6px 0;
}

.search-body::-webkit-scrollbar {
  width: 4px;
}

.search-body::-webkit-scrollbar-thumb {
  background: rgba(108,71,196,0.25);
  border-radius: 10px;
}

/* ── Group Labels ── */
.search-group-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink-30);
  padding: 10px 20px 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(108,71,196,0.10);
}

/* ── Result Items ── */
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.search-result:hover,
.search-result.active {
  background: rgba(108,71,196,0.08);
}

/* ── Result Icon ── */
.search-result .sr-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink-40);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.search-result:hover .sr-icon,
.search-result.active .sr-icon {
  background: rgba(108,71,196,0.12);
  color: #6c47c4;
}

/* ── Text ── */
.search-result .sr-text {
  flex: 1;
}

.search-result .sr-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.search-result .sr-name mark {
  background: rgba(108,71,196,0.12);
  color: #6c47c4;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}

.search-result .sr-desc {
  font-size: 11.5px;
  color: var(--ink-40);
  margin-top: 1px;
}

/* ── Arrow ── */
.search-result .sr-arrow {
  font-size: 15px;
  color: var(--ink-20);
  transition: all 0.15s ease;
}

.search-result:hover .sr-arrow,
.search-result.active .sr-arrow {
  color: #6c47c4;
  transform: translateX(3px);
}

/* ── Empty State ── */
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-40);
  font-size: 13.5px;
}

.search-empty .material-icons-round {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
  color: #6c47c4;
  opacity: 0.5;
}

/* ── Footer ── */
.search-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: var(--rule);
  background: var(--surface-2);
}

.search-hints {
  display: flex;
  gap: 14px;
  align-items: center;
}

.s-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-40);
}

.s-key {
  padding: 2px 7px;
  background: var(--white);
  border: var(--rule-strong);
  border-radius: var(--r-xs);
  font-size: 9.5px;
  color: #6c47c4;
}

.s-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #6c47c4;
  font-weight: 600;
}

/* ── Filter Bar Buttons ── */
#bdFilterBar button:hover {
  background: rgba(108,71,196,0.08) !important;
  border-color: rgba(108,71,196,0.25) !important;
  color: #6c47c4 !important;
}

#bdFilterBar button[data-filter].active,
#bdFilterBar button[style*="#6c47c4"] {
  background: #6c47c4 !important;
  border-color: #6c47c4 !important;
  color: #fff !important;
}