/* ============================================
   hashtags.css — tappable #tags, the hashtag screen, Search's Hashtags and
   Stickers, and New Post's "Hashtags from your caption" (Oct 2026)
   ============================================ */

/* ---- #tags in captions and the tag line (hashtags.js) ---- */
.sb-hashtag-link {
  color: #14B8A6;
  cursor: pointer;
  font-weight: 600;
}
.sb-hashtag-link:hover,
.sb-hashtag-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* The round lavender # */
.sb-hashtag-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F1ECFD;
  color: #5B2FC4;
  font-family: var(--font-display), Poppins, sans-serif;
  font-weight: 700;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-hashtag-badge--big {
  width: 64px;
  height: 64px;
  font-size: 29px;
}

/* ---- One hashtag's screen ---- */
.sb-hashtag-view {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 0 48px;
}
.sb-hashtag-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px 14px;
}
.sb-hashtag-head-text { min-width: 0; }
.sb-hashtag-title {
  margin: 0;
  font-family: var(--font-display), Poppins, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-hashtag-count {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.sb-hashtag-sort {
  display: inline-flex;
  margin: 0 16px 14px;
  padding: 3px;
  border-radius: 10px;
  background: var(--color-canvas-subtle, #f4f4f5);
  border: 1px solid var(--color-border, #e4e4e7);
}
.sb-hashtag-sort button {
  border: none;
  background: none;
  padding: 6px 18px;
  border-radius: 8px;
  font-family: var(--font-display), Poppins, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
}
.sb-hashtag-sort button.active {
  background: var(--color-canvas, #fff);
  color: var(--color-text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.sb-hashtag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.sb-hashtag-tile {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: none;
  background: #e4e4e7;
  overflow: hidden;
  cursor: pointer;
}
.sb-hashtag-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sb-hashtag-tile--loading {
  cursor: default;
  animation: sb-hashtag-pulse 1.2s ease-in-out infinite;
}
@keyframes sb-hashtag-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.sb-hashtag-tile-likes {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.sb-hashtag-tile-likes svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); }
.sb-hashtag-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 40px 16px;
}
.sb-hashtag-retry {
  margin-top: 10px;
  border: none;
  background: none;
  color: var(--color-purple, #6D28D9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sb-hashtag-sentinel { height: 1px; }
.sb-hashtag-related-head { padding: 22px 16px 10px; }
.sb-hashtag-related-title {
  font-family: var(--font-display), Poppins, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.sb-hashtag-related-sub {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
@media (min-width: 769px) {
  .sb-hashtag-grid { gap: 4px; padding: 0 16px; }
  .sb-hashtag-tile { border-radius: 6px; }
}

/* The posts as a feed: "Back to #tag" stays at the top while scrolling */
.sb-hashtag-feed .profile-post-feed-back-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--color-canvas, #fff);
  padding: 10px 16px;
}
.sb-hashtag-feed .profile-post-feed-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-display), Poppins, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  cursor: pointer;
}

/* ---- Search: Popular hashtags, Hashtags, Stickers ---- */
.search-popular { margin-bottom: 14px; }
.search-popular-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.search-popular-chip {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  background: #F1ECFD;
  color: #5B2FC4;
  font-family: var(--font-display), Poppins, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.search-popular-chip:hover { background: #E6DDFB; }
.search-extra .search-section-label { margin-top: 18px; }
.search-hashtag-list { display: flex; flex-direction: column; }
.search-hashtag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}
.search-hashtag-text { display: flex; flex-direction: column; min-width: 0; }
.search-hashtag-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-hashtag-count { font-size: 13px; color: var(--color-text-muted); }
.search-stickers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-see-all {
  margin-top: 18px;
  border: none;
  background: none;
  color: var(--color-purple, #6D28D9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.search-sticker-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0 12px;
  scrollbar-width: none;
}
.search-sticker-row::-webkit-scrollbar { display: none; }
.search-sticker-tile {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}
.search-sticker-art {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background: #F6F5FA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.search-sticker-art img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}
.search-sticker-art--all {
  flex-direction: column;
  gap: 6px;
  background: #F1ECFD;
  color: var(--color-purple, #6D28D9);
  font-size: 12px;
  font-weight: 600;
}
.search-see-all-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-purple, #6D28D9);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-sticker-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-sticker-name--muted { color: var(--color-text-muted); }
.search-sticker-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.search-coin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F5B301;
  display: inline-block;
}

/* ---- New Post: Hashtags from your caption ---- */
.np-caption-tags { margin-top: 12px; }
.np-caption-tags-head {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #71717A;
}
.np-caption-tags-count { color: #A1A1AA; }
.np-caption-tags-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #A1A1AA;
}
.np-caption-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.np-caption-tag {
  background: #F1ECFD;
  color: #5B2FC4;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  white-space: nowrap;
}
