@charset "UTF-8";
/* cms.css … WordPress のエディタ（Gutenberg）が出力するHTMLの調整だけを書く。
   段階3（ブロックスタイル・パターン）・段階4（ページの流し込み）で必要になった分を足す */

/* ===== WordPress本体のボタンの見た目を打ち消す =====
   本体のボタンの指定（丸い形・灰色・余白など）は reset.wp にある。ここ（reset）はそれより必ず強く、
   テーマのボタン（components の c-btn）より弱い。静的HTMLの <a class="c-btn"> と同じ、何も付いていない状態に戻す */
@layer reset {
  .wp-block-button__link,
  .wp-element-button {
    background: none; color: inherit; border: 0; border-radius: 0; padding: 0; box-shadow: none;
    font: inherit; line-height: inherit; letter-spacing: inherit; text-align: inherit; text-decoration: none; word-break: inherit;
    width: auto; height: auto; align-content: normal; /* 本体は width:100%・height:100% で、ボタンが横いっぱいに伸びる */
  }
  .wp-block-buttons { display: block; gap: normal; }
}

@layer cms {
  /* ===== ログイン中の管理バー =====
     管理バーが出ている間は、画面上部に固定したヘッダーを管理バーの下に下げる（表側だけ。ログアウト中は関係ない） */
  .admin-bar .l-header { top: 32px; }
  @media (max-width: 782px) {
    .admin-bar .l-header { top: 46px; }
  }
  @media (max-width: 600px) {
    /* この幅では管理バーが固定されず、一緒にスクロールする */
    .admin-bar .l-header { top: 0; }
  }

  /* ===== ボタンブロック（表側） =====
     ボタンのクラス（c-btn・c-btn--*）とスタイル（is-style-*）は、ブロックの外側の <div class="wp-block-button"> に付く。
     表側では functions.php（theme_button_classes）が、これらのクラスを中の <a> に移すので、静的HTMLと同じCSSがそのまま効く。
     外側の <div> は表示上ないものとして扱い、静的HTMLと同じく <a> が直接並ぶようにする（親が flex・grid のときの並び方を変えないため） */
  .wp-block-button:has(> .wp-block-button__link.c-btn) { display: contents; }

  /* ===== ボタンブロック（エディタ用） =====
     エディタではクラスを移せないため、components.css のボタンの指定を、中のリンクに当て直している（表側では効かない）。
     エディタでは本体のCSSのほうが強いため、同じ内容を css/editor.css（@layer の外）にも書いている */
  .wp-block-button:is(.c-btn, [class*="c-btn--"], [class*="is-style-"]) {
    display: inline-block; background: transparent; border: 0; padding: 0; margin: 0; box-shadow: none; color: inherit;
  }
  :where(.is-site-corporate, .is-site-recruit) .wp-block-button:is(.c-btn, .is-style-primary, .is-style-outline, .is-style-navy, .is-style-accent, .is-style-invert) > .wp-block-button__link { display: inline-flex; align-items: center; gap: .6em; font-family: var(--ff-sans); font-size: 1rem; font-weight: var(--fw-bold); letter-spacing: var(--tr-ui); padding: 1.05em 2em; border: 1px solid transparent; white-space: nowrap; }
  :where(.is-site-corporate, .is-site-recruit) .wp-block-button:is(.c-btn--primary, .is-style-primary) > .wp-block-button__link { background: var(--c-action-primary); color: var(--c-text-invert); }
  :where(.is-site-corporate, .is-site-recruit) .wp-block-button:is(.c-btn--accent, .is-style-accent) > .wp-block-button__link { background: var(--c-action-warm); color: var(--c-text-invert); }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn--outline, .is-style-outline) > .wp-block-button__link { background: transparent; border-color: var(--c-brand-800); color: var(--c-brand-800); box-shadow: none; }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn--invert, .is-style-invert) > .wp-block-button__link { background: var(--c-bg); color: var(--c-brand-900); }
  :where(.is-site-buyer) .wp-block-button:is(.c-btn, .is-style-primary, .is-style-outline, .is-style-navy, .is-style-accent, .is-style-invert) > .wp-block-button__link { display: inline-flex; align-items: center; gap: .6em; font-family: var(--ff-sans); font-size: 1rem; font-weight: var(--fw-bold); letter-spacing: var(--tr-ui); padding: 1.05em 2em; border: 2px solid transparent; white-space: nowrap; }
  :where(.is-site-buyer) .wp-block-button:is(.c-btn--primary, .is-style-primary) > .wp-block-button__link { background: var(--c-action-primary); color: var(--c-text-invert); border: none; }
  :where(.is-site-buyer) .wp-block-button:is(.c-btn--navy, .is-style-navy) > .wp-block-button__link { background: var(--c-navy); color: var(--c-text-invert); border: none; }
  :where(.is-site-recruit) .wp-block-button:is(.c-btn--navy, .is-style-navy) > .wp-block-button__link { background: var(--c-navy); color: var(--c-text-invert); }
  :where(.is-site-buyer, .is-site-recruit) .wp-block-button:is(.c-btn--outline, .is-style-outline) > .wp-block-button__link { background: transparent; border-color: var(--c-brand-800); color: var(--c-brand-800); }
  :where(.is-site-buyer) .wp-block-button:is(.c-btn--invert, .is-style-invert) > .wp-block-button__link { background: var(--c-bg); color: var(--c-navy); border: none; }
  .wp-block-button.c-btn--wide > .wp-block-button__link { width: 100%; justify-content: center; }
  :where(.is-site-recruit) .wp-block-button.c-btn--lg > .wp-block-button__link { padding: 1.3em 2.4em; font-size: 1.0625rem; }
  :where(.is-site-corporate, .is-site-recruit) .wp-block-button.c-btn--sm > .wp-block-button__link { padding: .7em 1.3em; font-size: .9rem; }
  :where(.is-site-buyer) .wp-block-button.c-btn--lg > .wp-block-button__link { padding: 1.3em 2.6em; font-size: 1.0625rem; }
  :where(.is-site-recruit) .wp-block-button.c-btn--pill > .wp-block-button__link { border-radius: var(--r-pill); }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn, .is-style-primary, .is-style-outline, .is-style-navy, .is-style-accent, .is-style-invert) > .wp-block-button__link { transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease, filter .22s ease; }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn, .is-style-primary, .is-style-outline, .is-style-navy, .is-style-accent, .is-style-invert) > .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: none; }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn--primary, .is-style-primary) > .wp-block-button__link:hover { background: var(--c-brand-900); }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn--outline, .is-style-outline) > .wp-block-button__link:hover { background: var(--c-brand-800); color: var(--c-text-invert); }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn--accent, .is-style-accent) > .wp-block-button__link:hover { filter: brightness(.92); }
  :where(.is-site-corporate) .wp-block-button:is(.c-btn, .is-style-primary, .is-style-outline, .is-style-navy, .is-style-accent, .is-style-invert) > .wp-block-button__link:hover .c-btn__arrow { transform: translateX(4px); }
}

@layer cms {
  /* ===== Contact Form 7（段階6）=====
     プラグインのCSSは読み込まない（inc/forms.php）。入力欄・ラジオ・チェックは静的HTMLと同じクラスで見た目を付ける。
     CF7 が足す囲み（span）は「ないもの」として扱い、静的HTMLと同じ並びにする。エラー表示・送信結果はページのJSが出す */
  .wpcf7 .screen-reader-response {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap;
  }
  .wpcf7 .hidden-fields-container,
  .wpcf7 .wpcf7-response-output,
  .wpcf7 .wpcf7-not-valid-tip,
  .wpcf7 .wpcf7-spinner { display: none; }
  .wpcf7 :is(.wpcf7-form-control-wrap, .wpcf7-radio, .wpcf7-acceptance, .wpcf7-list-item) { display: contents; }
  .wpcf7 .wpcf7-list-item-label { display: inline; }
  /* ファイル選択：ボタン（ラベル）だけ見せる。静的HTMLでは input に hidden が付いていた */
  .wpcf7 .p-a9form__filebtn input[type="file"] { display: none; }
  /* 2026-11-09 文章の欄：CF7 は rows="10" を付けるため、静的HTML（rows なし＝2行）より高くなっていた（お問い合わせ 140→約370px、中途採用 110→約290px）。
     高さを 0 にして、CSS の min-height（静的HTMLで効いている高さ）だけで決まるようにする。ドラッグで高さを変えるのはそのまま */
  .wpcf7 textarea.wpcf7-textarea { height: 0; }
}

@layer cms {
  /* 2026-11-09 社員インタビュー02（SP）：第3章の2枚の写真（中村さん・黒滝さん）。WPは写真に loading="lazy" を付けるため、
     読み込まれるまで枠の幅が 0 になり、読み込んだときにページの高さが約250px変わっていた。静的HTMLと同じ、横いっぱいの幅に決めておく */
  @media (max-width: 860px) {
    :where(.page-recruit-interview-story02) .p-st2-cross__faces { width: 100%; }
  }
}

@layer cms {
  /* 中途採用エントリーの送信完了ページ（/recruit/entry/thanks/）：写真の見出し（FV）を置かないため、上の固定ヘッダーの分だけ下げる */
  .page-recruit-entry-thanks .p-a9entry { padding-top: calc(var(--header-h) + clamp(2.6rem, 6vw, 4.4rem)); }
}

@layer cms {
  /* 2026-11-09 reCAPTCHA v3 のバッジ（フォームのページだけ）：Google の既定は右下（下から14px）で、画面の下の固定ボタン（.l-sticky-cta）に隠れていた。
     右下のまま、固定ボタンと「ページの上へ」（.l-pagetop）より上に上げる（すき間は、固定ボタンと「ページの上へ」のすき間と同じ）。--theme-badge-b は functions.php の JS が入れる */
  .grecaptcha-badge { bottom: var(--theme-badge-b, 14px) !important; }
  /* バッジを、ページの中身（中途採用のFVの白い曲線など。z-index が付いている）より手前に。固定ボタン（200）・ページの上へ・目次の点（190）よりは後ろ */
  .grecaptcha-badge { z-index: 180 !important; }
  /* 右の目次の点（中途採用エントリー）は、バッジ（高さ60px）のさらに上へ。
     目次の点のJS（assets/js/pages/*-dotnav）が style 属性に --dn-bottom を書くので、bottom を !important で上書きする */
  html[style*="--theme-dn-b"] .c-dotnav { bottom: var(--theme-dn-b) !important; }
  /* SP（768px以下。JSが html に theme-badge-sp を付ける）：バッジを固定ボタンのすぐ上にし、「ページの上へ」をバッジの上へ入れ替える */
  html.theme-badge-sp .l-pagetop { bottom: var(--theme-pt-b) !important; }
}

