/**
 * BELAUN - 客室ページ比較版 B (/rooms/?v=b)
 *
 * Room Tour セクションを、全画面背景 + すりガラスパネルのオーバーレイ構成から
 * モックアップの構成へ組み替える。
 *
 *   ヒーロー画像（収まった 2:1） → サムネ4枚（中央） → テキスト（左寄せ）
 *
 * DOM の並びは 画像 → パネル → サムネ なので、flex の order で入れ替える。
 * サムネ切り替えのフェード JS は現行のものがそのまま動く。
 *
 * 通常の /rooms/ には一切読み込まれない。検証終了後はこのファイルごと削除する。
 */

/* ===== セクション: 全画面オーバーレイ → 通常フローの縦積み ===== */
body.belaun-roomsb .belaun-room__tour {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: clamp(32px, 5vw, 64px) 1rem clamp(40px, 6vw, 72px);
  overflow: visible;
  /* main.belaun-room の地色がベージュなので、モックの白地に合わせる */
  background: var(--belaun-white);
}

@media (min-width: 768px) {
  body.belaun-roomsb .belaun-room__tour {
    padding-left: 4rem;        /* モックの md:px-16 */
    padding-right: 4rem;
  }
}

/* ===== ヒーロー画像: 絶対配置 → アスペクト比を持つブロック（1番目） ===== */
body.belaun-roomsb .belaun-room__tour-bg-wrap {
  order: 1;
  position: relative;
  inset: auto;
  flex: none;
  width: 100%;
  max-width: 80rem;            /* モックの max-w-7xl */
  height: auto;
  min-height: 0;
  aspect-ratio: 1.414 / 1;     /* モックの aspect-[1.414/1] */
  overflow: hidden;
  background: rgba(var(--belaun-primary-rgb), 0.06);
}

@media (min-width: 768px) {
  body.belaun-roomsb .belaun-room__tour-bg-wrap {
    aspect-ratio: 2 / 1;       /* モックの md:aspect-[2/1] */
  }
}

/* 画像自体は現行のクロスフェードをそのまま使う（親が変わるだけ） */

/* ===== サムネ: 画像に浮かせる → 画像の直下に中央配置（2番目） ===== */
body.belaun-roomsb .belaun-room__tour-thumbs {
  order: 2;
  position: relative;
  inset: auto;
  z-index: auto;
  flex: none;
  width: 100%;
  max-width: 80rem;
  margin: clamp(16px, 2vw, 24px) 0 0;
  padding: 0;
  background: transparent;
  pointer-events: auto;
}

@media (min-width: 640px) {
  body.belaun-roomsb .belaun-room__tour-thumbs {
    max-width: 60rem;          /* モックの sm:w-3/4 相当 */
  }
}

@media (min-width: 768px) {
  body.belaun-roomsb .belaun-room__tour-thumbs {
    max-width: 53.33rem;       /* モックの md:w-2/3 相当 */
  }
}

@media (min-width: 1024px) {
  body.belaun-roomsb .belaun-room__tour-thumbs {
    max-width: 40rem;          /* モックの lg:w-1/2 相当 */
  }
}

body.belaun-roomsb .belaun-room__tour-thumb-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  body.belaun-roomsb .belaun-room__tour-thumb-grid {
    gap: 16px;
  }
}

/* 選択中サムネ: 白ボーダーは白地で見えないので navy のリングにする。
   選択中を opacity 0.5 + ring にするのはモック側の指定をそのまま踏襲。 */
body.belaun-roomsb .belaun-room .belaun-room__tour-thumb {
  opacity: 1;
  border-color: transparent;
}

body.belaun-roomsb .belaun-room .belaun-room__tour-thumb.is-active {
  opacity: 0.5;
  border-color: transparent;
  outline: 2px solid var(--belaun-primary);
  outline-offset: 2px;
}

/* ===== テキスト: オーバーレイパネル → サムネの下に左寄せ（3番目） ===== */
body.belaun-roomsb .belaun-room__tour-panel,
body.belaun-roomsb .belaun-room__tour-panel[data-open="false"] {
  order: 3;
  position: relative;
  inset: auto;
  z-index: auto;
  flex: none;
  width: 100%;
  max-width: 80rem;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: clamp(28px, 3.5vw, 48px) 0 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  text-align: left;
}

@media (min-width: 1024px) {
  body.belaun-roomsb .belaun-room__tour-panel,
  body.belaun-roomsb .belaun-room__tour-panel[data-open="false"] {
    padding-right: 8rem;       /* モックの lg:px-32 相当（右に余白を作る） */
  }
}

/* 白地に載るので文字色を navy 系へ。
   筆記体は行送りを詰めすぎると次行と重なるため line-height を確保する。 */
body.belaun-roomsb .belaun-room__tour-title-en {
  color: var(--belaun-primary);
  text-shadow: none;
  /* Meddon / Caveat は下方向に大きく伸びるので、行ボックスに余裕を持たせる */
  line-height: 1.4;
  margin-bottom: 4px;
}

body.belaun-roomsb .belaun-room__tour-title-ja {
  color: var(--belaun-primary);
  border-bottom-color: rgba(var(--belaun-primary-rgb), 0.2);
}

body.belaun-roomsb .belaun-room__tour-desc {
  color: rgba(var(--belaun-primary-rgb), 0.75);
  text-align: left;
}

/* ===== オーバーレイ構成でしか意味を持たない要素を外す ===== */
body.belaun-roomsb .belaun-room__tour-label,
body.belaun-roomsb .belaun-room button.belaun-room__tour-toggle,
body.belaun-roomsb .belaun-room__tour-hint {
  display: none;
}


/* ============================================================
   Sasshi 指摘反映
   ============================================================ */

/* --- ヒーロー: 背景画像を外し、Room は横書き / 客室は縦書き --- */
body.belaun-roomsb .belaun-room__hero {
  height: auto;
  min-height: 0;
  padding: clamp(40px, 6vw, 72px) 1rem clamp(20px, 3vw, 32px);
  background: var(--belaun-white);
}

body.belaun-roomsb .belaun-room__hero-images {
  display: none;
}

/* 背景が無くなるので、絶対配置のオーバーレイを通常フローに戻す */
body.belaun-roomsb .belaun-room__hero-overlay {
  position: relative;
  inset: auto;
  padding: 0;
}

/* 白抜き前提の文字色と影を、白地向けに戻す */
body.belaun-roomsb .belaun-room__hero-script,
body.belaun-roomsb .belaun-room__hero-sub,
body.belaun-roomsb .belaun-room__hero-title {
  color: var(--belaun-primary);
  text-shadow: none;
}

/* 「客室」を縦書きに。文字は寝かせず正立させる */
body.belaun-roomsb .belaun-room__hero-title {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.2em;
  line-height: 1;
  /* Sasshi: Room と 客室 の距離を少し離す */
  margin: 20px auto 0;
}

/* --- STAY セクションを設備セクションの直前へ移動 --- */
body.belaun-roomsb main.belaun-room {
  display: flex;
  flex-direction: column;
  /* tour セクションを白地にしたので、地色も白に揃える
     （ベージュのままだと tour が白い箱に見えてしまう） */
  background: var(--belaun-white);
}

body.belaun-roomsb .belaun-room__hero    { order: 1; }
body.belaun-roomsb .belaun-room__tour    { order: 2; }
body.belaun-roomsb .belaun-room__intro   { order: 3; }
body.belaun-roomsb .belaun-room__details { order: 4; }
/* 予約セクションは main 直下の 5 つめの子。order 未指定だと既定値 0 で
   先頭に飛ぶため、元どおり最後に来るよう明示する。 */
body.belaun-roomsb .belaun-reservation   { order: 5; }

/* --- テキストを囲む白枠とドロップシャドウを削除 --- */
body.belaun-roomsb .belaun-room__tour-panel,
body.belaun-roomsb .belaun-room__tour-panel[data-open="false"] {
  box-shadow: none;
}

/* tour セクション自体の地色指定は main 側に移したので解除する */
body.belaun-roomsb .belaun-room__tour {
  background: transparent;
}


/* ============================================================
   Sasshi 指摘反映 (第2弾)
   ============================================================ */

/* 「PRIVATE SANCTUARY」の文言を消す */
body.belaun-roomsb .belaun-room__hero-sub {
  display: none;
}

/* 「客室」の太さを 700 から一段落とす（Zen Kaku Gothic Antique は 300/400/500/700） */
body.belaun-roomsb .belaun-room__hero-title {
  font-weight: 500;
}

/* 「贅沢な共有空間」のドロップシャドウを消す。
   text-shadow は継承プロパティで、パネル側から降ってきているため明示的に打ち消す。 */
body.belaun-roomsb .belaun-room__tour-title-ja {
  text-shadow: none;
}

/* 「Stay」が半透明で薄いので、他の見出しと同じ濃さにする */
body.belaun-roomsb .belaun-room__intro-script {
  opacity: 1;
}

/* Room Details: 見出しと本文の間を詰めて一塊に見せる。
   項目どうしの間隔は保つので、行間ではなく列間・行内間隔だけを縮める。 */
@media (min-width: 768px) {
  body.belaun-roomsb .belaun-room__details-list {
    column-gap: 16px;
  }
}

@media (max-width: 767px) {
  /* SP は 1 カラムで dt→dd が縦に並ぶ。全体を詰めたうえで、
     次の項目の見出し (dd の直後の dt) にだけ余白を戻して塊を分ける。 */
  body.belaun-roomsb .belaun-room__details-list {
    row-gap: 10px;
  }

  body.belaun-roomsb .belaun-room__details-desc + .belaun-room__details-term {
    margin-top: 22px;
  }
}
