/* recent-searches.css - 最近搜索区域样式（仿 KREAM） */

.recent-searches-section {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px 0 0;
}

.recent-searches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.recent-searches-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.recent-searches-clear {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.15s;
}

.recent-searches-clear:hover {
  color: var(--text);
}

.recent-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-search-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #ebebeb;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  max-width: 250px;
}

.recent-search-tag:hover {
  border-color: #222;
  background: #fafafa;
}

.recent-search-tag-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  line-height: 30px;
}

.recent-search-tag-main {
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-search-tag-cn {
  font-size: 11px;
  color: var(--muted, #9a9a9a);
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.recent-search-tag-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.recent-search-tag-delete:hover {
  opacity: 1;
}

.recent-search-tag-delete svg {
  width: 12px;
  height: 12px;
}

/* 空状态 */
.recent-searches-empty {
  font-size: 13px;
  color: var(--muted, #9a9a9a);
  text-align: center;
  padding: 20px 0;
}

/* 响应式 */
@media (max-width: 640px) {
  .recent-searches-section {
    padding: 16px 12px 0;
  }

  .recent-searches-title {
    font-size: 14px;
  }

  .recent-searches-clear {
    font-size: 12px;
  }

  .recent-search-tag {
    height: 28px;
    padding: 0 8px;
    gap: 3px;
  }

  .recent-search-tag-text {
    font-size: 12px;
    max-width: 150px;
  }
}
