/* =====================
   SEARCH PAGE
   ===================== */
.search-page-content {
  padding-top: 16px;
}

.search-bar-container {
  padding: 0 0 16px 0;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #F4F6F8;
  border-radius: 16px;
  padding: 0 16px;
  height: 48px;
  gap: 10px;
  transition: box-shadow 0.2s, background 0.2s;
}

.search-input-wrapper:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(43, 136, 251, 0.25);
}

.search-icon {
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  color: #0F1B31;
  outline: none;
}

.search-input::placeholder {
  color: #8E8E93;
}

.search-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E5E5EA;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.search-clear-btn:hover {
  background: #D1D1D6;
}

.recent-searches-section {
  padding: 0 0 20px 0;
}

.recent-searches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.recent-searches-header h3 {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #0F1B31;
  margin: 0;
}

.clear-all-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #2B88FB;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.clear-all-btn:hover {
  background: rgba(43, 136, 251, 0.08);
}

.recent-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-search-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #F4F6F8;
  border: 1px solid #E8ECF0;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  color: #3C3C43;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.recent-search-chip:hover {
  background: #EDF0F3;
  border-color: #D1D5DB;
}

.search-tabs {
  display: flex;
  align-items: center;
  height: 52px;
  border-bottom: 1px solid #E8ECF0;
  margin-bottom: 0;
}

.search-tab {
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: #0F1B31;
  opacity: 0.5;
  padding: 8px 4px;
  position: relative;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  height: 100%;
}

.search-tab:hover {
  opacity: 0.7;
}

.search-tab.active {
  color: #0F1B31;
  font-weight: 600;
  opacity: 1;
}

.search-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 3px;
  background: #2B88FB;
  border-radius: 2px 2px 0 0;
}

.search-results {
  min-height: 300px;
}

.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.search-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E8ECF0;
  border-top-color: #2B88FB;
  border-radius: 50%;
  animation: searchSpin 0.8s linear infinite;
}

@keyframes searchSpin {
  to { transform: rotate(360deg); }
}

.search-loading p {
  font-family: inherit;
  font-size: 14px;
  color: #8E8E93;
  margin: 0;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
}

.search-empty p {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #3C3C43;
  margin: 0;
}

.search-empty span {
  font-family: inherit;
  font-size: 14px;
  color: #8E8E93;
}

.search-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
}

.search-prompt p {
  font-family: inherit;
  font-size: 15px;
  color: #8E8E93;
  margin: 0;
}

.search-results-list {
  padding: 0;
}

.search-result-card {
  display: flex;
  padding: 16px;
  margin-bottom: 8px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #F0F1F3;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.search-result-card:last-child {
  margin-bottom: 0;
}

.search-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.search-result-avatar.small {
  width: 32px;
  height: 32px;
}

.search-result-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #666;
}

.search-result-body {
  flex: 1;
  min-width: 0;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.search-result-author {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0F1B31;
}

.search-result-flag {
  font-size: 13px;
}

.search-result-time {
  font-family: inherit;
  font-size: 13px;
  color: #8E8E93;
}

.search-result-meta .meta-dot {
  font-size: 13px;
  color: #8E8E93;
  line-height: 1;
}

.search-result-feeling {
  font-family: inherit;
  font-size: 13px;
  color: #8E8E93;
  text-transform: capitalize;
}

.search-result-content {
  text-decoration: none;
  color: inherit;
  display: block;
}

.search-result-content p {
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  color: #1C1C1E;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-content:hover p {
  color: #2B88FB;
}

.search-result-topic-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #F0F5FF;
  color: #2B88FB;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 8px;
  transition: background 0.15s;
}

.search-result-topic-badge:hover {
  background: #E0EDFF;
}

.search-result-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.action-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 13px;
  color: #8E8E93;
}

.action-stat.support svg {
  color: #4CAF50;
}

.action-stat.oppose svg {
  color: #F44336;
}

.search-topic-card {
  flex-direction: column;
  cursor: pointer;
  border-radius: 12px;
  padding: 16px;
  transition: background 0.15s;
}

.search-topic-card:hover {
  background: #FAFBFC;
}

.search-topic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.search-topic-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-topic-title {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #0F1B31;
  margin: 0 0 4px 0;
  line-height: 22px;
}

.search-topic-desc {
  font-family: inherit;
  font-size: 14px;
  color: #3C3C43;
  line-height: 20px;
  margin: 0 0 8px 0;
}

.search-topic-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #8E8E93;
  margin-bottom: 8px;
}

.search-topic-avatars {
  display: flex;
  align-items: center;
  gap: -4px;
}

.participant-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  margin-left: -6px;
}

.participant-avatar-mini:first-child {
  margin-left: 0;
}

.participant-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-participants {
  font-family: inherit;
  font-size: 12px;
  color: #8E8E93;
  margin-left: 4px;
}

.search-thought-content p {
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  color: #1C1C1E;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-thought-category {
  display: inline-block;
  padding: 3px 10px;
  background: #F3F0FF;
  color: #7C5CFC;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.meta-dot {
  color: #C7C7CC;
  font-size: 13px;
}

.feeling-emoji {
  font-size: 14px;
}

@media (max-width: 768px) {
  .search-input-wrapper {
    height: 44px;
    border-radius: 12px;
    padding: 0 12px;
  }

  .search-tab {
    font-size: 14px;
  }

  .search-result-card {
    padding: 12px 0;
  }
}

/* Support Button Styles */
.support-toggle-btn {
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-toggle-btn.supported svg path {
  fill: #E74C6F;
  stroke: #E74C6F;
}

.support-toggle-btn.supported .count-supported {
  color: #E74C6F;
  font-weight: 600;
}

.support-toggle-btn.support-animate svg {
  animation: supportPulse 0.6s ease;
}

@keyframes supportPulse {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

