/* Global Search — premium UI (hardened against theme/Bootstrap) */
#gs-global-search,
.gs-root {
  --gs-blue: #1a73e8;
  --gs-blue-dark: #1558b0;
  --gs-red: #e11d2e;
  --gs-ink: #1a1f2c;
  --gs-muted: #64748b;
  --gs-line: #e5e7eb;
  --gs-accent: #e11d2e;
  --gs-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
  --gs-shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  font-family: Lato, "Segoe UI", system-ui, -apple-system, sans-serif !important;
}

#gs-global-search *,
.gs-root * {
  box-sizing: border-box;
}

/* ===== Homepage hero (compact, left column) ===== */
.gs-hero {
  position: relative;
  /*
   * Keep the search above homepage content, but below the fixed header.
   * The previous 10050 value caused it to paint over a wrapped/sticky
   * header on both desktop and mobile.
   */
  z-index: 20 !important;
  margin: 0 0 10px !important;
  padding: 10px 12px 12px !important;
  border-radius: 12px !important;
  overflow: visible !important;
  background:
    linear-gradient(120deg, #eef5ff 0%, #f7faff 45%, #fff5f6 100%) !important;
  border: 1px solid #dce7f5 !important;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.08) !important;
  text-align: left !important;
}

.gs-hero--inline {
  width: 100% !important;
  max-width: 100% !important;
}

.gs-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  /* background: linear-gradient(180deg, #1a73e8, #3b82f6); */
  pointer-events: none;
}

.gs-hero-inner {
  position: relative;
  z-index: 21;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.gs-hero-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.gs-hero-kicker {
  display: none;
}

.gs-hero-title {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  color: var(--gs-ink) !important;
  text-align: left !important;
}

.gs-hero-sub {
  margin: 0 !important;
  max-width: none;
  color: var(--gs-muted) !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  text-align: left !important;
  font-weight: 500;
}

.gs-root--home {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 22 !important;
  text-align: left !important;
}

/* Homepage-only search bar look */
.gs-root--home .gs-bar {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%) !important;
  border: 1px solid #b8d0f0 !important;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.14) !important;
}

.gs-root--home .gs-bar:focus-within {
  border-color: #1a73e8 !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.16), 0 8px 22px rgba(26, 115, 232, 0.18) !important;
}

.gs-root--results {
  width: 100% !important;
  position: relative !important;
  z-index: 40 !important;
}

.gs-form {
  position: relative !important;
  margin: 0 !important;
  display: block !important;
}

/* ===== Search pill ===== */
#gs-global-search .gs-bar,
.gs-root .gs-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 5px 5px 5px 14px !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#gs-global-search .gs-bar:focus-within,
.gs-root .gs-bar:focus-within {
  border-color: rgba(26, 115, 232, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12), 0 8px 20px rgba(26, 115, 232, 0.12) !important;
}

.gs-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  flex: 0 0 auto !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  float: none !important;
  position: static !important;
}

.gs-city-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #b91c1c !important;
  background: #fff1f2 !important;
  border: 1px solid #fecaca !important;
  border-radius: 999px !important;
  padding: 5px 9px !important;
}

#gs-global-search .gs-input,
.gs-root .gs-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 15px !important;
  line-height: 36px !important;
  color: var(--gs-ink) !important;
  float: none !important;
  display: block !important;
}

#gs-global-search .gs-input::placeholder,
.gs-root .gs-input::placeholder {
  color: #94a3b8 !important;
}

#gs-global-search .gs-submit,
.gs-root .gs-submit {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 84px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #1a73e8 0%, #1558b0 100%) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  cursor: pointer !important;
  float: none !important;
  box-shadow: 0 6px 14px rgba(26, 115, 232, 0.28) !important;
  transition: transform 0.12s ease, filter 0.12s ease;
}

#gs-global-search .gs-submit:hover,
.gs-root .gs-submit:hover {
  filter: brightness(1.05);
  color: #fff !important;
  text-decoration: none !important;
}

#gs-global-search .gs-submit:active,
.gs-root .gs-submit:active {
  transform: scale(0.98);
}

/* ===== Dropdown ===== */
.gs-dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18) !important;
  border: 1px solid #e8edf3 !important;
  overflow: hidden !important;
  z-index: 30 !important;
  text-align: left !important;
}

.gs-dropdown[hidden] {
  display: none !important;
}

.gs-dropdown-inner {
  max-height: min(420px, 70vh);
  overflow-y: auto;
  padding: 8px 0;
}

.gs-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 10px 18px 6px;
}

.gs-item,
.gs-completion {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 16px !important;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit !important;
  transition: background 0.12s ease;
}

.gs-item:hover,
.gs-item.is-active,
.gs-completion:hover,
.gs-completion.is-active {
  background: #f8fafc !important;
}

.gs-item-thumb {
  width: 50px !important;
  height: 50px !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  background: #eef2f7 !important;
  flex: 0 0 auto !important;
}

.gs-item-mid {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.gs-item-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--gs-ink) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-item-meta {
  font-size: 12px !important;
  color: var(--gs-muted) !important;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-item-badge {
  flex: 0 0 auto !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.gs-item-badge--articles {
  background: #fff7ed !important;
  color: #c2410c !important;
}

.gs-completion-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}

.gs-empty {
  padding: 20px 18px;
  text-align: center;
  color: var(--gs-muted);
  font-size: 13px;
}

.gs-mark {
  font-weight: 800;
  color: #1558b0;
  background: transparent;
}

/* ===== Results page (inside site template) ===== */
.gs-page {
  background: linear-gradient(180deg, #f3f6fb 0%, #eef2f7 40%, #f7f8fa 100%);
  min-height: 420px;
  padding: 12px 0 40px;
}

.gs-page .page-content {
  background: transparent !important;
  margin-top: 8px;
}

.gs-breadcrumb.breadcrumb {
  margin-top: 18px !important;
  margin-bottom: 16px !important;
  background: transparent !important;
  padding-left: 0 !important;
}

.gs-location-banner {
  margin: 12px 0 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 13px;
}

.gs-location-banner--warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.gs-location-hint {
  color: #64748b;
  font-weight: 500;
}

.gs-results-shell {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 18px 18px 8px;
  margin-bottom: 16px;
  margin-top: 4px;
}

.gs-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e8edf3;
  margin: 14px 0 8px;
  overflow-x: auto;
}

.gs-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none !important;
  display: inline-block;
  font-weight: 600;
}

.gs-tab:hover {
  color: #0f172a;
}

.gs-tab.is-active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

.gs-meta-line {
  color: #64748b;
  font-size: 13px;
  margin: 10px 0 14px;
}

.gs-feed {
  min-height: 120px;
}

.gs-result {
  display: flex !important;
  gap: 16px;
  padding: 16px 8px;
  border-bottom: 1px solid #eef2f7;
  transition: background 0.15s ease;
}

.gs-result:hover {
  background: #f8fbff;
}

.gs-result-img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  background: #eef2f7;
  flex-shrink: 0;
}

.gs-result-body {
  min-width: 0;
  flex: 1;
}

.gs-result-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.gs-result-title a {
  color: #1a0dab !important;
  text-decoration: none !important;
}

.gs-result-title a:hover {
  text-decoration: underline !important;
}

.gs-result-url {
  font-size: 13px;
  color: #006621;
  margin-bottom: 6px;
  word-break: break-all;
}

.gs-result-desc {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 8px;
}

.gs-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #64748b;
}

.gs-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 11px;
}

.gs-badge--articles {
  background: #fff7ed;
  color: #c2410c;
}

.gs-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: #64748b;
}

.gs-alert {
  background: #fff7ed;
  color: #9a3412;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  border: 1px solid #fed7aa;
}

.gs-loading {
  text-align: center;
  padding: 18px;
  color: #64748b;
  font-size: 13px;
}

.gs-loading[hidden] {
  display: none !important;
}

.gs-end {
  text-align: center;
  padding: 16px;
  color: #94a3b8;
  font-size: 12px;
}

.gs-inline-ad {
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}

@media (max-width: 767px) {
  .gs-hero {
    padding: 10px 10px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
  }

  .gs-hero-title {
    font-size: 16px !important;
  }

  .gs-hero-sub {
    font-size: 12px !important;
  }

  .gs-city-chip {
    display: none !important;
  }

  #gs-global-search .gs-bar,
  .gs-root .gs-bar {
    min-height: 44px !important;
    padding-left: 12px !important;
  }

  #gs-global-search .gs-submit,
  .gs-root .gs-submit {
    min-width: 72px !important;
    padding: 0 12px !important;
  }

  .gs-dropdown {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 70vh;
  }

  .gs-result-img {
    width: 72px;
    height: 60px;
  }

  .gs-result-title {
    font-size: 16px;
  }
}
