/* =========================================================
   page-contact.css : お問い合わせ
   page-pill / 説明文 / フォーム / 同意チェック / 送信ボタン / 完了モーダル
   施設子サイト（りじょう認定こども園）※静的（フェーズBでContact Form 7化）
   ========================================================= */

/* ===== ページタイトル pill（共通仕様） ===== */
.page-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 500px;
  max-width: calc(100% - 40px);
  height: 70px;
  margin: 40px auto 0;
  background: var(--color-white);
  border: 1px solid var(--color-accent-mid);
  border-radius: 10px;
  font-family: var(--font-gothic);
  font-weight: 900;
  font-size: 28px;
  color: var(--color-accent);
}

/* ===== Contact セクション ===== */
.contact__inner {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.contact__intro {
  max-width: max-content;
  margin: 0 auto;
  text-align: left;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 2;
  color: var(--color-text-sub);
}

/* ===== フォーム ===== */
.cform {
  width: max-content;
  max-width: 100%;
  margin: 36px auto 0;
}
.cform__row {
  display: grid;
  grid-template-columns: 165px 345px max-content;
  grid-template-areas: "label control req";
  align-items: center;
}
.cform__row + .cform__row { margin-top: 15px; }
.cform__row--area { align-items: start; }

.cform__label {
  grid-area: label;
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--color-text-sub);
}
.cform__req {
  grid-area: req;
  margin-left: 8px;
  font-family: var(--font-base);
  font-size: 14px;
  color: #999;
  white-space: nowrap;
}
.cform__control { grid-area: control; }
.cform__row--area .cform__label,
.cform__row--area .cform__req { padding-top: 12px; }

/* 入力欄共通 */
.cform__input {
  width: 100%;
  height: 41px;
  padding: 0 12px;
  background: var(--color-white);
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.2);
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--color-text);
}
.cform__input::placeholder { color: #b3b3b3; }
.cform__input:focus { outline: 2px solid var(--color-accent-mid); outline-offset: 0; }
.cform__textarea {
  height: 288px;
  padding: 10px 12px;
  line-height: 1.7;
  resize: vertical;
}
/* セレクト（プルダウン矢印を自前描画） */
.cform__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-accent) 50%),
    linear-gradient(135deg, var(--color-accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 12px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* 注意文 */
.cform__notice {
  max-width: max-content;
  margin: 30px auto 0;
  text-align: left;
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-sub);
}
.cform__notice a { color: var(--color-accent); text-decoration: underline; }

/* 同意チェック（中央） */
.cform__agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--color-text-sub);
  cursor: pointer;
}
.cform__agree input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

/* 送信ボタン（白・緑枠・緑文字＋片矢じり／中央） */
.cform__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  height: 45px;
  margin: 22px auto 0;
  background: var(--color-white);
  border: 1px solid var(--color-accent-mid);
  border-radius: 10px;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-accent);
  cursor: pointer;
  transition: opacity 0.2s;
}
.cform__submit:hover { opacity: 0.7; }
.cform__submit-arrow {
  position: absolute;
  right: -24px;
  top: calc(50% - 1px);
  width: 45px;
  height: 2px;
  background: var(--color-accent-mid);
}
.cform__submit-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 9px;
  height: 2px;
  background: var(--color-accent-mid);
  transform-origin: right bottom;
  transform: rotate(45deg);
}

/* ===== Contact Form 7 互換 ===== */
.cform__control .wpcf7-form-control-wrap { display: block; }
.cform__control .wpcf7-form-control { width: 100%; }
/* 同意（CF7 acceptance） */
.cform__agree .wpcf7-form-control-wrap { display: inline; }
.cform__agree .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.cform__agree label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cform__agree input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--color-accent); cursor: pointer; }
/* 送信ボタン wrap（CF7の[submit]は<input>のため、矢印は兄弟spanで重ねる） */
.cform__submit-wrap { position: relative; width: max-content; margin: 22px auto 0; }
.cform__submit-wrap .cform__submit { margin: 0; }
.cform__submit-wrap .wpcf7-spinner { position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); }
/* CF7 メッセージ */
.cform .wpcf7-response-output { margin: 16px auto 0; max-width: 560px; text-align: center; font-size: 14px; border-radius: 6px; }
.cform .wpcf7-not-valid-tip { margin-top: 4px; font-size: 12px; }

/* ===== 完了モーダル ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.modal__box {
  position: relative;
  width: 300px;
  max-width: calc(100% - 40px);
  padding: 27px 26px 22px;
  background: #fdfdf0;
  border-radius: 10px;
  text-align: center;
}
.modal__text {
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-accent);
}
.modal__ok {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  max-width: 100%;
  height: 45px;
  margin: 24px auto 0;
  background: var(--color-white);
  border: 1px solid var(--color-accent-mid);
  border-radius: 10px;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-accent);
  cursor: pointer;
  transition: opacity 0.2s;
}
.modal__ok:hover { opacity: 0.7; }

/* =========================================================
   レスポンシブ（SP : max-width 750px）
   ========================================================= */
@media (max-width: 750px) {
  .page-pill { width: 300px; max-width: calc(100% - 40px); height: 40px; font-size: 22px; margin-top: 24px; }

  .contact__inner { max-width: none; }
  .contact__intro { text-align: center; max-width: none; }

  /* フォーム：ラベル上・入力欄全幅 */
  .cform { width: auto; margin-top: 28px; }
  .cform__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label req"
      "control control";
    align-items: center;
    row-gap: 8px;
  }
  .cform__req { margin-left: 0; justify-self: end; }
  .cform__row--area .cform__label,
  .cform__row--area .cform__req { padding-top: 0; }
  .cform__textarea { height: 250px; }

  .cform__notice { text-align: center; max-width: none; margin-top: 28px; }
  .cform__submit { width: 100%; max-width: 360px; height: 52px; }
}
