/**
 * 助成金・補助金など支援情報 - カテゴリフィルターUI
 * grants-filter.css
 */

/* ===== フィルターUI コンテナ ===== */
.grants-filter-ui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 20px 28px;
  margin: 0 0 32px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e4eaf0;
  max-width: 973px;
  margin: 0 auto 40px auto;
}

/* タイトル */
.grants-filter-ui__title {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #4a5568;
  letter-spacing: 0.04em;
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 2px solid #d0dce8;
}

/* チェックボックスリスト */
.grants-filter-ui__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 各アイテム */
.grants-filter-ui__item {
  margin: 0;
}

/* ラベル */
.grants-filter-ui__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: #ffffff;
  border: 1.5px solid #c5d4e0;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  user-select: none;
  font-size: 13.5px;
  color: #3a4a5a;
  line-height: 1;
}

.grants-filter-ui__label:hover {
  border-color: #1e1564;
  background: #eef5fb;
  box-shadow: 0 1px 6px rgba(26, 111, 168, 0.12);
}

/* チェック済みラベル */
.grants-filter-ui__checkbox:checked + .grants-filter-ui__label-text {
  /* handled via :has below */
}

.grants-filter-ui__label:has(.grants-filter-ui__checkbox:checked) {
  border-color: #1e1564;
  background: #1e1564;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(26, 111, 168, 0.25);
}

/* チェックボックス本体は視覚的に隠す */
.grants-filter-ui__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ラベルテキスト */
.grants-filter-ui__label-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* リセットボタン */
.grants-filter-ui__reset {
  margin-left: auto;
  padding: 7px 18px;
  background: transparent;
  border: 1.5px solid #c5d4e0;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7c8d;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  line-height: 1;
}

.grants-filter-ui__reset:hover {
  border-color: #1a6fa8;
  color: #1a6fa8;
  background: #eef5fb;
}

/* 件数カウンター */
.grants-filter-ui__counter {
  width: 100%;
  font-size: 12px;
  color: #8898a8;
  margin: 0;
  text-align: right;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .grants-filter-ui {
    padding: 16px 40px;
    gap: 10px 12px;
    max-width: 100%;
    margin: 0 auto 60px auto;
    display: block;
  }

  .grants-filter-ui__list {
    gap: 8px;
    margin: 14px 0;
  }

  .grants-filter-ui__label {
    padding: 8px 9px;
    font-size: 12px;
  }

  .grants-filter-ui__reset {
    margin-left: 0;
    width: 100%;
    text-align: center;
    padding: 8px;
  }

  .grants-filter-ui__counter {
    text-align: right;
    padding: 15px 0 0 0;
  }
}
