.global-search-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.global-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.global-search-trigger:hover {
  color: var(--bharat-primary);
  border-color: var(--bharat-primary-muted);
  background: var(--bharat-primary-light);
}

.global-search-trigger:focus-visible {
  outline: 2px solid var(--bharat-primary);
  outline-offset: 2px;
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  padding-top: 4.5rem;
  background: rgb(17 24 39 / 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.global-search-overlay[hidden] {
  display: none !important;
}

.global-search-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.global-search-panel {
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  transform: translateY(-16px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.global-search-overlay.is-open .global-search-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.global-search-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.global-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.global-search-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.global-search-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--bharat-primary);
  box-shadow: 0 0 0 3px rgb(var(--bharat-primary-rgb) / 0.15);
}

/* Avoid extra browser “clear” control on type=search (looks like a second icon) */
.global-search-input::-webkit-search-cancel-button,
.global-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.global-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
}

.global-search-close:hover {
  color: #111827;
  background: #f3f4f6;
}

.global-search-body {
  max-height: min(28rem, calc(100vh - 10rem));
  overflow-y: auto;
}

.global-search-status {
  padding: 2rem 1rem;
  font-size: 0.875rem;
  text-align: center;
  color: #6b7280;
}

.global-search-status.is-error {
  color: #dc2626;
}

.global-search-group + .global-search-group {
  border-top: 1px solid #f3f4f6;
}

.global-search-group-label {
  padding: 0.625rem 1rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.global-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.global-search-item .biz-verified {
  pointer-events: none;
}

.global-search-item:hover,
.global-search-item.is-active {
  background: #f8fafc;
}

.global-search-item:hover .global-search-item-title,
.global-search-item.is-active .global-search-item-title {
  color: var(--bharat-primary);
}

.global-search-item-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.global-search-item-logo-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.global-search-item-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.global-search-item-icon svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  overflow: visible;
}

.global-search-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.global-search-item-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
  transition: color 0.15s ease;
}

.global-search-item-subtitle {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #374151;
}

.global-search-footer {
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

.global-search-ai-note {
  margin: 0;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #9a3412;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
  border-bottom: 1px solid #ffedd5;
}

.global-search-overlay--ai .global-search-panel {
  box-shadow: 0 25px 50px -12px rgb(234 88 12 / 0.18), 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.global-search-overlay--ai .global-search-input-wrap {
  border-color: #fdba74;
}

.global-search-group--recommended .global-search-group-label {
  color: #c2410c;
}

.global-search-group--more {
  border-top: 1px solid #f3f4f6;
  padding-top: 0.35rem;
}

.global-search-group--more .global-search-group-label {
  color: #6b7280;
}

.global-search-item--recommended {
  background: #fff;
  border: 1px solid #e5e7eb;
}

.global-search-item--recommended.is-active,
.global-search-item--recommended:hover {
  background: #fff;
  border-color: #e5e7eb;
}

.global-search-item--bbd-trusted {
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

@media (min-width: 640px) {
  .global-search-overlay {
    padding-top: 5.5rem;
  }
}
