/* =============================================================
 * components/sub-hero.css
 * 物件詳細以下のサブページ (問い合わせ / タイムライン等) で共有する
 * Hero (= <x-www.house.sub-hero>) の専用スタイル。
 *
 * - .house-hero--inquiry / .house-hero--sub の派生 modifier
 * - .inquiry-hero-summary__* (歴史的経緯で inquiry プレフィックス)
 *
 * sub-hero.blade.php が @once @push('styles') でこのファイルを読み込むため、
 * inquiry / house-sub どちらの layout からも個別に <link> 不要。
 * 旧 inquiry.css にあった同等定義はこちらへ統合済 (inquiry.css からは削除)。
 *
 * CSS 変数は自己完結 (--iq-* を modifier 側でローカル定義) し、
 * 親 .inquiry-page の変数定義に依存しない。
 * ============================================================= */

/* ───── 変数 (sub-hero スコープ。inquiry-page 等の外側で上書きされても OK) ───── */
.house-hero--inquiry,
.house-hero--sub {
  --iq-radius: 14px;
  --iq-text:   #1f2937;
  --iq-text-2: #6b7280;
  --iq-text-3: #9ca3af;
  --iq-border: #e5e7eb;
}

/* 問い合わせ用 Hero (house.css の .house-hero パターンを再利用 + 緑アクセント) */
.house-hero--inquiry { --hero-accent: #44a162; padding-bottom: var(--sp-3); }
/* タイムライン等の汎用サブページ Hero (青寄りアクセント) */
.house-hero--sub     { --hero-accent: #58a9cd; padding-bottom: var(--sp-3); }

/* ───── Hero 内コンパクト物件サマリ
   構造:
     - 上段 (.inquiry-hero-summary__top, 全幅): 空室 / 価格 / 部屋数
     - 下段 (.inquiry-hero-summary__cols, 2 カラム):
         左 = メイン画像 (戻り導線), 右 = 入居条件 / コメント / 戻るリンク (物件名アンカー)
   ─── */
.inquiry-hero-summary {
  margin-top: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inquiry-hero-summary__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: var(--fs-sm);
  line-height: 1.4;
}
.inquiry-hero-summary__cols {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
/* 左カラム: メイン画像サムネ (戻り導線) */
.inquiry-hero-summary__thumb {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 120px;
  aspect-ratio: 4 / 3;
  border-radius: var(--iq-radius);
  overflow: hidden;
  background: var(--iq-border);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.inquiry-hero-summary__thumb:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 24, 40, .18);
}
.inquiry-hero-summary__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* サムネ右下に小さなキャプションを常時表示: 画像 = 戻るリンクであることを示唆 */
.inquiry-hero-summary__thumb-caption {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.inquiry-hero-summary__thumb-caption > i { font-size: 11px; }

/* 右カラム: テキスト情報 + 戻るリンク */
.inquiry-hero-summary__main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* SP 用: 画像はやや小さく (~96px) */
@media (max-width: 767px) {
  .inquiry-hero-summary { gap: 10px; }
  .inquiry-hero-summary__thumb { width: 96px; }
  .inquiry-hero-summary__thumb-caption { font-size: 9px; padding: 2px 6px; }
}

/* 戻りリンク + クリップボタンの横並び (Hero summary 末尾) */
.inquiry-hero-summary__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  min-width: 0;
}
.inquiry-hero-summary__actions > .inquiry-hero-summary__back { margin-top: 0; min-width: 0; }

/* クリップボタン (data-clip-toggle で AJAX 同期)
   - 通常時: 白背景 + paperclip 水色 / hover でリフト
   - クリップ済 (.is-clipped): 黄色塗 + ラベル切替 (house-contact-clip と統一) */
.inquiry-hero-summary__clip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: #fff;
  border: 1px solid var(--iq-border);
  border-radius: 999px;
  color: #1c8fbf;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.inquiry-hero-summary__clip > i { font-size: 13px; }
.inquiry-hero-summary__clip:hover {
  transform: translateY(-1px);
  background: #f6fbfd;
  border-color: #58a9cd;
  box-shadow: 0 2px 6px rgba(28, 143, 191, .18);
}
.inquiry-hero-summary__clip:active { transform: translateY(0); }
.inquiry-hero-summary__clip-label--on { display: none; }
.inquiry-hero-summary__clip.is-clipped {
  background: #ffd451;
  color: #5a3d00;
  border-color: #f0c878;
  box-shadow: 0 2px 6px rgba(245, 197, 66, .45);
}
.inquiry-hero-summary__clip.is-clipped .inquiry-hero-summary__clip-label--off { display: none; }
.inquiry-hero-summary__clip.is-clipped .inquiry-hero-summary__clip-label--on  { display: inline; }

/* 物件詳細へ戻るテキストリンク (アンカー文字 = 物件名 / SEO 強化)
   - 画像と並ぶ場合のフォールバック / 文字での明示的な戻り導線
   - max-width で長い物件名でも 1 行に収め、はみ出しは … で省略 */
.inquiry-hero-summary__back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 14px;
  max-width: 100%;
  background: rgba(68, 161, 98, .08);
  border: 1px solid rgba(68, 161, 98, .35);
  border-radius: 999px;
  color: #2f7a4a;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.inquiry-hero-summary__back > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inquiry-hero-summary__back:hover {
  background: rgba(68, 161, 98, .18);
  color: #1f5e36;
  border-color: rgba(68, 161, 98, .55);
  text-decoration: none;
}
.inquiry-hero-summary__back > i { font-size: 12px; flex-shrink: 0; }

.inquiry-hero-summary__vacancy {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .04em;
  flex-shrink: 0;
}
/* 一覧 .bld-card__vacancy と同じ色: 空室あり=水色 / 空室予定=橙 / 満室=灰 */
.inquiry-hero-summary__vacancy.is-vacant { background: #58a9cd; }
.inquiry-hero-summary__vacancy.is-soon   { background: #f08c2a; }
.inquiry-hero-summary__vacancy.is-full   { background: #999; }
.inquiry-hero-summary__price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-weight: 700;
  color: var(--iq-text);
}
/* 個室 / ドミ をタグ + 金額の横並び (一覧 / 物件詳細トップと同じ配色) */
.inquiry-hero-summary__price-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.inquiry-hero-summary__price-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
}
.inquiry-hero-summary__price-tag--private { background: #ffd451; color: #5a3d00; }
.inquiry-hero-summary__price-tag--dorm    { background: #9bd1e3; color: #0e4a5e; }
.inquiry-hero-summary__price-amount {
  font-weight: 700;
  color: var(--iq-text);
}
.inquiry-hero-summary__rooms {
  color: var(--iq-text-2);
  font-size: var(--fs-xs);
}
/* 入居条件: 一覧 .bld-card__cond と同じ「色付きアンダーライン風」3 等分バッジ */
.inquiry-hero-summary__cond {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.inquiry-hero-summary__cond > li {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-bottom: 3px solid;
  background: transparent;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.inquiry-hero-summary__cond .is-ok-man     { color: var(--iq-text); border-color: #58a9cd; }
.inquiry-hero-summary__cond .is-ok-woman   { color: var(--iq-text); border-color: #e85d75; }
.inquiry-hero-summary__cond .is-ok-foreign { color: var(--iq-text); border-color: #f5c542; }
.inquiry-hero-summary__cond .is-ng         { color: var(--iq-text-3); border-color: #ddd; text-decoration: line-through; }
.inquiry-hero-summary__note {
  margin: 4px 0 0;
  font-size: var(--fs-xs);
  color: var(--iq-text-2);
  line-height: 1.5;
}

/* ───── 問い合わせ済バッジ (kicker 行右端に並ぶ) ─────
   一覧 (.bld-card__flag--inquired) と同じ緑系で「実行済み」を示唆 */
.house-hero__inquired-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5cb878 0%, #44a162 100%);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 1px 3px rgba(68,161,98,.4);
}
.house-hero__inquired-badge > i { font-size: 12px; }
