/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * お気に入り施設一覧 — favorite-facilities.css
 * Figma: node-id=249-868 準拠
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.fav-facilities {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── フィルターバー ── */
.fav-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fffbeb !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 16px !important;
  margin-bottom: 32px;
  gap: 8px;
}

.fav-filter-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.fav-filter-bar__icon {
  color: #333;
  font-size: 18px;
}

.fav-filter-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-filter-bar__select {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #0a0a0a;
  min-width: 140px;
  height: 36px;
  background: #fff;
  appearance: auto;
}

.fav-filter-bar__search {
  position: relative;
}

.fav-filter-bar__search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #717182;
  font-size: 12px;
}

.fav-filter-bar__input {
  padding: 4px 12px 4px 36px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 14px;
  color: #0a0a0a;
  width: 208px;
  height: 36px;
  background: #fff;
  box-sizing: border-box;
}

.fav-filter-bar__input::placeholder {
  color: #717182;
}

.fav-facilities__help {
  font-size: 13px;
  line-height: 1.6;
  color: #6a7282;
  margin: -20px 0 28px !important;
}

/* ── グループ見出し ── */
.fav-group__heading {
  font-family: "筑紫A丸ゴシック", "Tsukushi A Round Gothic", "Hiragino Maru Gothic Pro", sans-serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  color: #2697c1 !important;
  font-style: normal !important;
  line-height: 1.2 !important;
  margin: 32px 0 16px !important;
  padding: 0 !important;
}

/* ── カード: 2カラム構成 ── */
.fav-card {
  position: relative;
  display: flex;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 14px;
  gap: 16px;
  transition: opacity 0.3s, background 0.2s, border-color 0.2s;
}

.fav-card--selectable {
  padding-top: 52px;
}

.fav-card--selected {
  background: #f0f9ff;
  border-color: #81ccdc;
}

.fav-card--callback-submitted {
  border-color: #b8dcc8;
}

.fav-card__callback-submitted {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #e8f7ee;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* ── 一括コールバック依頼 ── */
.fav-bulk-callback {
  position: sticky;
  top: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid #d6eaf0;
  border-left: 4px solid #2697c1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  padding: 14px 16px;
  margin: -16px 0 24px;
}

.fav-bulk-callback__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fav-bulk-callback__label {
  font-size: 15px;
  font-weight: 700;
  color: #101727;
}

.fav-bulk-callback__count {
  font-size: 14px;
  font-weight: 600;
  color: #005ea1;
}

.fav-bulk-callback__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  background: #ff8904;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.fav-bulk-callback__button:hover:not([disabled]) {
  background: #e67b00;
}

.fav-bulk-callback__button[disabled] {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.fav-card__select-wrap {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.fav-card__select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  cursor: pointer;
  user-select: none;
}

.fav-card__select-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.fav-card__select-box {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  flex-shrink: 0;
}

.fav-card__select-input:checked + .fav-card__select-box {
  background: #005ea1;
  border-color: #005ea1;
}

.fav-card__select-input:checked + .fav-card__select-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  margin: 1px 0 0 5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fav-card__select-text,
.fav-card__callback-disabled {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.fav-card__select-text {
  color: #005ea1;
}

.fav-card__callback-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #6b7280;
}

/* 左カラム: 画像 + バッジ + 更新日 */
.fav-card__left {
  flex: 0 0 192px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fav-card__image {
  display: block;
}

.fav-card__image img {
  width: 192px;
  height: 144px;
  object-fit: cover;
  border-radius: 4px;
}

.fav-card__vacancy-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: #e91e63;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 4px;
}

.fav-card__vacancy-label {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.fav-card__vacancy-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.fav-card__vacancy-date {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.06px;
  color: #495565;
}

/* 右カラム */
.fav-card__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 上段: 2列（施設情報 | 事業所番号+CTA） */
.fav-card__upper {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* 上段左: 施設基本情報 */
.fav-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fav-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fav-card__title a {
  color: #101727 !important;
  text-decoration: none !important;
}

.fav-card__title a:hover {
  text-decoration: underline !important;
}

.fav-card__star {
  color: #ff9800;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.fav-card__star:hover {
  color: #e68a00;
}

/* 履歴削除ボタン（×）: 控えめなグレー */
.fav-card__star.fav-card__remove {
  color: #9ca3af;
  font-size: 18px;
}

.fav-card__star.fav-card__remove:hover {
  color: #6b7280;
}

.fav-card__meta {
  font-size: 14px;
  line-height: 1.43;
  color: #495565;
  margin: 0 !important;
}

.fav-card__service {
  font-weight: 400;
}

.fav-card__hours {
  font-size: 14px;
  line-height: 1.43;
  color: #495565;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-card__hours i {
  color: #6a7282;
  font-size: 14px;
}

.fav-facilities .fa-solid,
.fav-facilities .fas {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.fav-facilities .fa-regular,
.fav-facilities .far {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
}

/* 上段右: 事業所番号 + CTA */
.fav-card__aside {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.fav-card__insurance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.fav-card__insurance-text {
  display: flex;
  flex-direction: column;
}

.fav-card__insurance-label {
  font-family: "筑紫A丸ゴシック", "Tsukushi A Round Gothic", "Hiragino Maru Gothic Pro", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.2;
  color: #000;
}

.fav-card__insurance-number {
  font-family: "筑紫A丸ゴシック", "Tsukushi A Round Gothic", "Hiragino Maru Gothic Pro", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #000;
}

.fav-card__insurance-copy {
  background: none;
  border: none;
  cursor: pointer;
  color: #626262;
  font-size: 20px;
  padding: 2px;
  line-height: 1;
}

.fav-card__insurance-copy:hover {
  color: #333;
}

.fav-card__cta {
  display: flex;
  gap: 10px;
}

.fav-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 24px;
  border-radius: 4px;
  font-family: "筑紫A丸ゴシック", "Tsukushi A Round Gothic", "Hiragino Maru Gothic Pro", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  border: none;
  line-height: 1;
}

.fav-card__btn--callback {
  background: #ff8904;
  color: #fff !important;
}

.fav-card__btn--callback:hover {
  background: #e67b00;
}

.fav-card__btn--tel {
  background: #d2497d;
  color: #fff !important;
}

.fav-card__btn--tel:hover {
  background: #b83d6a;
}

/* 下段: 受け入れ状況テーブル（右カラム全幅） */
.fav-card__lower {
  padding-top: 0;
}

.fav-card__table-heading {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.43 !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  color: #354152;
}

.fav-card__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border-radius: 4px;
  overflow: hidden;
}

.fav-card__table th,
.fav-card__table td {
  border: 1px solid #e5e7eb;
  padding: 4px 8px;
  text-align: center;
  font-weight: 400;
  color: #495565;
}

.fav-card__table thead th {
  background: #fffbeb;
  color: #495565;
  font-weight: 400;
}

.fav-card__table tbody th {
  background: #fff;
  font-weight: 400;
  font-size: 12px;
  color: #495565;
}

/* ○△× 色分け（テキスト色＋セル背景色） */
.fav-card__table td.fav-cell--available {
  color: #4caf50;
  background: #f9ffe9;
  font-weight: 700;
}

.fav-card__table td.fav-cell--limited {
  color: #ff9800;
  background: #fff9df;
  font-weight: 700;
}

.fav-card__table td.fav-cell--unavailable {
  color: #757575;
  background: #f8f8f8;
}

/* ── コンパクト表示（画像 or テーブル欠損時の1行レイアウト） ── */
.fav-card--compact {
  align-items: flex-start;
}

.fav-card--compact .fav-card__left {
  flex: 0 0 auto;
  width: auto;
}

.fav-card--compact .fav-card__vacancy-badge {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  white-space: nowrap;
}

.fav-card--compact .fav-card__vacancy-label {
  font-size: 13px;
  line-height: 1.2;
}

.fav-card--compact .fav-card__vacancy-value {
  font-size: 18px;
}

/* ── ローディング & 空表示 ── */
.fav-loading,
.fav-empty {
  text-align: center;
  padding: 48px 0;
  color: #888;
  font-size: 16px;
}

/* ━━ レスポンシブ ━━ */
@media (max-width: 768px) {
  .fav-filter-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .fav-filter-bar__right {
    flex-direction: column;
    gap: 8px;
  }

  .fav-filter-bar__input {
    width: 100% !important;
  }

  .fav-filter-bar__select {
    width: 100%;
  }

  .fav-bulk-callback {
    position: static;
    flex-direction: column;
    align-items: stretch;
    margin: -8px 0 20px;
  }

  .fav-bulk-callback__button {
    width: 100%;
  }

  .fav-card {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }

  .fav-card--selectable {
    padding-top: 52px;
  }

  .fav-card__left {
    flex: none;
  }

  .fav-card__image img {
    width: 100%;
    height: auto;
    max-height: 200px;
  }

  .fav-card__upper {
    flex-direction: column;
    gap: 16px;
  }

  .fav-card__aside {
    flex: none;
    align-items: flex-start;
  }

  .fav-card__cta {
    flex-direction: row;
    width: 100%;
  }

  .fav-card__btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
  }

  .fav-card__table {
    font-size: 11px;
  }

  .fav-card__table th,
  .fav-card__table td {
    padding: 4px;
  }
}
