/* Search Input */
/* =========================
   SEARCH BAR (HOME / EXPLORE)
========================= */

.search-container {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  z-index: 1400;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Основний “скляний” бар */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--search-bg, rgba(6, 10, 40, 0.96));
  border: 1px solid var(--surface-border, rgba(255,255,255,0.18));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(18px);
}

.search-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  opacity: 0.8;
  object-fit: contain;
}

.search-icon-button {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.search-icon-button:focus {
  outline: none;
}


.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text, #fff);
  font-size: 0.9rem;
}

.search-input::placeholder {
  color: var(--text-muted, rgba(255,255,255,0.6));
}

.search-bar:focus-within {
  background: var(--search-bg-focus, rgba(255,255,255,0.18));
}

/* Icon does NOT change on input focus */
.search-bar:focus-within .search-icon {
  color: inherit; /* overrides global.css focus-within color change */
  opacity: 0.8; /* stays same as default */
}

/* Icon turns blue only when button itself is clicked */
.search-icon-button:active .search-icon,
.search-icon-button:active svg {
  color: #4f7cff;
  opacity: 1;
}

/* Рядок “чіпів” під баром */
.search-shortcuts {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.shortcut-pill {
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border, rgba(255,255,255,0.24));
  background: var(--search-bg, rgba(6,10,40,0.88));
  color: var(--text-muted, rgba(255,255,255,0.8));
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.shortcut-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

@media (max-width: 700px) {
  .search-container {
    width: calc(100% - 32px);
  }
}
