/* ==========================================================
   Contact Form 7（MW WP Form からの移行 2026-10）
   - 確認モーダル（cf7-enhance.js）
   - CF7 が出力する要素の調整
   色・角丸は既存テーマ（styles.css）の値に合わせる
   ========================================================== */

/* ---------- 確認モーダル ---------- */
.c-cf7-confirm {
  margin: auto; /* 採用サイトの「* { margin: 0 }」で中央寄せが消えるのを防ぐ */
  width: calc(100% - 32px);
  max-width: 640px;
  max-height: calc(100% - 32px);
  padding: 0;
  border: none;
  border-radius: .375rem;
  color: #424850;
  background: #fff;
}

.c-cf7-confirm::backdrop {
  background: rgba(66, 72, 80, .6);
}

.c-cf7-confirm__inner {
  padding: 2.5rem 2.5rem 2rem;
}

.c-cf7-confirm__title {
  margin-bottom: .75rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: #8ab3bd;
  text-align: center;
  letter-spacing: .04em;
}

.c-cf7-confirm__lead {
  margin-bottom: 1.5rem;
  font-size: .9375rem;
  text-align: center;
}

.c-cf7-confirm__list {
  display: grid;
  grid-template-columns: 11rem 1fr;
  border-top: 1px solid #e4eaef;
}

.c-cf7-confirm__list dt,
.c-cf7-confirm__list dd {
  padding: .875rem .5rem;
  border-bottom: 1px solid #e4eaef;
  font-size: 1rem;
  line-height: 1.6;
}

.c-cf7-confirm__list dt {
  font-weight: 700;
}

.c-cf7-confirm__list dd {
  white-space: pre-wrap;
  word-break: break-all;
}

.c-cf7-confirm__list dd.is-empty {
  color: #9aa0a6;
}

.c-cf7-confirm__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.c-cf7-confirm__button {
  width: 100%;
  max-width: 12.625rem;
  padding: .875rem 0;
  border: 1px solid #8ab3bd;
  border-radius: .375rem;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: opacity .2s;
}

.c-cf7-confirm__button:hover {
  opacity: .7;
}

.c-cf7-confirm__button:disabled {
  opacity: .5;
  cursor: default;
}

.c-cf7-confirm__button--back {
  color: #8ab3bd;
  background: #fff;
}

.c-cf7-confirm__button--send {
  color: #fff;
  background: #8ab3bd;
}

/* 採用エントリーは採用サイトの緑に合わせる */
.entry .c-cf7-confirm__title {
  color: #5bc382;
}

/* 採用サイトのフォーム部品の指定（.entry #entry button 等）より優先させる */
.entry #entry .c-cf7-confirm .c-cf7-confirm__button {
  width: 100%;
  max-width: 12.625rem;
  padding: .875rem 0;
  border: 1px solid #5bc382;
  border-radius: .375rem;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.entry #entry .c-cf7-confirm .c-cf7-confirm__button--back {
  color: #5bc382;
  background: #fff;
}

.entry #entry .c-cf7-confirm .c-cf7-confirm__button--send {
  color: #fff;
  background: #5bc382;
}

@media screen and (max-width: 768px) {
  .c-cf7-confirm__inner {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .c-cf7-confirm__list {
    grid-template-columns: 1fr;
  }

  .c-cf7-confirm__list dt {
    padding-bottom: 0;
    border-bottom: none;
  }

  .c-cf7-confirm__list dd {
    padding-top: .25rem;
  }
}

/* ---------- CF7 が出力する要素の調整 ---------- */

/* お問い合わせ：「確認する」ボタン（button 要素のブラウザ標準の枠を消し、MW WP Form 時代の input と同じ見た目にする） */
.p-contact-button__submit {
  border: 0;
  background-color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.p-contact-button__submit:disabled {
  opacity: .5;
  cursor: default;
}

/* お問い合わせ：CF7 のラジオを MW WP Form 時代と同じ並びにする
   （CF7 の外枠 span を無視させ、選択肢を既存テーマのレイアウトの直接の子として扱う） */
.p-sub-contact-radio .wpcf7-form-control-wrap,
.p-sub-contact-radio .wpcf7-radio,
.p-sub-contact-radio .wpcf7-checkbox {
  display: contents;
}

.p-sub-contact-radio .wpcf7-list-item {
  margin: 0;
}

.p-sub-contact-radio .wpcf7-list-item-label {
  display: inline;
  width: auto;
}

/* 入力エラーの文言 */
.wpcf7-not-valid-tip {
  margin-top: .375rem;
  font-size: .875rem;
}

/* 採用エントリー：ラジオ・同意チェックの並び（MW WP Form 時代と同じ横並び） */
.entry #entry .entry_form .wpcf7-list-item {
  margin: 0 1.5em 0 0;
}

.entry #entry #pv_check .wpcf7-list-item {
  margin: 0;
}

.entry #entry .submit_btn button:disabled {
  opacity: .5;
  cursor: default;
}
