/* ==========================================================================
   Contact Page – p-contact / p-form / p-thanks
   ========================================================================== */


/* ==========================================================================
   1 COLUMN LAYOUT OVERRIDE (no sidebar)
   ========================================================================== */

.p-contact-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-2xl) var(--gutter) var(--sp-4xl);
}


/* ==========================================================================
   PAGE HEADING & INTRO
   ========================================================================== */

.p-contact__heading {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-md);
}

.p-contact__subtext {
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--sp-2xl);
}


/* ==========================================================================
   STEP INDICATOR
   ========================================================================== */

.p-step {
  margin-bottom: var(--sp-2xl);
}

.p-step__list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.p-step__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0.9em 1em;
  background: var(--color-bg-light);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  position: relative;
}

/* 矢印セパレーター */
.p-step__item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 10px solid var(--color-border);
  z-index: 2;
}

.p-step__item:not(:last-child)::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 19px solid transparent;
  border-bottom: 19px solid transparent;
  border-left: 9px solid var(--color-bg-light);
  z-index: 3;
}

.p-step__item--active {
  background: var(--color-darkblue);
  color: var(--color-white);
  font-weight: var(--fw-bold);
}

.p-step__item--active::before {
  border-left-color: var(--color-darkblue);
}

.p-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  font-family: var(--font-en);
  flex-shrink: 0;
}

.p-step__item:not(.p-step__item--active) .p-step__num {
  background: var(--color-border);
  color: var(--color-text-muted);
}

.p-step__label {
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
}


/* ==========================================================================
   REQUIRED NOTICE & PRIVACY NOTE
   ========================================================================== */

.p-form__required-note {
  font-size: var(--fs-sm);
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--sp-1_5xl);
}

.p-form__required-mark {
  color: var(--color-red);
  font-weight: var(--fw-bold);
}

.p-form__privacy-intro {
  font-size: var(--fs-xs);
  line-height: 1.85;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: var(--sp-2xl);
}


/* ==========================================================================
   FORM ITEMS – ラベル上・入力下（縦積みレイアウト）
   ========================================================================== */

.p-form {
  margin-top: var(--sp-md);
}

.p-form__item {
  margin-bottom: var(--sp-xl);
}

.p-form__item:last-of-type {
  margin-bottom: 0;
}

/* ── ラベル ── */
.p-form__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-heading);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* 必須マーク ※ ― 赤文字 */
.p-form__req {
  color: var(--color-red);
  font-weight: var(--fw-bold);
  font-size: 1em;
  line-height: 1;
}

/* ── 入力コントロール ── */
.p-form__control {
  width: 100%;
}


/* ==========================================================================
   INPUT / TEXTAREA / SELECT – 枠線なし・薄いグレー背景
   ========================================================================== */

.p-form__control input[type="text"],
.p-form__control input[type="email"],
.p-form__control input[type="tel"],
.p-form__control input[type="file"],
.p-form__control select,
.p-form__control textarea {
  width: 100%;
  background: var(--color-bg-light); /* #F7F7F7 */
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9em 1em;
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.6;
  outline: none;
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.p-form__control input[type="text"]:focus,
.p-form__control input[type="email"]:focus,
.p-form__control input[type="tel"]:focus,
.p-form__control select:focus,
.p-form__control textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 2px var(--color-blue);
}

.p-form__control input::placeholder,
.p-form__control textarea::placeholder {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* テキストエリア */
.p-form__control textarea {
  min-height: 220px;
  resize: vertical;
}

/* 都道府県など幅の狭い入力 */
.p-form__input--narrow {
  width: 120px !important;
}


/* ==========================================================================
   CHECKBOX GROUP
   ========================================================================== */

.p-form__checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm) var(--sp-xl);
  padding-top: 4px;
}

.p-form__check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.p-form__check-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-blue);
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: 2px;
}


/* ==========================================================================
   FILE UPLOAD
   ========================================================================== */

.p-form__file-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: 0.9em 1em;
}

/* ブラウザデフォルトの file input を非表示 */
.p-form__file-input {
  display: none;
}

.p-form__file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-dark);
  color: var(--color-white);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: 0.55em 1.4em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
  white-space: nowrap;
}

.p-form__file-btn:hover {
  background: var(--color-text);
}

.p-form__file-name {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-form__file-note {
  margin-top: var(--sp-sm);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.7;
}


/* ==========================================================================
   CONSENT / PRIVACY AGREEMENT
   ========================================================================== */

.p-form__consent {
  margin-top: var(--sp-2xl);
  text-align: center;
}

.p-form__consent-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: var(--sp-md);
}

.p-form__consent-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-blue);
  cursor: pointer;
}

.p-form__consent-check span {
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.p-form__consent-check a {
  color: var(--color-blue);
  text-decoration: underline;
}

.p-form__consent-check a:hover {
  color: var(--color-blue-hover);
}

.p-form__consent-note {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 4px;
}

.p-form__consent-note a {
  color: var(--color-blue);
  text-decoration: underline;
}


/* ==========================================================================
   SUBMIT BUTTON
   ========================================================================== */

.p-form__submit {
  margin-top: var(--sp-xl);
  display: flex;
  justify-content: center;
}

.p-form__submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-darkblue-80); /* グレーがかった青：未入力状態に合わせた色 */
  color: var(--color-white);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  font-family: var(--font-sans);
  letter-spacing: 0.1em;
  border: none;
  border-radius: var(--radius-pill);
  padding: 1em 4em;
  cursor: pointer;
  min-width: 200px;
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.p-form__submit-btn:hover {
  background: var(--color-blue);
  box-shadow: var(--shadow-md);
}

/* 1. 親要素をFlexboxにして中央揃え */
.p-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. 左側：スピナーと全く同じ寸法のダミー空間 */
.p-form__submit::before {
    content: "";
    display: block;
    width: 24px; /* スピナーの画像幅に合わせて調整 */
    margin-right: 10px; /* ボタン左側の余白 */
}

/* 3. 右側：CF7のスピナー設定（空間を常に確保） */
.p-form__submit .wpcf7-spinner {
    display: inline-block !important;
    width: 24px;  /* 左側のdummy空間と同じ幅 */
    height: 24px; /* スピナーの高さ */
    margin-left: 10px; /* ボタン右側の余白（左側margin-rightと同じ値） */
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
    visibility: hidden; /* 空間を残したまま透明にする */
}

/* 4. 送信中（is-active付与時）のみスピナーを見せる */
.p-form__submit .wpcf7-spinner.is-active {
    visibility: visible;
}

/* ==========================================================================
   THANKS PAGE – p-thanks
   ========================================================================== */

.p-thanks {
  text-align: center;
  padding: var(--sp-4xl) 0 var(--sp-4xl);
}

.p-thanks__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
  line-height: 1.4;
  margin-bottom: var(--sp-xl);
}

.p-thanks__text {
  font-size: var(--fs-sm);
  line-height: 2.2;
  color: var(--color-text);
  margin-bottom: var(--sp-2xl);
}

.p-thanks__btn {
  margin-bottom: var(--sp-3xl);
}

/* トップページへ戻るボタン */
.p-thanks__top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  border-radius: var(--radius-pill);
  padding: 1em 3.5em;
  min-width: 280px;
  text-decoration: none;
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.p-thanks__top-btn:hover {
  background: var(--color-blue-hover);
  box-shadow: var(--shadow-md);
}

/* メールが届かない方へ – gray rounded box */
.p-thanks__note {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-3xl);
  background: var(--color-bg-light);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  text-align: center;
}

.p-thanks__note-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
  margin-bottom: var(--sp-lg);
  text-align: center;
}

.p-thanks__note-text {
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--color-text);
  text-align: center;
}

.p-thanks__note-text + .p-thanks__note-text {
  margin-top: var(--sp-md);
}

.p-thanks__note-text a {
  color: var(--color-blue);
  text-decoration: underline;
}


/* ==========================================================================
   Responsive – 1280px
   ========================================================================== */
@media (max-width: 1280px) {
  /* max-width が小さいので変更なし */
}


/* ==========================================================================
   Responsive – 1024px
   ========================================================================== */
@media (max-width: 1024px) {
  .p-contact-wrap {
    padding-top: var(--sp-xl);
    padding-bottom: var(--sp-3xl);
  }

  .p-contact__heading {
    font-size: var(--fs-xl-mid);
  }

  .p-thanks__title {
    font-size: var(--fs-xl-mid);
  }
}


/* ==========================================================================
   Responsive – 768px (Mobile)
   ========================================================================== */
@media (max-width: 768px) {
  .p-contact-wrap {
    padding-top: var(--sp-lg);
    padding-bottom: var(--sp-2xl);
  }

  .p-contact__heading {
    font-size: var(--fs-xl);
  }

  .p-step__item {
    padding: 0.7em 0.5em;
  }

  .p-step__label {
    font-size: var(--fs-xs);
  }

  .p-form__item {
    margin-bottom: var(--sp-lg);
  }

  .p-form__checkbox-group {
    gap: var(--sp-sm) var(--sp-lg);
  }

  .p-form__file-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-sm);
  }

  .p-form__submit-btn {
    padding: 1em 2.5em;
    min-width: 0;
    width: 100%;
    max-width: 280px;
  }

  /* thanks */
  .p-thanks {
    padding-top: var(--sp-2xl);
    padding-bottom: var(--sp-2xl);
  }

  .p-thanks__title {
    font-size: var(--fs-xl-mid);
  }

  .p-thanks__top-btn {
    min-width: 0;
    width: 100%;
    max-width: 300px;
  }

  .p-thanks__note {
    padding: var(--sp-xl) var(--sp-lg);
  }

  .p-thanks__note-text br {
    display: none; /* SP では改行なしで折り返し */
  }
}
