/* Alexandria Globe — shared CSS
   NOTE: To preserve 1:1 visuals, most layout/theme CSS stays in each mode's CSS (investor/scholar/traveler),
   extracted from your original single-file pages.
*/
html, body { height: 100%; }

/* ===== Global AI Search Bar ===== */
.global-ai-search-container {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 48;
  width: min(540px, 90vw);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

body.landing-active .global-ai-search-container,
#landing-page:not(.hidden) ~ .global-ai-search-container {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-50%) translateY(-10px) !important;
}

.global-ai-search-container:not(.hidden-on-landing) {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.ai-search-box {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.ai-search-box:hover, .ai-search-box:focus-within {
  background: rgba(15, 15, 18, 0.85);
  border-color: rgba(203, 179, 122, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(203, 179, 122, 0.1);
}

/* Results modal must also override pointer-events: none from the container */
#ai-search-results {
  pointer-events: auto;
}

.ai-search-icon {
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  transition: color 0.3s;
}

.ai-search-box:focus-within .ai-search-icon {
  color: #cbb37a;
}

#ai-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.03em;
}

#ai-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ai-search-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s;
}

.ai-search-btn:hover {
  background: #cbb37a;
  border-color: #cbb37a;
  color: #000;
  transform: scale(1.05);
}

/* White mode support */
html.white-mode .ai-search-box {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}
html.white-mode .ai-search-box:hover, html.white-mode .ai-search-box:focus-within {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(123, 163, 203, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(123, 163, 203, 0.1);
}
html.white-mode .ai-search-icon { color: rgba(0, 0, 0, 0.3); }
html.white-mode .ai-search-box:focus-within .ai-search-icon { color: #7ba3cb; }
html.white-mode #ai-search-input { color: #000; }
html.white-mode #ai-search-input::placeholder { color: rgba(0, 0, 0, 0.3); }
html.white-mode .ai-search-btn {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.5);
  border-color: rgba(0, 0, 0, 0.1);
}
html.white-mode .ai-search-btn:hover {
  background: #7ba3cb;
  border-color: #7ba3cb;
  color: #fff;
}
