/* Search layout improvements */

/* Position the search container to appear below the search toggle */
.search-container {
  display: none !important; /* Force hidden by default */
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  margin-top: 8px;
  z-index: 100;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px;
}

/* Active state for search container */
.search-container.active {
  display: flex !important; /* Force visible when active */
}

/* Make sure the search toggle is properly positioned */
.search-toggle {
  margin-left: 12px;
  position: relative;
  z-index: 101; /* Above the search container */
  cursor: pointer;
}

/* Ensure the trending container has proper layout */
.trending-container {
  display: flex;
  align-items: center;
  position: relative;
  flex-wrap: nowrap;
}

/* Ensure the trending tags list doesn't push the search toggle off */
.trending-tags-list {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding-bottom: 4px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.trending-tags-list::-webkit-scrollbar {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-container {
    width: 100%;
    right: 0;
    left: 0;
    top: calc(100% + 8px);
  }
}