/* 搜索页 —— 只用 tokens.css 的变量，类名统一 sv- 前缀 */

.sv {
  padding: 6px 0 8px;
  background: var(--bg-page);
}

/* ============ 顶部搜索区 ============ */
.sv-top {
  padding: 6px 18px 16px;
}

.sv-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sv-field:hover { border-color: var(--border-strong); }

.sv-field:focus-within {
  border-color: var(--primary);
  background: var(--bg-surface);
}

.sv-field__ico {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  opacity: 0.7;
}

.sv-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border: 0;
  outline: none;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}

.sv-input::placeholder { color: var(--text-muted); font-weight: 500; }

/* 原生 search 的清除按钮样式不统一，自己画一个 */
.sv-input::-webkit-search-cancel-button,
.sv-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

.sv-clear {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  background: var(--bg-surface-muted);
}

.sv-clear:hover { color: var(--text); background: var(--hover-overlay); }

.sv-meta {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.sv-note {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.sv-hint {
  padding: 40px 18px 60px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ 热门标签 ============ */
.sv-hot { padding: 2px 18px 40px; }

.sv-hot__title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-muted);
}

.sv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-2);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.sv-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--hover-overlay);
}

.sv-chip__label { line-height: 1; }

.sv-chip__count {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============ 空态 ============ */
.sv-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 18px 120px;
  text-align: center;
}

.sv-empty__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.sv-empty__hint {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.sv-empty .sv-chips { justify-content: center; }

/* ============ 窄屏 ============ */
@media (max-width: 760px) {
  .sv-top { padding: 4px 12px 12px; }

  .sv-field {
    height: 40px;
    padding: 0 12px;
  }

  .sv-input { font-size: 13px; }

  .sv-hot { padding: 0 12px 32px; }

  .sv-chip {
    padding: 6px 12px;
    font-size: 11px;
  }

  .sv-chip__count { font-size: 9px; }

  .sv-empty { padding: 48px 16px 96px; }
}
