/* ==========================================================================
   WP だけで要る上書き
   common.css / page.css は静的版からのコピー（tools/sync_theme.py）なので直接触らない。
   ここには WordPress 由来のマークアップ（CF7・ブロック本文・管理バー）に当てるものだけ書く
   ========================================================================== */

/* 管理バーが出ているときは固定ヘッダーを下げる */
.admin-bar .l-header { top: 32px; }

@media (max-width: 782px) {
  .admin-bar .l-header { top: 46px; }
}

.screen-reader-text,
.screen-reader-response {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- 2人掲載 */
/* 1人目のプロフィール文のあとに2人目の氏名が続く */
.p-article__bio + .p-article__name { margin-top: clamp(28px, 3vw, 40px); }

/* ---------------------------------------------------------- 固定ページ本文 */
/* ブロックエディタの group に付く余白・幅制限を外して .p-doc の組みに揃える */
.p-entry .wp-block-group {
  max-width: none;
  margin: 0;
  padding: 0;
}

.p-entry > .wp-block-group > *:first-child { margin-top: 0; }

.p-entry p + p { margin-top: .4em; }

.p-entry h2 strong { font-weight: inherit; }

.p-entry a:not(.c-btn) {
  text-decoration: underline;
  text-underline-offset: .25em;
  text-decoration-color: var(--c-line);
  transition: text-decoration-color .35s var(--ease);
}

.p-entry a:not(.c-btn):hover { text-decoration-color: currentColor; }

/* 現行ポリシーは「1.」付きの li。先頭の飾りと番号が二重にならないよう飾りは消す */
.p-entry .wp-block-list li { padding-left: 0; }
.p-entry .wp-block-list li::before { content: none; }

/* --------------------------------------------------------- Contact Form 7 */
/* 現行フォームのマークアップ:
   .contact_form > .form_list > (.dt > .Item_name + .required) + label > .wpcf7-form-control-wrap > input
   を静的版の .p-form と同じ見た目にする */
.p-entry .wpcf7 { max-width: 680px; }

/* CF7 の隠しフィールド。CF7 の CSS でも消えるが、読み込み順に頼らない */
.p-entry .wpcf7 .hidden-fields-container { display: none; }

.p-entry .form_list {
  padding-block: clamp(22px, 2.6vw, 32px);
  border-bottom: 1px solid var(--c-line);
}

.p-entry .form_list:first-child { border-top: 1px solid var(--c-line); }

.p-entry .form_list .dt {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

.p-entry .form_list .required {
  margin-left: .8em;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--g-coral);
}

.p-entry .form_list label { display: block; }

.p-entry .wpcf7 input[type="text"],
.p-entry .wpcf7 input[type="email"],
.p-entry .wpcf7 input[type="tel"],
.p-entry .wpcf7 input[type="url"],
.p-entry .wpcf7 textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-base-deep);
  border: 1px solid var(--c-line);
  border-radius: 0;
  transition: border-color .4s var(--ease);
}

.p-entry .wpcf7 input:focus,
.p-entry .wpcf7 textarea:focus { border-color: var(--c-text-mute); outline: none; }

.p-entry .wpcf7 textarea { min-height: 190px; resize: vertical; }

.p-entry .wpcf7-acceptance label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}

.p-entry .wpcf7-acceptance input { width: 16px; height: 16px; accent-color: var(--g-coral); }

.p-entry .wpcf7 .submit { margin-top: clamp(34px, 4vw, 48px); }

/* 送信ボタンは .c-btn と同じ */
.p-entry .wpcf7-submit {
  appearance: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  padding: 18px 40px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  background-image:
    linear-gradient(rgba(255, 255, 255, .58), rgba(255, 255, 255, .58)),
    var(--grad-line);
  color: #1E1F21;
  transition: opacity .4s var(--ease), filter .4s var(--ease);
}

.p-entry .wpcf7-submit:hover { filter: saturate(1.2) brightness(1.05); opacity: .82; }
.p-entry .wpcf7-submit:disabled { opacity: .45; cursor: not-allowed; }

.p-entry .wpcf7-spinner { vertical-align: middle; margin-left: 16px; }

.p-entry .wpcf7-not-valid-tip {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--g-coral);
}

.p-entry .wpcf7 form .wpcf7-response-output {
  margin: 28px 0 0;
  padding: 14px 18px;
  font-size: 13px;
  border: 1px solid var(--c-line);
}

.p-entry .wpcf7 form.sent .wpcf7-response-output { border-color: var(--g-mint); }
.p-entry .wpcf7 form.invalid .wpcf7-response-output,
.p-entry .wpcf7 form.failed .wpcf7-response-output { border-color: var(--g-coral); }
