/* Block Gemini Sitewide Search ============================================ */

#bgs-search-root { font-family: var(--font-sans, system-ui, sans-serif); }

/* Trigger button (floating, sits next to concierge but only shows on header click) */
.bgs-trigger {
  position: fixed; top: 14px; right: 14px; z-index: 9000;
  display: none;
}

/* Backdrop overlay */
.bgs-overlay {
  position: fixed; inset: 0; z-index: 10010;
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 16px 16px;
  animation: bgsOverlayIn 200ms ease-out;
}
@keyframes bgsOverlayIn { from { opacity: 0; } to { opacity: 1; } }

/* Modal shell */
.bgs-modal {
  width: 100%; max-width: 720px;
  background: linear-gradient(180deg, rgba(15, 22, 34, 0.98), rgba(8, 14, 22, 0.98));
  border: 1px solid rgba(79, 200, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 96px);
  overflow: hidden;
  animation: bgsModalIn 280ms cubic-bezier(.2,.8,.2,1);
}
@keyframes bgsModalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* Search input row */
.bgs-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(79,200,255,0.04), transparent);
}
.bgs-input-row svg { width: 20px; height: 20px; color: rgba(79,200,255,0.85); flex: 0 0 auto; }
.bgs-input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: #ECF3FA; font-size: 18px; line-height: 1.4;
  font-family: inherit;
}
.bgs-input::placeholder { color: rgba(255,255,255,0.35); }
.bgs-kbd {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

/* Status / loading */
.bgs-status {
  padding: 10px 18px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.06em;
  color: rgba(79,200,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; gap: 10px;
}
.bgs-status .bgs-bar {
  flex: 1; height: 2px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden;
}
.bgs-status .bgs-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #4FC8FF, #5EFFA4);
  transition: width 200ms ease-out;
}

/* Results list */
.bgs-results {
  flex: 1; overflow-y: auto;
  padding: 8px;
}
.bgs-results::-webkit-scrollbar { width: 8px; }
.bgs-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

.bgs-group-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  padding: 12px 14px 6px;
  text-transform: uppercase;
}

.bgs-result {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms;
  color: inherit;
}
.bgs-result:hover, .bgs-result.bgs-active {
  background: linear-gradient(180deg, rgba(79,200,255,0.08), rgba(79,200,255,0.04));
  outline: 1px solid rgba(79,200,255,0.22);
}
.bgs-result-icon {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(79,200,255,0.1);
  border: 1px solid rgba(79,200,255,0.22);
  display: flex; align-items: center; justify-content: center;
  color: #4FC8FF;
}
.bgs-result-icon svg { width: 18px; height: 18px; }
.bgs-result-body { flex: 1; min-width: 0; }
.bgs-result-title {
  color: #ECF3FA;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.bgs-result-cat {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.06em;
  color: rgba(94,255,164,0.85);
  background: rgba(94,255,164,0.08);
  border: 1px solid rgba(94,255,164,0.2);
  padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase;
}
.bgs-result-snippet {
  color: rgba(255,255,255,0.6);
  font-size: 13px; line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.bgs-result-snippet mark {
  background: rgba(94,255,164,0.18);
  color: #5EFFA4;
  border-radius: 2px;
  padding: 0 2px;
}
.bgs-result-arrow {
  align-self: center;
  color: rgba(255,255,255,0.25);
  flex: 0 0 auto;
}
.bgs-result.bgs-active .bgs-result-arrow { color: #4FC8FF; }

/* Empty / no results */
.bgs-empty {
  padding: 36px 24px;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}
.bgs-empty b { color: #ECF3FA; display: block; font-size: 16px; margin-bottom: 6px; }

/* Footer / tips */
.bgs-foot {
  padding: 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  color: rgba(255,255,255,0.4);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.bgs-foot .bgs-kbd { font-size: 10px; }
.bgs-foot-spacer { flex: 1; }
.bgs-foot-link {
  color: rgba(79,200,255,0.7); cursor: pointer;
  text-decoration: none;
}
.bgs-foot-link:hover { color: #5EFFA4; }

/* Inline trigger button (for use in nav) */
.bgs-nav-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 160ms;
}
.bgs-nav-trigger:hover {
  border-color: rgba(79,200,255,0.4);
  color: #ECF3FA;
  background: rgba(79,200,255,0.06);
}
.bgs-nav-trigger svg { width: 14px; height: 14px; }
.bgs-nav-trigger .bgs-kbd { font-size: 9.5px; padding: 2px 5px; margin-left: 4px; }

/* Compact nav button */
.nav-search-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px; font-family: inherit;
  cursor: pointer;
  transition: all 160ms;
}
.nav-search-btn:hover {
  border-color: rgba(79,200,255,0.4);
  color: #ECF3FA;
  background: rgba(79,200,255,0.06);
}
.nav-search-kbd {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  padding: 1px 4px;
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}
@media (max-width: 980px) {
  .nav-search-btn .nav-search-kbd { display: none; }
}

@media (max-width: 600px) {
  .bgs-overlay { padding: 12px; }
  .bgs-modal { max-height: calc(100vh - 24px); }
  .bgs-input { font-size: 16px; }
  .bgs-kbd { display: none; }
  .bgs-foot .bgs-kbd { display: inline-block; }
  .bgs-nav-trigger .bgs-kbd { display: none; }
}
