/* ======================================================
   Compare List - Card & UI styles
   review_list のデザインを流用
   ====================================================== */

/* 1. カード全体 */
.custom-review-card {
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1.2em;
  background: #fff;
}

/* 2. カードヘッダー */
.custom-review-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0.9em 1em;
  cursor: pointer;
}

/* 3. 左側のヘッダーブロック */
.custom-review-card .head-left {
  min-width: 0;
}

/* 4. 会社名 */
.custom-review-card h3.company-name {
  font-size: 1.1em;
  margin: 0 0 0.25em;
  line-height: 1.3;
  font-weight: 700;
}

/* 5. 星評価 */
.custom-review-card .stars {
  font-size: 0.9em;
  color: #f39c12; /* 黄色に変更 */
}

/* 6. Google口コミ件数 */
.custom-review-card .google-review-count {
  font-size: 0.85em;
  color: #666;
  margin-left: 0.5em;
}

/* 7. トグルボタン */
.custom-review-card .toggle-btn {
  display: flex !important;
  margin-left: auto;
  font-size: 1.25em;
  line-height: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 1.8em;
  height: 1.8em;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
/* 8. 住所行（PC＝横並び、SP＝改行） */
.custom-review-card .addr-inline {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #333;
  font-size: 0.88em;
  line-height: 1.4;
}
.custom-review-card .postal-inline {
  display: inline;
}
.custom-review-card .address-inline {
  display: inline;
}

/* 9. スマホ時の住所改行 */
@media (max-width: 768px) {
  .custom-review-card .addr-inline {
    display: block;
  }
  .custom-review-card .postal-inline,
  .custom-review-card .address-inline {
    display: block;
    margin: 0;
    line-height: 1.4;
  }
}

/* 9. スマホ用改行 */
.custom-review-card .sp-break {
  display: none !important;
}

/* 10. トグルフォーカス時 */
.custom-review-card .toggle-btn:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* 11. カード本文 */
.custom-review-card .card-body {
  padding: 0 1em 1em;
  border-top: 1px dashed #ddd;
}

/* 12. 電話番号 */
.custom-review-card .phone {
  font-size: 0.95em;
  margin: 0.6em 0 0.4em;
  color: #555;
}

/* 13. サマリーボックス */
.custom-review-card .summary-box {
  background: #f4f4f4;
  padding: 0.6em 0.8em;
  border-radius: 4px;
  font-size: 0.95em;
  line-height: 1.6;
  margin-top: 0.4em;
}

/* 14. 詳細リンク */
.custom-review-card .detail-link {
  display: inline-block;
  margin-top: 0.6em;
  font-weight: 700;
  color: #06c;
  text-decoration: none;
  font-size: 0.95em;
}

/* 15. PC / SP 切替 */
@media (max-width: 768px) {
  .custom-review-card .toggle-btn {
    display: none !important;
  }

  .custom-review-card .addr-inline {
    display: block !important;
  }

  .custom-review-card .postal-inline {
    display: block !important;
  }

  .custom-review-card .sp-break {
    display: block !important;
    content: '';
    height: 0;
  }

  .custom-review-card .address-inline {
    display: block !important;
    margin-top: 0.2em;
  }
}

/* === フィルタUI === */

/* 16. フィルタ全体 */
.compare-list-filters {
  margin: 1em 0;
  padding: 0.8em;
  background: #f9f9f9;
  border: 0px solid #ddd;
  border-radius: 6px;
  display: flex;
  flex-direction: column; /* 上段・下段を縦に分ける */
  gap: 1em;
}

/* 17. 上段（都道府県・並び替え） */
.compare-list-filters .top-row {
  display: flex;
  gap: 0.5em;
}
.compare-list-filters .filter-block {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.compare-list-filters .filter-block label {
  font-size: 0.8em; /* 小さめ文字 */
  color: #555;
  margin-bottom: 0.3em;
  text-align: left;
}
.compare-list-filters select {
  padding: 0.4em 0.6em;
  font-size: 0.9em;
  line-height: 1.4;
  height: 38px; /* 統一高さ */
  box-sizing: border-box;
}

/* 18. 下段（検索＋ボタン） */
.compare-list-filters .bottom-row {
  display: flex;
  gap: 0.5em;
  align-items: center;
}
.compare-list-filters .bottom-row input[type='text'] {
  flex: 1 1 auto; /* 残り幅を占有 */
  min-width: 100px; /* 縮みすぎ防止 */
  padding: 0.4em 0.6em;
  font-size: 0.9em;
  line-height: 1.4;
  height: 38px; /* 統一高さ */
  box-sizing: border-box;
}

/* 19. 検索ボタン（オレンジ） */
.compare-list-filters .bottom-row button {
  flex: 0 0 auto; /* 固定幅で潰れない */
  white-space: nowrap; /* 折り返さない */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.8em;
  font-size: 0.9em;
  background: #ff8800;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  height: 38px;
  line-height: normal;
  width: 55px;
}
.compare-list-filters .bottom-row button:hover {
  background: #ff9900;
}

/* 20. クリアボタン */
.compare-list-filters .bottom-row .clear-button {
  flex: 0 0 auto; /* 固定幅で潰れない */
  white-space: nowrap; /* 折り返さない */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  background: #ccc;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  height: 38px;
  line-height: normal;
  width: 55px;
}
.compare-list-filters .bottom-row .clear-button:hover {
  background: #bbb;
}

/* 21. ソートUI外枠 */
.compare-filters-wrap {
  border: 2px solid #7ab63d; /* H2と同じ緑色 */
  border-radius: 6px;
  padding: 0;
  margin-bottom: 1.5em;
  background: #fefefe;
}

/* === ページネーション === */

/* 22. ページネーション全体 */
.compare-pagination {
  margin: 2em 0;
  text-align: center;
}

/* 23. ulをリセット */
.compare-pagination ul {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* 24. liをリセット */
.compare-pagination li {
  display: inline-block;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
}

/* 25. リンク・番号 */
.compare-pagination a,
.compare-pagination span {
  display: inline-block;
  min-width: 32px; /* 数字や▶︎が潰れないよう固定幅 */
  height: 32px;
  line-height: 32px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

/* 26. hover時 */
.compare-pagination a:hover {
  background: #f0f0f0;
}

/* 27. 現在ページ */
.compare-pagination .current {
  background: #4caf50; /* サイトカラーに調整可 */
  color: #fff;
  border-color: #4caf50;
  font-weight: bold;
}

/* 28. スマホ対応（折り返し） */
@media (max-width: 768px) {
  .compare-pagination ul {
    flex-wrap: wrap; /* 折り返し */
    justify-content: center;
    gap: 4px;
  }
}

/* 29. スマホ時ボタン縮小 */
@media (max-width: 480px) {
  .compare-pagination a,
  .compare-pagination span {
    min-width: 26px;
    height: 28px;
    line-height: 28px;
    font-size: 12px;
    padding: 0;
  }
}

/* 30. スマホ時の住所余白調整 */
@media (max-width: 768px) {
  .custom-review-card .addr-inline {
    display: block !important;
    margin-top: 0.2em;
    line-height: 1.4;
  }
  .custom-review-card .postal-inline {
    display: block !important;
    margin: 0 !important;
    line-height: 1.2;
  }
  .custom-review-card .address-inline {
    display: block !important;
    margin: 0 !important;
    line-height: 1.2;
  }
}

/* 31. アコーディオン本文の点線削除 */
.custom-review-card .card-body {
  padding: 0 1em 1em;
  border-top: none;
}
