@charset "utf-8";
/*
 * 気になる園リスト・比較機能
 * 名前空間は .hoiku-fav* (口コミリクエストの .hoiku-rr* とは分離)
 *
 * 親テーマ rehub_tcd099 の実測値に依存する箇所はコメントを添えている。
 * 親テーマは編集しないため、ここから上書き/絶対配置で合わせている。
 */

/* ==========================================================================
   ヘッダーの「気になる園」導線
   親テーマ header-bar.php の唯一のフック tcd_header_bar_search_form で
   検索フォームの直後 (= 掲載数カウントの直前) に差し込まれる。
   ========================================================================== */

.hoiku-fav-header {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #dbe8e7;
  background: #fff;
  color: #2f4f50;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 9px 14px;
  white-space: nowrap;
  position: relative;
  /* PC: .l-header__main-inner は flex + justify-content:space-between。
     auto マージンが justify-content より優先されるため、
     [ロゴ] <-- auto --> [この導線][掲載数カウント] の並びになる。 */
  margin-left: auto;
  margin-right: 16px;
  align-self: center; /* 親は align-items 未指定(stretch)なので中央に揃える */
  flex: 0 0 auto;
}

.hoiku-fav-header:hover {
  border-color: #3f7375;
  color: #3f7375;
}

.hoiku-fav-header__icon::before {
  content: '\2605'; /* ★ */
  color: #3f7375;
  font-size: 14px;
}

.hoiku-fav-header__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3f7375;
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
}

.hoiku-fav-header__count[hidden] {
  display: none;
}

/* SP/タブレット: 親テーマは ≤1024px で .l-header__main-inner を display:block にし、
   検索アイコン(.l-header__search-button--sp: right:25px / 幅50px) と
   ハンバーガー(button.p-menu-button: right:-10px / 幅42px) を絶対配置している。
   検索アイコンの左端は inner 右端から 75px の位置なので、
   right:78px に置いて重ならないようにする (実測で検証済み)。 */
@media (max-width: 1024px) {
  .hoiku-fav-header {
    position: absolute;
    top: 0;
    right: 78px;
    height: 60px;
    width: 44px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    border-radius: 0;
    justify-content: center;
    gap: 0;
  }

  .hoiku-fav-header:hover {
    border: none;
  }

  .hoiku-fav-header__text {
    display: none;
  }

  .hoiku-fav-header__icon::before {
    font-size: 19px;
  }

  .hoiku-fav-header__count {
    position: absolute;
    top: 9px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    border: 1.5px solid #fff;
  }
}

/* ==========================================================================
   施設ページの保存ボタン (評価行 .p-single--review-header__meta 内へJSで移設)
   ========================================================================== */

/* 移設前・JS無効時は出さない (この機能はJS前提のため) */
.hoiku-fav[hidden] {
  display: none;
}

/* 星評価/口コミ数と同じ行の右端に置く */
.hoiku-fav-meta-item {
  margin-left: auto;
}

/* 親テーマの評価行は flex-wrap:nowrap。施設名やラベルが長い場合に
   はみ出させず、収まらなければ次の行へ落とす。 */
.p-single--review-header__meta {
  flex-wrap: wrap;
  row-gap: 8px;
}

.hoiku-fav__button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #3f7375;
  color: #3f7375;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.hoiku-fav__button:hover {
  background: #f2f8f7;
}

.hoiku-fav__icon::before {
  content: '\2606'; /* ☆ */
}

.hoiku-fav__button.is-saved {
  background: #3f7375;
  border-color: #3f7375;
  color: #fff;
}

.hoiku-fav__button.is-saved .hoiku-fav__icon::before {
  content: '\2605'; /* ★ */
}

.hoiku-fav__error {
  font-size: 12px;
  color: #c0392b;
  margin: 6px 0 0;
  flex-basis: 100%;
}

@media (max-width: 600px) {
  .hoiku-fav__button {
    font-size: 11.5px;
    padding: 5px 10px;
  }
}

/* ==========================================================================
   保存リスト (ドロワー)
   モーダルなのでサイトのドロワーメニュー(.p-drawer-menu / z-index:201)より上に置く
   ========================================================================== */

.hoiku-fav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

.hoiku-fav-drawer[hidden] {
  display: none;
}

.hoiku-fav-drawer__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, .5);
}

.hoiku-fav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 24px rgba(0, 0, 0, .25);
}

.hoiku-fav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #dbe8e7;
}

.hoiku-fav-drawer__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #2f4f50;
}

.hoiku-fav-drawer__close {
  appearance: none;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #5c7a7a;
  cursor: pointer;
  padding: 0 4px;
}

.hoiku-fav-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 16px;
}

.hoiku-fav-drawer__empty {
  margin: 0;
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: #5c7a7a;
  line-height: 1.7;
}

.hoiku-fav-drawer__foot {
  border-top: 1px solid #dbe8e7;
  padding: 12px 16px;
}

.hoiku-fav-drawer__note {
  margin: 0 0 8px;
  font-size: 12px;
  color: #c0392b;
  min-height: 1em;
}

.hoiku-fav-drawer__compare {
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: #3f7375;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 16px;
  cursor: pointer;
}

.hoiku-fav-drawer__compare:hover {
  background: #356163;
}

.hoiku-fav-drawer__compare[disabled] {
  background: #a9c3c2;
  cursor: default;
}

.hoiku-fav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef4f3;
}

.hoiku-fav-item__check {
  flex: 0 0 auto;
  padding-top: 2px;
}

.hoiku-fav-item__main {
  flex: 1 1 auto;
  min-width: 0;
}

.hoiku-fav-item__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #2f4f50;
  text-decoration: none;
  line-height: 1.4;
}

.hoiku-fav-item__name:hover {
  text-decoration: underline;
}

.hoiku-fav-item__meta {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #5c7a7a;
  line-height: 1.5;
}

.hoiku-fav-item__remove {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid #d9c2c2;
  background: #fff;
  color: #a5544c;
  border-radius: 4px;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}

.hoiku-fav-item__remove:hover {
  background: #fdf5f5;
}

body.hoiku-fav-lock {
  overflow: hidden;
}

/* SPはボトムシート */
@media (max-width: 600px) {
  .hoiku-fav-drawer__panel {
    top: auto;
    left: 0;
    width: auto;
    max-width: none;
    max-height: 82vh;
    border-radius: 12px 12px 0 0;
  }
}

/* ==========================================================================
   比較ページ
   ========================================================================== */

.hoiku-fav-compare__lead {
  font-size: 13px;
  color: #5c7a7a;
  line-height: 1.7;
  margin: 0 0 14px;
}

.hoiku-fav-compare__actions {
  margin: 0 0 14px;
}

.hoiku-fav-compare__open {
  appearance: none;
  background: #fff;
  border: 1px solid #3f7375;
  color: #3f7375;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}

.hoiku-fav-compare__open:hover {
  background: #f2f8f7;
}

.hoiku-fav-compare__open[hidden] {
  display: none;
}

.hoiku-fav-compare__loading,
.hoiku-fav-compare__empty {
  font-size: 13px;
  color: #5c7a7a;
  padding: 24px 0;
  line-height: 1.7;
}

.hoiku-fav-compare__scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.hoiku-fav-compare__table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  background: #fff;
}

.hoiku-fav-compare__table th,
.hoiku-fav-compare__table td {
  border: 1px solid #dbe8e7;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.6;
  vertical-align: top;
  text-align: left;
}

.hoiku-fav-compare__corner {
  background: #eef4f3;
  width: 150px;
}

.hoiku-fav-compare__label {
  background: #f6faf9;
  color: #2f4f50;
  font-weight: 700;
  width: 150px;
}

.hoiku-fav-compare__facility {
  background: #eef4f3;
  min-width: 150px;
}

.hoiku-fav-compare__facility-link {
  color: #2f4f50;
  font-weight: 700;
  text-decoration: none;
}

.hoiku-fav-compare__facility-link:hover {
  text-decoration: underline;
}

.hoiku-fav-compare__badge {
  display: inline-block;
  margin-top: 4px;
  background: #3f7375;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  padding: 2px 6px;
}

/* 評価8軸の行。数値が読めることを優先し、星は補助的に添える。 */
.hoiku-fav-compare__row--score .hoiku-fav-compare__value {
  white-space: nowrap;
}

.hoiku-fav-compare__score-value {
  font-weight: 700;
  color: #2f4f50;
}

.hoiku-fav-compare__stars {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1;
  color: #d8a800;
  letter-spacing: 1px;
}

.hoiku-fav-compare__value.is-rating {
  font-weight: 700;
  color: #2f4f50;
}

.hoiku-fav-compare__link {
  color: #3f7375;
  text-decoration: underline;
}

.hoiku-fav-compare__back {
  margin: 18px 0 0;
  font-size: 13px;
}

.hoiku-fav-compare__back a {
  color: #3f7375;
  text-decoration: underline;
}

/* 下部固定CTAと重ならないよう余白を確保 */
.hoiku-fav-page .p-single__content {
  padding-bottom: 80px;
}

@media (max-width: 600px) {
  /* SPは横スクロール比較表。項目名と施設名の可読性を優先し、固定列は使わない */
  .hoiku-fav-compare__table {
    min-width: 520px;
  }

  .hoiku-fav-compare__table th,
  .hoiku-fav-compare__table td {
    padding: 8px 9px;
    font-size: 12.5px;
  }

  .hoiku-fav-compare__corner,
  .hoiku-fav-compare__label {
    width: 110px;
  }

  .hoiku-fav-compare__facility {
    min-width: 130px;
  }
}
