/* ==========================================================================
   rh-wp.css — 今のテーマ（css/import.css）と共通パーツの調整。ここだけ手書き（ほかの rh-*.css は試作から自動コピー）
   読み込みは import.css・style.css の後（rh_head）
   ========================================================================== */
/* セレクタの先頭の html は、今のテーマの a:hover などの指定に負けないため（tools/css_bump.py で付けた。新しく書くときも付ける） */

/* 今のページの上の余白は --headerH で取っている → 新しいヘッダーの高さに合わせる */
:root { --headerH: var(--rh-header-h); }

/* テーマの header {} footer {} の要素指定（高さ 60px・半透明・下の余白）を打ち消す */
html header.rh-header { height: auto; background-color: var(--rh-white); }
html footer.rh-footer { margin-bottom: 0; }
/* ページの中の header 要素（イベント詳細のタイトルまわり .rh-evhead など）にも、テーマのサイトヘッダーの指定（固定・高さ・背景）がかかるので外す */
html .rh-shell--body header { position: static; height: auto; width: auto; background-color: transparent; z-index: auto; }

/* テーマの「h1〜h6・p・span・div は line-height 1.6・font-weight 400」を、部品の中では元に戻す
   （詳細度は要素1つ分。部品側のクラス指定には負ける） */
html :where(.rh-shell) :is(h1, html h2, html h3, html h4, html h5, html h6, html p, html span, html div) { line-height: revert; font-weight: revert; }

/* テーマの img { display: block; margin: 0 auto } と、リセットの small { font-size: 100% } を部品の中では戻す */
html :where(.rh-shell) img { display: revert; margin: revert; }
html :where(.rh-shell) small { font-size: revert; }

/* テーマが body に付けている字詰め（palt）と字間（0.05em）を、部品には引き継がない */
html .rh-shell { font-feature-settings: normal; letter-spacing: normal; }

/* 今の物件・イベントの詳細（旧来の形）は、テーマの申し込みバー（parts/assets/reserve_float）が画面の下に残る。
   前のフッターと同じく、その分だけ下を空けて、フッターの最後が隠れないようにする（新しい形のページを作るときに見直す） */
body.single-property:not(.rh-page--pdetail) footer.rh-footer,
body.single-event:not(.rh-page--event) footer.rh-footer { margin-bottom: 60px; }   /* 新しい形のイベントは rh-event.css の申し込みバー */

/* テーマのリセット（fieldset の余白、h1〜h6 の文字の大きさ 100%）を、部品の中ではブラウザの標準に戻す（試作と同じ前提にする） */
html :where(.rh-shell) fieldset { margin: revert; }
html :where(.rh-shell) :is(h1, html h2, html h3, html h4, html h5, html h6) { font-size: revert; }

/* テーマの label { font-weight: 100; display: inline-block; max-width: 100% } を部品の中では戻す */
html :where(.rh-shell) label { display: revert; max-width: revert; margin-bottom: revert; font-weight: revert; }

/* 物件：参考プランの見出し（h5）の下余白は、試作ではブラウザ標準のまま。テーマの見出しリセットで消えるので戻す */
html .rh-shell .rh-pd-setplan__catch{margin-block-end:revert}

/* 採用エントリー（/recruit/。rh/parts/recruit-form.php）：今の採用ページの枠の中に、他のフォームと同じ部品で置く */
html .rh-recruit-entry { max-width: 760px; margin: 0 auto; text-align: left; }
html .rh-recruit-entry__law { margin: 8px 0 20px; padding: 16px 18px; background: var(--rh-soft, #f3f7fb); border-radius: 8px; font-size: 13px; line-height: 1.8; color: var(--rh-ink2, #444); }
html .rh-recruit-entry__law p + p { margin-top: 10px; }
html .rh-recruit-entry .rh-formcard { border: 0; padding: 0; background: none; box-shadow: none; }   /* 採用ページの白い枠の中に置くので、枠を二重にしない */
html .rh-recruit-entry [hidden] { display: none !important; }   /* 採用ページの CSS が section を表示にしているので、確認・完了の段を隠したままにする */
html .rh-recruit-entry .rh-back { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }   /* 採用ページはボタンの初期化が無いので、ブラウザの灰色のボタンを消す */
html .rh-recruit-entry :is(input, textarea, select, button) { font-family: var(--rh-sans); }   /* 入力欄・ボタンがブラウザの既定（Arial など）になっていた。ほかのフォームと同じ書体に（最終確認 10/15） */

/* 追従（sticky）が効くように：今のテーマは main に overflow-x: hidden（＝縦もスクロールの箱になる）を付けていて、
   物件詳細のページ内メニュー・右の申し込み欄、イベントの申し込み欄の追従が止まっていた。clip はスクロールの箱を作らずに横のはみ出しだけ隠す */
html main { overflow-x: clip; overflow-y: visible; }

/* イベントの予約の受け方「枠から選ぶ」（rh/event/slots.php・rh/js/rh-slots.js）：小さな月のカレンダー＋その日の時間の枠。PC は横並び、スマホは縦 */
html .rh-slotpick__body { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 10px; }
html .rh-slotpick__cal { padding: 12px; border: 1px solid var(--rh-line); border-radius: 6px; background: var(--rh-white); }
html .rh-slotpick__head { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; margin-bottom: 8px; text-align: center; }
html .rh-slotpick__head p { font-size: 14px; font-weight: 700; }
html .rh-slotpick__nav { width: 32px; height: 32px; border: 1px solid var(--rh-line); border-radius: 50%; background: var(--rh-white); color: var(--rh-blue); font-size: 16px; line-height: 1; cursor: pointer; }
html .rh-slotpick__nav:disabled { opacity: .3; cursor: default; }
html .rh-slotpick__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
html .rh-slotpick__wd { padding: 2px 0; font-size: 11px; color: var(--rh-gray); text-align: center; }
html .rh-slotpick__wd.is-sun { color: #c0392b; }
html .rh-slotpick__wd.is-sat { color: var(--rh-blue); }
html .rh-slotpick__day { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 42px; border: 1px solid transparent; border-radius: 6px; background: none; color: #c3cad1; font: inherit; font-size: 14px; line-height: 1.1; }
html .rh-slotpick__day small { font-size: 9px; font-weight: 700; }
html .rh-slotpick__day.is-free { border-color: #b9d3ec; background: var(--rh-soft); color: var(--rh-blue); font-weight: 700; cursor: pointer; }
html .rh-slotpick__day.is-full { background: #f1f3f5; color: #9aa4ae; cursor: pointer; }
html .rh-slotpick__day[aria-pressed="true"] { border-color: var(--rh-blue); background: var(--rh-blue); color: var(--rh-white); }
html .rh-slotpick__date { font-size: 14px; font-weight: 700; }
html .rh-slotpick__slots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; }   /* 時間の枠は1行に1つ（「1カラムの方が選びやすい」） */
html .rh-slotpick__slot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 16px; border: 1px solid var(--rh-line); border-radius: 6px; background: var(--rh-white); color: var(--rh-text); font: inherit; text-align: left; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
html .rh-slotpick__slot b { font-size: 14px; }
html .rh-slotpick__slot small { font-size: 11px; font-weight: 700; color: #1f7a4d; }
html .rh-slotpick__slot.is-full { background: #f1f3f5; color: #9aa4ae; cursor: not-allowed; }
html .rh-slotpick__slot.is-full small { color: #9aa4ae; }
html .rh-slotpick__slot[aria-pressed="true"] { border-color: var(--rh-blue); background: var(--rh-blue); color: var(--rh-white); }
html .rh-slotpick__slot[aria-pressed="true"] small { color: var(--rh-white); }
html .rh-slotpick__hint, html .rh-slotpick__empty { font-size: 13px; color: var(--rh-gray); }
html .rh-slotpick__day:focus-visible, html .rh-slotpick__slot:focus-visible, html .rh-slotpick__nav:focus-visible { outline: 2px solid var(--rh-blue); outline-offset: 2px; }
@media (hover: hover) {
  html .rh-slotpick__day.is-free:not([aria-pressed="true"]):hover { border-color: var(--rh-blue); }
  html .rh-slotpick__slot:not(.is-full):not([aria-pressed="true"]):hover { border-color: var(--rh-blue); background: var(--rh-soft); }
}
@media (max-width: 767px) {
  html .rh-slotpick__body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* 全体メニュー：指・マウスで開いたときはメニュー全体にフォーカスを移す（rh-common.js）。その枠は出さない（10/15） */
html .rh-gmenu:focus { outline: none; }

/* 採用ページ：デジタルブックを「思いやりと夢を持とう」の前に移した（page-recruit.php。両備さんの依頼・清水 10/27）。
   「思いやりと夢を持とう」の青い箱は上に重ねる作りなので、PC はデジタルブックの欄の下を空けて、ボタンに近づきすぎないように */
@media (min-width: 768px) {
  html .page-recruit .desitalbook-sec { padding-bottom: 150px; }
}
/* 採用ページの電話の案内（.recruit-header-tel）：右上に固定だと新しいヘッダーの下で一番上の写真と見出しに重なる → 右下に追従（清水 10/27）。スマホは今まで通り出さない */
@media (min-width: 768px) {
  html .page-recruit .recruit-header-tel { top: auto; bottom: 24px; right: 24px; }   /* 大きさは元の 500px のまま（清水 10/27） */
}
