/*
 * Apexfito — Blog toolbar dark surface fix (D2 PERFORMANCE)
 * 修复 blog-enhance.css 遗留的浅色块：搜索栏、分类按钮、移动端分类下拉。
 * 加载于 apxfito-design-system.css 之后（wp_head priority 1010），可压过 blog-enhance.css。
 * 回滚：删除本文件 + apx-blog-dark.php 即恢复原状。
 */

/* ── 工具栏容器：浅色渐变 → 深面板 ───────────────────────────── */
body.apx-d2 .apx-blog-toolbar {
  background: var(--apx-panel) !important;
  background-image: none !important;
  border: 1px solid var(--apx-rule) !important;
}

/* ── 搜索框：白底 → 深底 + 细描边 ───────────────────────────── */
body.apx-d2 .apx-blog-search form {
  background: var(--apx-bg) !important;
  border: 1px solid var(--apx-rule) !important;
}
body.apx-d2 .apx-blog-search form:focus-within {
  border-color: var(--apx-brand) !important;
  box-shadow: 0 0 0 3px rgba(255, 45, 0, 0.15) !important;
}
body.apx-d2 .apx-search-icon {
  color: var(--apx-muted) !important;
}
body.apx-d2 .apx-blog-search input[type="search"] {
  background: transparent !important;
  color: var(--apx-ink) !important;
  -webkit-appearance: none;
  appearance: none;
}
body.apx-d2 .apx-blog-search input[type="search"]::placeholder {
  color: var(--apx-muted) !important;
  opacity: 1 !important;
}
body.apx-d2 .apx-blog-search input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.55);
}

/* ── 分类按钮（桌面）─────────────────────────────────────────── */
body.apx-d2 .apx-cat-btn {
  background: var(--apx-bg) !important;
  border: 1px solid var(--apx-rule) !important;
  color: var(--apx-ink-2) !important;
}
body.apx-d2 .apx-cat-btn:hover {
  background: var(--apx-panel-2) !important;
  border-color: var(--apx-rule-strong) !important;
  color: var(--apx-ink) !important;
}
body.apx-d2 .apx-cat-btn.active,
body.apx-d2 .apx-cat-btn.active:hover {
  background: var(--apx-brand) !important;
  border-color: var(--apx-brand) !important;
  color: #0E0F10 !important;
}
body.apx-d2 .apx-cat-count {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--apx-muted) !important;
}
body.apx-d2 .apx-cat-btn.active .apx-cat-count,
body.apx-d2 .apx-cat-btn.active:hover .apx-cat-count {
  background: rgba(14, 15, 16, 0.22) !important;
  color: #0E0F10 !important;
}

/* ── 分类下拉（≤767px）：白底 → 深底，箭头改浅色 ─────────────── */
body.apx-d2 .apx-cat-select {
  background-color: var(--apx-bg) !important;
  color: var(--apx-ink) !important;
  border: 1px solid var(--apx-rule) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868D94' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 14px !important;
}
body.apx-d2 .apx-cat-select:focus {
  border-color: var(--apx-brand) !important;
  box-shadow: 0 0 0 3px rgba(255, 45, 0, 0.15) !important;
  outline: none !important;
}
body.apx-d2 .apx-cat-select option {
  background: var(--apx-panel) !important;
  color: var(--apx-ink) !important;
}
