/* ─── Search page wrapper ─────────────────────────────── */
.search-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* ─── Search input ────────────────────────────────────── */
.search-input-wrap {
  margin-bottom: 20px;
}
.search-input-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-icon {
  position: absolute;
  left: 20px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 1rem;
  pointer-events: none;
}
.search-input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 14px 52px 14px 50px;
  color: #fff;
  font-size: 1.05rem;
  outline: none;
  transition:
    border-color 0.15s,
    background 0.15s;
  font-family: inherit;
}
.search-input-field::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.search-input-field:focus {
  border-color: #f5c518;
  background: rgba(255, 255, 255, 0.1);
}
.search-input-clear {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s;
  display: none;
}
.search-input-clear:hover {
  color: #fff;
}

/* ─── Controls row (tabs + filters on one line) ───────── */
.search-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* ─── Tabs ────────────────────────────────────────────── */
.search-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  font-family: inherit;
  text-decoration: none;
}
.search-tab:hover {
  background: rgba(245, 197, 24, 0.15);
  border-color: #f5c518;
  color: #f5c518;
  text-decoration: none;
}
.search-tab.active {
  background: #f5c518;
  border-color: #f5c518;
  color: #111;
}

/* ─── Filter bar ──────────────────────────────────────── */
.search-filters {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-filters.visible {
  display: flex;
}
.search-filter-select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  padding: 5px 14px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.15s,
    color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
}
.search-filter-select:hover,
.search-filter-select:focus {
  border-color: #f5c518;
  color: #fff;
}
.search-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-filter-arrow {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.65rem;
}
.search-filter-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.42);
  font-family: "Josefin Sans", sans-serif;
  letter-spacing: 0.5px;
}

/* ─── Results container ───────────────────────────────── */
#search-results {
  min-height: 200px;
}

/* ─── Empty / initial state ───────────────────────────── */
.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.38);
}
.search-empty i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
  color: rgba(255, 255, 255, 0.18);
}
.search-empty p {
  margin: 0;
  font-size: 0.9rem;
}

/* ─── Trending content in empty state ────────────────────── */
.search-trending {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}
.search-trending-heading {
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f5c518;
  margin: 0 0 16px;
}
.search-trending-heading i {
  font-size: 0.72rem;
  display: inline;
  margin-right: 4px;
  color: #f5c518;
}
.search-trending-label {
  display: block;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}
.search-trending-section {
  margin-bottom: 20px;
}
.search-trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.12s;
}
.search-trending-item:hover {
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.search-trending-thumb {
  width: 56px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.search-trending-title {
  flex: 1;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-trending-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* ─── Section headers (All tab) ───────────────────────── */
.search-section {
  margin-bottom: 32px;
}
.search-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.search-section-title {
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}
.search-section-count {
  color: var(--c-gold, #f5c518);
}
.search-section-viewall {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s;
}
.search-section-viewall:hover {
  color: #f5c518;
  text-decoration: none;
}

/* ─── Result cards ────────────────────────────────────── */
.sr-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  border-radius: 6px;
}
.sr-card:last-child {
  border-bottom: none;
}
.sr-card:hover {
  color: inherit;
  text-decoration: none;
}
.sr-card:hover .sr-title {
  color: #f5c518;
}

.sr-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
}
.sr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.sr-thumb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 3px;
}
.sr-thumb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sr-thumb-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(245, 197, 24, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5c518;
  font-size: 1rem;
  margin-top: 3px;
}
.sr-thumb-photo {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.sr-thumb-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sr-body {
  flex: 1;
  min-width: 0;
}
.sr-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.12s;
}
.sr-excerpt {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sr-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.38);
}
.sr-meta i {
  font-size: 0.68rem;
}
.sr-context {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-context i {
  font-size: 0.72rem;
  margin-right: 3px;
}

/* ─── Skeleton cards ──────────────────────────────────── */
.sr-skeleton {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sk-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  animation: sk-pulse 1.5s ease-in-out infinite;
}
.sk-line {
  height: 13px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  animation: sk-pulse 1.5s ease-in-out infinite;
  margin-bottom: 8px;
}
.sk-line.w80 {
  width: 80%;
}
.sk-line.w60 {
  width: 60%;
}
.sk-line.w40 {
  width: 40%;
}
@keyframes sk-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ─── Load more / infinite scroll ────────────────────── */
.search-load-more {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}
.search-loading-spinner {
  display: none;
  justify-content: center;
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.88rem;
}
.search-loading-spinner.visible {
  display: flex;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 576px) {
  .search-page {
    padding: 20px 12px 48px;
  }
  .search-input-field {
    font-size: 0.95rem;
    padding: 12px 48px 12px 46px;
  }
  .sr-thumb {
    width: 96px;
    height: 54px;
  }
}
