/* 상세 필터 - 단계형 큰 버튼 (sample-ui/ulsan/step-chips 시안 10). contents.css 다음에 불러옵니다. */

/* ---------- 타일 버튼 (칩보다 큰 터치 영역) ---------- */
.tileGrid {
  display: grid;
  gap: 4px;
}
.tileGrid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tileGrid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.filterTile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px 6px;
  border: 1px solid #eee;
  border-radius: 10px;
  background-color: #fff;
  transition: background-color .2s, border-color .2s, transform .1s;
  touch-action: manipulation;
}
.filterTile:hover { border-color: var(--color-primary); }
.filterTile:active { transform: scale(.96); }
.filterTile h6 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filterTile .chipIcon { font-size: 1.2rem; line-height: 1; }
.filterTile .chipCount { font-size: .9rem; color: #bbb; }
.filterTile .check {
  display: none;
  width: 8px;
  height: 5px;
  margin-top: -3px;
  border-left: 2px solid var(--color-orange1);
  border-bottom: 2px solid var(--color-orange1);
  transform: rotate(-45deg);
}
.filterTile.ACTIVE {
  border-color: var(--color-primary);
  background-color: var(--color-primaryLight);
}
.filterTile.ACTIVE h6 { color: #333; font-weight: 800; }
.filterTile.ACTIVE .check { display: block; }
.filterTile.ACTIVE .chipCount { color: var(--color-orange1); font-weight: 700; }
.filterTile:disabled,
nav .filterBox .filterChip:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* ---------- 단계형 큰 버튼 ---------- */
nav .filterBox.v5 { padding: 12px 18px 0; }
nav .filterBox.v5 .step + .step { margin-top: 12px; }
nav .filterBox.v5 .stepTitle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #333;
}
nav .filterBox.v5 .stepTitle b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(90deg, #FFCA00 0%, #FF8000 100%);
  color: #fff;
  font-size: .9rem;
}
nav .filterBox.v5 .step.LOCK .stepTitle { color: #bbb; }
nav .filterBox.v5 .step.LOCK .stepTitle b { background: #ddd; }
/* 학년: 초등(1~6) / 중·고(1~3) 구간별 묶음. 둘 다 보일 때만 작은 제목(앞에 단계 번호와 같은 그라데이션 아이콘) */
nav .filterBox.v5 .gradeRows { display: flex; flex-direction: column; gap: 10px; margin: 12px 6px; }
nav .filterBox.v5 .gradeRow + .gradeRow { margin-top: 0; }
nav .filterBox.v5 .gradeRow .gradeLevel {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: .95rem;
  font-weight: 700;
  color: #777;
}
nav .filterBox.v5 .gradeRow .gradeLevel::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(90deg, #FFCA00 0%, #FF8000 100%);
}
nav .filterBox.v5 .bigTile {
  flex-direction: column;
  min-height: 60px;
  border-width: 2px;
  border-radius: 14px;
}
nav .filterBox.v5 .bigTile .chipIcon { font-size: 2rem; }
nav .filterBox.v5 .bigTile .check { display: none !important; }
nav .filterBox.v5 .stepSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 14px -18px 0;
  padding: 10px 18px;
  background-color: #fafafa;
  border-top: 1px solid #eee;
}
nav .filterBox.v5 .stepSummary > h6 {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  color: #666;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}
nav .filterBox.v5 .stepSummary b {
  color: var(--color-orange1);
  font-size: 1.25rem;
  font-weight: 800;
}
nav .filterBox.v5 .stepSummary .filterReset {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background-color: #fff;
  transition: border-color .2s, background-color .2s;
}
nav .filterBox.v5 .stepSummary .filterReset h6 {
  color: #666;
  font-size: .95rem;
  line-height: 1;
  white-space: nowrap;
}
nav .filterBox.v5 .stepSummary .filterReset:hover {
  border-color: var(--color-orange1);
  background-color: var(--color-primaryLight);
}
nav .filterBox.v5 .stepSummary .filterReset:hover h6 { color: var(--color-orange1); }

.tileGrid .filterHint { grid-column: 1 / -1; }

/* ---------- 필터로 올라가기 버튼 (목록 아래쪽에 sticky, 필터가 화면 밖일 때만 보임) ---------- */
nav .bottomBox .toFilter {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  height: 34px;
  margin: 12px 0 0 auto;
  padding: 0 12px;
  border-radius: 17px;
  background: linear-gradient(90deg, #FFCA00 0%, #FF8000 100%);
  box-shadow: 0 4px 12px rgba(255, 128, 0, .3);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
nav .bottomBox .toFilter.SHOW {
  opacity: 1;
  visibility: visible;
  transform: none;
}
nav .bottomBox .toFilter:active { transform: scale(.95); }
nav .bottomBox .toFilter .arrow { font-size: 1.3rem; font-weight: 800; line-height: 1; }
nav .bottomBox .toFilter h6 { color: #fff; font-weight: 700; }
nav .bottomBox .toFilter .num {
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background-color: #fff;
  color: var(--color-orange1);
  font-size: .9rem;
  font-weight: 800;
  text-align: center;
}
