/* 桌面端左侧常驻筛选栏 */
.filter-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
}

.filter-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.filter-sidebar-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.filter-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: var(--red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.filter-reset-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  padding: 2px 6px;
  border-radius: 6px;
}

.filter-reset-link:hover {
  background-color: var(--red-soft);
}

.filter-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-summary {
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
}

.sidebar-summary strong {
  color: var(--red);
  font-size: 14px;
}

/* 筛选通用区块 */
.filter-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.sec-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-sub);
}

.sec-hint {
  font-size: 11px;
  color: var(--ink-light);
}

.opt-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.opt-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.opt-chip {
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  background-color: var(--surface-warm);
  color: var(--ink-sub);
  border: 1px solid transparent;
  transition: all 0.14s ease;
}

.opt-chip:hover {
  border-color: var(--border-strong);
}

.opt-chip-red {
  background-color: var(--red-soft);
  color: var(--red);
  border-color: var(--red-border);
}

.opt-chip-navy {
  background-color: var(--navy-soft);
  color: var(--navy);
  border-color: #93c5fd;
}

.region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.region-tag {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background-color: var(--surface-warm);
  color: var(--ink-sub);
  border: 1px solid transparent;
  transition: all 0.14s ease;
}

.region-tag:hover {
  border-color: var(--border-strong);
}

.region-tag-active {
  background-color: var(--red-soft);
  color: var(--red);
  border-color: var(--red-border);
}

/* 特殊招生开关 */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background-color: var(--bg-page);
  border: 1px solid var(--border-soft);
  cursor: pointer;
}

.switch-info {
  flex: 1;
  min-width: 0;
}

.switch-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.switch-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-light);
}

.jb-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.jb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.jb-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background-color: #d6d0c4;
  transition: background-color 0.2s ease;
}

.jb-switch-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.jb-switch input:checked + .jb-switch-track {
  background-color: var(--red);
}

.jb-switch input:checked + .jb-switch-track::after {
  transform: translateX(18px);
}

/* 移动端半屏抽屉 */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: rgba(28, 25, 23, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.drawer-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  background-color: var(--surface);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
}

.drawer-head {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.drawer-close {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 4px 8px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-footer {
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background-color: var(--surface);
  flex-shrink: 0;
}

.footer-reset {
  width: 104px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--surface-warm);
  color: var(--ink-sub);
  font-size: 14px;
  font-weight: 700;
}

.footer-confirm {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  background-color: var(--red);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-primary);
}

.footer-confirm:hover {
  background-color: var(--red-dark);
}
