/* =========================================================
   予約検索ウィジェット（トリプラ連携）
   ※既存の .booking-calendar / .booking-modal と衝突しないよう
     クラス名はすべて bkw- プレフィックスで独立
   ※配色は 2026-09 のカンプ（グレー基調。旧 .booking-search と同系）に合わせている
========================================================= */
.bkw,
.bkw-overlay {
  --bkw-panel: #787878;
  --bkw-field: #606060;
  --bkw-board: #8c8c8c;
  --bkw-board-line: #9b9b9b;
  --bkw-text: #ffffff;
  --bkw-text-muted: #bebebe;
  --bkw-line: #a3a3a3;
  --bkw-yellow: #ffff9b;
  --bkw-yellow-line: #a3a38f; /* 2026-09-19 カンプ実測 (163,163,143) */
  --bkw-range: #a0a0a0;
  --bkw-selected: #ffffff;
  --bkw-selected-text: #777777;
  --bkw-radius: 4px;
  --bkw-font: dnp-shuei-gothic-gin-std, "ヒラギノ角ゴ Pro W3", sans-serif;
}

.bkw *,
.bkw *::before,
.bkw *::after,
.bkw-overlay *,
.bkw-overlay *::before,
.bkw-overlay *::after {
  box-sizing: border-box;
}

.bkw button,
.bkw select,
.bkw-overlay button {
  /* 2026-09-19: font: inherit だと font-size まで継承になり、.bkw__day / .bkw__value 等の
     font-size 指定(詳細度で負ける)が効いていなかった。サイズは各ルールに任せる */
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
}

.bkw {
  font-family: var(--bkw-font);
  font-style: normal;
  color: var(--bkw-text);
}

/* ---------------- KV下の帯（背景ダーク） ---------------- */
.bkw-band {
  background: var(--bkw-panel);
  padding: 30px 0;
}

.bkw-band__inner {
  max-width: 1100px;
  width: 92%;
  margin: 0 auto;
}

/* ---------------- ツールバー ---------------- */
.bkw__toolbar {
  display: grid;
  /* 2026-10-26: カレンダーと一緒に横幅を 885px → 960px に広げた(カンプは 250/130/130/75/75/150px)。
     比率で持たせ、パネルが 960px より狭いときは全部の欄が同じ割合で縮む(それまでは 1025〜1042px で空室検索ボタンが最大 8px はみ出していた) */
  grid-template-columns: minmax(0, 280fr) minmax(0, 145fr) minmax(0, 145fr) minmax(0, 80fr) minmax(0, 80fr) minmax(0, 155fr);
  gap: 20px 15px;
  max-width: 960px;
  margin: 0 auto;
  align-items: end;
}

.bkw__field {
  min-width: 0;
}

.bkw__label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0; /* 2026-09-19 カンプ実測(「チェックイン」の幅 68px = 字間なし) */
  color: var(--bkw-text);
}

.bkw__value,
.bkw__select,
.bkw__search-button {
  width: 100%;
  height: 50px;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--bkw-field);
  color: var(--bkw-text);
}

.bkw__value {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-size: 16px; /* 2026-09-19 カンプ実測(日付の数字が日付セルより一回り大きい) */
  letter-spacing: 0.05em;
  text-align: left;
  cursor: pointer;
  transition: .4s;
}

.bkw__value:hover {
  opacity: 0.7;
}

.bkw__select-wrap {
  position: relative;
  transition: .4s;
}

.bkw__select-wrap:hover {
  opacity: 0.7;
}

.bkw__select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--bkw-text);
  border-bottom: 1px solid var(--bkw-text);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.bkw__select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 28px 0 15px;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bkw__select option {
  background: #fff;
  color: #222;
}

.bkw__search-button {
  border: 0;
  background: #ffffff;
  color: var(--bkw-selected-text);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: .4s;
  letter-spacing: 0.1em; /* 2026-09-19 カンプ実測: 4文字で 66px */
}

.bkw__search-button:hover {
  opacity: 0.7;
}

/* ---------------- 予約確認リンク（ツールバー直下・右寄せ） ---------------- */
.bkw__meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  max-width: 960px; /* ツールバー・カレンダーの右端にそろえる(2026-10-26 に 890px から広げた) */
  margin: 23px auto 0; /* 2026-09-19 カンプ実測: ツールバー下端からリンク中心まで 29px */
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6); /* 2026-10-20 カンプ(10/2 .ai)実測: パネル #787878 の上で 201 */
}

.bkw__note {
  margin: 0;
}

.bkw__meta-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: .4s;
}

.bkw__meta-link:hover {
  opacity: 0.7;
}

/* ---------------- 予約するモーダル内（パネル＋常時表示カレンダー） ---------------- */
.bkw.-panel {
  background: var(--bkw-panel);
  padding: 85px 40px 97px; /* 2026-09-19 カンプ実測: モーダル高さ 780px */
}

.bkw.-panel .bkw__board {
  /* 2026-10-26: 890px(カンプ) → 960px に広げた。矢印(盤の外 80px)がパネルの端から 20px 内側に収まる幅まで */
  max-width: min(960px, calc(100% - 120px));
  margin: 51px auto 0; /* 2026-09-19 カンプ実測(リンクとの間隔) */
}

/* モーダル中身が縦に長くなるためスクロール型センタリングに変更 */
.booking-modal__inner.-bkw {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 90.6%;
  max-width: 1200px; /* 2026-10-26: カンプの 1160px から広げた(本人指示) */
  margin: 40px auto;
  flex-shrink: 0;
}

/* 2026-10-26: 画面の高さに収まるときは上下中央に置く(収まらないときは今までどおり上 40px から並べてスクロール)。
   .booking-modal(common.css)をスクロールしたまま縦並びにし、前後の空き(::before / ::after)で余りを半分ずつ取る */
.booking-modal {
  display: flex;
  flex-direction: column;
}

.booking-modal::before,
.booking-modal::after {
  content: "";
  flex: 1 0 0;
}

/* ---------------- カレンダーオーバーレイ（帯用） ---------------- */
.bkw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(0, 0, 0, 0.45);
  padding: 40px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--bkw-font);
  color: var(--bkw-text);
}

.bkw-overlay.-open {
  display: block;
}

.bkw-overlay__inner {
  position: relative;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  background: var(--bkw-panel);
  padding: 90px 135px 60px;
}

.bkw-overlay__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  z-index: 10;
  transition: .4s;
}

.bkw-overlay__close:hover {
  opacity: 0.7;
}

.bkw-overlay__guide {
  margin: 0 0 20px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.05em;
}

/* ---------------- カレンダー本体 ---------------- */
.bkw__board {
  position: relative;
}

.bkw__nav-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: .4s;
}

.bkw__nav-button:hover {
  opacity: 0.6;
}

.bkw__nav-button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* 2026-10-26: カレンダーを広げたので盤との間を 25px → 20px に詰めた(カンプは -85px) */
.bkw__nav-button--prev {
  left: -80px;
}

.bkw__nav-button--next {
  right: -80px;
}

.bkw__nav-button--prev::after,
.bkw__nav-button--next::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  pointer-events: none;
}

.bkw__nav-button--prev::after {
  left: calc(50% - 2px);
  transform: translate(0, -50%) rotate(135deg);
}

.bkw__nav-button--next::after {
  right: calc(50% - 2px);
  transform: translate(0, -50%) rotate(-45deg);
}

.bkw__months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

.bkw__month {
  min-height: 438px; /* 6週の月(1行目 126px + 6×45 - 5 + 下 46px)と同じ高さ */
  padding: 39px 20px 46px; /* 2026-09-19 カンプ実測 */
  background: var(--bkw-board);
  border: 1px solid var(--bkw-board-line);
  border-radius: var(--bkw-radius);
  box-shadow: 0 0 17px rgba(0, 0, 0, 0.05); /* 2026-10-27 イラレのドロップシャドウ(乗算・不透明度5%・ずらし0・ぼかし10px・黒)。ぼかしはカンプの画素(枠の外 1〜2px 117／3〜6px 118／7〜12px 119／13px〜 120)と Chrome の描画が全部一致する 17px */
}

.bkw__month-title {
  margin: 0 0 34px; /* 2026-09-19 カンプ実測 */
  text-align: center;
  font-size: 20px;
  font-weight: bold; /* 2026-10-20 カンプ(10/2 .ai)の書体が DNPShueiGoGinStd-B(日付・曜日は M = 通常の太さ) */
  letter-spacing: 0.02em; /* カンプ「2026年7月」= 98px(0.06em だと 104px) */
  color: var(--bkw-text);
}

.bkw__weekdays,
.bkw__days {
  display: grid;
  grid-template-columns: repeat(7, 40px);
  gap: 5px;
  justify-content: center;
}

.bkw__weekdays {
  margin-bottom: 17px; /* 2026-09-19 カンプ実測 */
}

.bkw__weekday {
  font-size: 15px;
  text-align: center;
  color: var(--bkw-text);
}

.bkw__weekday--sun {
  color: var(--bkw-yellow);
}

.bkw__day-blank,
.bkw__day {
  height: 40px;
  letter-spacing: 0;
}

.bkw__day-blank {
  pointer-events: none;
}

.bkw__day {
  position: relative;
  border: 1px solid var(--bkw-line);
  border-radius: 0;
  background: transparent;
  color: var(--bkw-text);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: .3s;
}

.bkw__day:hover {
  background: rgba(255, 255, 255, 0.15);
}

.bkw__day--past {
  pointer-events: none;
  background: transparent;
  border: none !important;
  color: var(--bkw-text-muted);
}

.bkw__day--sunday:not(.bkw__day--start):not(.bkw__day--end):not(.bkw__day--range) {
  color: var(--bkw-yellow);
  border-color: var(--bkw-yellow-line);
}

/* 祝日(bkw__day--holiday)はカンプどおり色を変えない(7/20 海の日・8/11 山の日が白のまま)。title 属性で祝日名だけ出す(2026-09-19) */

.bkw__day--sunday.bkw__day--past,
.bkw__day--holiday.bkw__day--past {
  color: var(--bkw-text-muted) !important; /* 2026-09-19: 上の :not 連鎖(0,4,0)に負けて過去の日曜が黄色のままだった */
}

.bkw__day--closed {
  cursor: not-allowed;
  background: transparent;
  color: var(--bkw-text-muted) !important;
  border: none !important;
}

.bkw__day--closed::after {
  content: "";
  position: absolute;
  top: 14%;
  left: 50%;
  width: 1px;
  height: 72%;
  background: var(--bkw-text-muted);
  transform: translateX(-50%) rotate(46deg);
}

.bkw__day--closed:hover {
  background: transparent;
}

.bkw__day--range {
  z-index: 1;
  background: var(--bkw-range);
  border-color: var(--bkw-range);
}

.bkw__day--start,
.bkw__day--end {
  z-index: 2;
  background: var(--bkw-selected);
  border-color: var(--bkw-selected);
  color: var(--bkw-selected-text);
}

/* 選択中・範囲内のセルは hover でも色を変えない(2026-09-19: .bkw__day:hover が勝って
   クリック直後のチェックアウト日が白でなく半透明になっていた) */
.bkw__day--range:hover {
  background: var(--bkw-range);
}

.bkw__day--start:hover,
.bkw__day--end:hover {
  background: var(--bkw-selected);
}

/* ---------------- レスポンシブ ---------------- */
@media (max-width: 1250px) {
  .bkw.-panel {
    padding: 60px 30px 70px;
  }

  .bkw-overlay__inner {
    padding: 70px 60px 25px;
  }

  .bkw__nav-button {
    width: 50px;
    height: 50px;
  }

  .bkw__nav-button--prev {
    left: -60px;
  }

  .bkw__nav-button--next {
    right: -60px;
  }

  /* 2026-10-26: 1025〜1115px で前後の矢印がパネルの外へ出ていた。
     矢印は盤の外 60px まで出るので、パネルの余白 30px で足りない分＋パネルの端との間 20px ぶん盤を詰める */
  .bkw.-panel .bkw__board {
    max-width: min(960px, calc(100% - 100px));
  }
}

@media (max-width: 1024px) {
  .bkw__toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bkw__search-wrap {
    grid-column: 1 / -1;
  }

  .bkw.-panel .bkw__board,
  .bkw__board {
    padding-top: 60px;
  }

  .bkw.-panel .bkw__board {
    max-width: none; /* 矢印が盤の上に移るので、1250px 以下で詰めた分を戻す */
  }

  .bkw__nav-button {
    top: 0;
    width: 40px;
    height: 40px;
    transform: none;
  }

  .bkw__nav-button--prev {
    left: 0;
  }

  .bkw__nav-button--next {
    left: 50px;
    right: auto;
  }
}

@media (max-width: 850px) {
  .bkw-band {
    padding: 22px 0;
  }

  /* SP：ホテル1行／チェックイン・アウト2列／大人・室数・検索1行 */
  .bkw__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 10px;
  }

  .bkw__field--hotel {
    width: 100%;
  }

  .bkw__field--date {
    width: calc(50% - 5px);
  }

  .bkw__field--adults,
  .bkw__field--rooms {
    width: 70px;
  }

  .bkw__search-wrap {
    width: calc(100% - 160px);
  }

  .bkw__label {
    margin-bottom: 10px;
  }

  .bkw__value,
  .bkw__select,
  .bkw__search-button {
    height: 40px;
  }

  .bkw__value,
  .bkw__select {
    padding-left: 10px;
  }

  .bkw__label {
    font-size: 11px; /* 2026-09-19 カンプ実測(「チェックイン」63px) */
    line-height: 12px; /* 行送りは 12px のまま(ラベル→フィールドの間隔をカンプに合わせる) */
  }

  .bkw__select-wrap::after {
    right: 10px;
  }

  .bkw__search-button {
    font-size: 16px; /* 2026-09-19 カンプ実測(文字高 16px・幅 66px) */
  }

  .bkw__meta {
    justify-content: flex-start;
    margin-top: 27px; /* 2026-09-19 カンプ実測 */
  }

  .bkw.-panel {
    padding: 50px 25px 83px; /* 2026-09-19 カンプ実測: パネル高さ 1120px */
  }

  .bkw.-panel .bkw__board {
    margin-top: 35px; /* 2026-09-19 カンプ実測: リンク→矢印 33px */
    padding-top: 67px; /* 矢印 40px + 27px */
  }

  .booking-modal__inner.-bkw {
    width: 92.3%;
    margin: 15px auto 30px;
  }

  .bkw-overlay {
    padding: 20px 12px;
  }

  .bkw-overlay__inner {
    padding: 60px 18px 20px;
  }

  .bkw__months {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bkw__month {
    min-height: auto;
    padding: 27px 10px 36px; /* 2026-09-19 カンプ実測(パネル上端→見出し 28 / 曜日 67 / 1行目 92 / 最終行→下端 37) */
  }

  .bkw__month-title {
    margin-bottom: 25px;
    font-size: 14px; /* カンプ「2026年7月」高さ 14px・幅 80px */
    letter-spacing: 0.08em;
  }

  .bkw__weekdays,
  .bkw__days {
    grid-template-columns: repeat(7, 30px);
  }

  .bkw__weekdays {
    margin-bottom: 12px;
  }

  .bkw__weekday {
    font-size: 14px;
  }

  .bkw__day {
    font-size: 13px; /* 2026-09-19 カンプ実測(数字の高さ 11px) */
  }

  .bkw__day-blank,
  .bkw__day {
    height: 30px;
  }
}

/* ---------------- トリプラの検索バー（使わない） ----------------
   2026-10-27: 上野新御徒町のコード(019f8c5a-…)はトリプラ側の検索バー設定が「全ページに表示・中央」のため、
   tripla.min.js がページの真ん中に検索バー(.search-widget-wrapper-872d0c)を差し込んでいた。
   ほかの館はトリプラ側で存在しない URL だけに表示する設定にして隠している(その状態と同じにする)。
   予約はこのファイルの予約モーダル(.bkw)から TriplaBookingWidget で開く */
#tripla-searching-app {
  display: none !important;
}
