.ht-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 40;
  display: none;
  max-height: 18rem;
  overflow: auto;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border, 240 4% 16%));
  background: hsl(var(--background, 282 40% 7%) / 0.96);
  padding: 0.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.ht-search-results.is-open { display: block; }
.hide-scrollbar { scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Flag emoji rendering fix */
.flag-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Android Emoji", sans-serif;
  font-size: 1em;
  line-height: 1;
  display: inline-block;
}

.ht-cat-bar {
  /* Remove sticky so category bar scrolls away with content */
  position: relative;
  z-index: 8;
  padding: 0.5rem 0;
  background: transparent;
}

/* Fix for homepage category pills (ht-cat-scroller buttons) background clipping */
.ht-cat-bar {
  /* Ensure parent doesn't clip the scroller's children */
  overflow: visible !important;
}

#ht-cat-scroller {
  /* Remove overflow clipping - let buttons render fully with rounded corners */
  overflow-x: auto !important;
  overflow-y: visible !important;
  /* Ensure scrollbar doesn't affect layout */
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--border)) transparent;
  /* Add padding bottom to prevent background clipping on rounded corners */
  padding-bottom: 0.75rem !important;
  margin-bottom: -0.75rem !important;
  /* Prevent parent from clipping */
  contain: layout;
  /* Ensure flex items don't shrink */
  flex-shrink: 0;
}

#ht-cat-scroller button {
  /* Ensure background colors extend fully to rounded-full corners */
  background-clip: padding-box !important;
  /* Minimum height to ensure rounded-full renders properly - increased from 2.5rem */
  min-height: 2.75rem !important;
  line-height: 1.5rem !important;
  /* Prevent text clipping */
  white-space: nowrap !important;
  /* Ensure proper rendering of rounded backgrounds */
  flex-shrink: 0 !important;
  /* Force background to render to edges */
  background-origin: padding-box !important;
  /* Remove border that can cause clipping on rounded-full */
  border: none !important;
  /* Increase padding for better rounded-full rendering */
  padding-top: 0.625rem !important;  /* 10px */
  padding-bottom: 0.625rem !important; /* 10px */
  padding-left: 1rem !important;      /* 16px */
  padding-right: 1rem !important;     /* 16px */
}

#ht-cat-scroller button[class*="bg-secondary"],
#ht-cat-scroller button.bg-secondary {
  /* Active pill - ensure background covers full rounded area */
  background-color: hsl(var(--secondary)) !important;
  color: hsl(var(--secondary-foreground)) !important;
}

#ht-cat-scroller button[class*="bg-muted"],
#ht-cat-scroller button.bg-muted {
  /* Inactive pill - ensure background covers full rounded area */
  background-color: hsl(var(--muted)) !important;
  color: hsl(var(--muted-foreground)) !important;
}

/* Also target pills by their Tailwind classes directly */
#ht-cat-scroller button.rounded-full {
  /* Ensure all rounded-full buttons in scroller have proper background rendering */
  background-clip: padding-box !important;
  min-height: 2.75rem !important;
  border: none !important;
  padding-top: 0.625rem !important;
  padding-bottom: 0.625rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Webkit scrollbar styling for category scroller */
#ht-cat-scroller::-webkit-scrollbar {
  height: 4px;
}
#ht-cat-scroller::-webkit-scrollbar-track {
  background: transparent;
}
#ht-cat-scroller::-webkit-scrollbar-thumb {
  background-color: hsl(var(--border));
  border-radius: 2px;
}

.ht-cat-hidden { display: none !important; }
.ht-banner-slide img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  color: transparent;
}
