@charset "utf-8";

/* Contact page. Company / Recruit と同じ左レール + 本文シェルを使う。
   フォームは唯一の本文なので色面には載せず、見出し・リード文・フォームを
   本文カラムの同じ左端に縦へ積む。 */

/* --- Legacy wrapper reset ------------------------------------------------- */
#content-wrapper.contact-shell::before {
  display: none;
}

#content {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
}

#main {
  float: none;
  width: 100%;
  max-width: none;
  margin: 0;
}

#contact {
  --color-error: #9b352e;
  --color-error-surface: #fff7f6;
  --contact-body-measure: 45rem;
  width: 100%;
  min-width: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

/* --- Section -------------------------------------------------------------- */
/* ページ見出しは `.page-shell` の左カラムが持つ。本文側は個別の container-box を
   重ねず、960px の本文カラムをそのまま使う。 */
.contact-section__inner {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

/* --- Inquiry -------------------------------------------------------------- */
/* 上は詰める。メイン写真を外したので（2026-10-05）、本文は左カラムの見出しと同じ高さから始める。 */
.contact-section--inquiry .contact-section__inner {
  padding-block: 0 var(--space-2xl);
}

.contact-section__body {
  min-width: 0;
}

.contact-section__lead {
  max-width: var(--contact-body-measure);
  margin-inline: auto;
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: 1.9;
}

/* 入力欄が間延びしないよう、フォームもリード文と同じ measure で止める。 */
.contact-form-panel {
  min-width: 0;
  max-width: var(--contact-body-measure);
  margin-inline: auto;
  margin-top: var(--space-lg);
}

.contact-form-panel .wpcf7,
.contact-form-panel .wpcf7-form {
  margin: 0;
}

.cf7-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm) var(--space-md);
  align-items: start;
}

.cf7-col {
  display: contents;
}

.cf7-contact br {
  display: none;
}

.cf7-contact p {
  min-width: 0;
  margin: 0;
}

.cf7-contact label {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: var(--lh-snug);
}

.cf7-contact .wpcf7-form-control-wrap {
  display: block;
}

.cf7-contact input:not([type="submit"]),
.cf7-contact textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin-top: var(--space-2xs);
  padding: var(--space-2xs) var(--space-xs);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  /* 面を敷かなくなったので、入力欄は地の色(--color-bg)と同色にすると沈む。白で抜く。 */
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  transition:
    border-color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.cf7-contact input:not([type="submit"]) {
  min-height: 2.75rem;
}

.cf7-contact textarea {
  height: 10rem;
  min-height: 10rem;
  resize: vertical;
}

.cf7-contact input:not([type="submit"]):hover,
.cf7-contact textarea:hover,
.cf7-contact input:not([type="submit"]):focus,
.cf7-contact textarea:focus {
  border-color: var(--color-heading);
}

.cf7-contact input[aria-invalid="true"],
.cf7-contact textarea[aria-invalid="true"] {
  border-color: var(--color-error);
  background: var(--color-error-surface);
}

.cf7-col--right > p {
  grid-column: 1 / -1;
}

/* 最下段は「注記」を全幅の行に置き、その下の行へ Turnstile（左）と送信ボタン（右）を
   並べる。DOM 順は 注記 → ウィジェット → 送信 で、送信ボタンより前にウィジェットが
   来る順序は崩さない（キーボード操作でチャレンジを先に踏ませるため）。
   ⚠️ フォームテンプレートに [turnstile] を書かないと CF7 が wpcf7_form_elements で
   .cf7-contact の外側・先頭へ自動挿入する。タグは必ずテンプレート側に置くこと。 */
.cf7-note {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
}

.cf7-contact .wpcf7-turnstile {
  grid-column: 1;
  align-self: center;
  min-width: 0;
}

.cf7-submit {
  grid-column: 2;
  align-self: center;
  justify-self: end;
}

.cf7-submit p {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
}

input.wpcf7-submit {
  width: 11rem;
  min-height: 2.75rem;
  margin: 0;
  padding: var(--space-2xs) var(--space-lg);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-surface);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

input.wpcf7-submit:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

input.wpcf7-submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.wpcf7-spinner {
  flex: none;
  margin: 0;
}

.wpcf7-not-valid-tip {
  display: block;
  margin-top: var(--space-3xs);
  color: var(--color-error);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}

.wpcf7 form .wpcf7-response-output {
  margin: var(--space-md) 0 0;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-color: var(--color-error);
  background: var(--color-error-surface);
}

.contact-form-unavailable {
  margin: 0;
  color: var(--color-text-muted);
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 768px) {
  .contact-section--inquiry .contact-section__inner {
    padding-block: 0 var(--space-xl);
  }

  .contact-form-panel {
    margin-top: var(--space-md);
  }

  .cf7-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .cf7-col--left > p,
  .cf7-col--right > p,
  .cf7-note,
  .cf7-contact .wpcf7-turnstile,
  .cf7-submit {
    grid-column: 1;
  }

  .cf7-submit {
    justify-self: start;
  }

  .cf7-submit p {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  input.wpcf7-submit {
    width: 100%;
  }
}
