@charset "UTF-8";

/* ==========  Form Section  ========== */

.p-form {
  /*
	 * 波の上下振幅。コンテンツが欠けないよう、この分を padding に足す。
	 */
  --form-wave: 56px;
  --form-pad: 20px;
  --form-field-radius: 10px;

  position: relative;
  isolation: isolate;
}

.p-form__panel {
  position: relative;
  z-index: 1;
  padding: calc(var(--form-wave) + 16px) var(--form-pad)
    calc(var(--form-wave) + 40px);
  border-radius: 0;
  /* 波形状はSVG背景。maskだと環境によって塗りが消えるため使わない。 */
  background-color: transparent;
  background-image: url("../img/form/panel-wave.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  color: var(--color-white);
}

.p-form__inner {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

/* ----------  装飾イラスト  ---------- */

.p-form__deco {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.p-form__illust {
  position: absolute;
  width: auto;
}

.p-form__illust--couple {
  top: 34px;
  left: 10px;
  height: 80px;
}

.p-form__illust--wheelchair {
  top: 140px;
  right: 8px;
  height: 72px;
}

.p-form__illust--cane {
  bottom: -64;
  left: 8px;
  height: 104px;
}

.p-form__illust--care {
  right: 24px;
  bottom: 0;
  height: 88px;
}

/* ==========  Step  ========== */

/*
 * JSが動くまでは全ステップを表示しておく。
 * スクリプトが落ちても入力・送信ができる状態を残す。
 */
.p-form__steps.is-ready .p-form__step {
  display: none;
}

.p-form__steps.is-ready .p-form__step.is-active {
  display: block;
}

.p-form__progress {
  margin-bottom: 16px;
  font-family: var(--font-en);
  font-size: calc(13px + var(--sp-fs-adjust));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.p-form__progress-current {
  font-size: calc(20px + var(--sp-fs-adjust));
}

/* ----------  見出し  ---------- */

.p-form__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-bottom: 32px;
  font-family: var(--font-fv);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.p-form__title-line {
  display: inline-block;
  padding: 4px 18px;
  border-radius: 16px;
  background-color: var(--color-navy);
  font-size: calc(24px + var(--sp-fs-adjust));
  letter-spacing: 0.06em;
}

.p-form__title-line--strong {
  padding-inline: 8px;
  font-size: calc(40px + var(--sp-fs-adjust));
}

/* ----------  行  ---------- */

.p-form__row {
  margin-bottom: 24px;
}

.p-form__row:last-child {
  margin-bottom: 0;
}

.p-form__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-fv);
  font-size: calc(16px + var(--sp-fs-adjust));
  font-weight: 700;
  letter-spacing: 0.04em;
}

.p-form__required {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--color-accent);
  font-size: calc(11px + var(--sp-fs-adjust));
  vertical-align: 2px;
}

/* ----------  テキスト入力  ---------- */

.p-form__input,
.p-form__textarea {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: var(--form-field-radius);
  background-color: var(--color-white);
  color: var(--color-text);
  font-size: calc(16px + var(--sp-fs-adjust));
  line-height: 1.6;
}

.p-form__input {
  height: 52px;
}

.p-form__textarea {
  height: 132px;
  resize: vertical;
}

.p-form__input::placeholder,
.p-form__textarea::placeholder {
  color: #9aa2b1;
}

.p-form__input:focus-visible,
.p-form__textarea:focus-visible {
  outline: none;
  border-color: var(--color-navy);
}

/* ----------  選択肢  ---------- */

.p-form__choices .wpcf7-form-control,
.p-form__choices-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 16px;
  border-radius: var(--form-field-radius);
  background-color: var(--color-white);
}

.p-form__choices .wpcf7-list-item {
  margin: 0;
}

.p-form__choices label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-navy);
  font-size: calc(14px + var(--sp-fs-adjust));
  line-height: 1.5;
  cursor: pointer;
}

.p-form__choices input[type="checkbox"],
.p-form__choices input[type="radio"] {
  appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #c3ccd8;
  border-radius: 50%;
  background-color: var(--color-white);
  cursor: pointer;
}

.p-form__choices input:checked {
  border-color: var(--color-primary-deep);
  background-color: var(--color-primary-deep);
  box-shadow: inset 0 0 0 3px var(--color-white);
}

.p-form__choices input:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}

/* ----------  同意チェック  ---------- */

.p-form__accept {
  margin-bottom: 24px;
  text-align: center;
}

.p-form__accept .wpcf7-list-item {
  margin: 0;
}

.p-form__accept label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: calc(14px + var(--sp-fs-adjust));
  cursor: pointer;
}

.p-form__accept input[type="checkbox"] {
  appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: var(--color-white);
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
}

.p-form__accept input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2333426b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3 8.4l3.4 3.4L13 4.6'/%3E%3C/svg%3E");
}

.p-form__accept a {
  text-decoration: underline;
}

/* ----------  任意項目の区切り  ---------- */

.p-form__divider {
  display: inline-block;
  margin-block: 8px 8px;
  padding: 4px 14px;
  border-radius: 6px;
  background-color: var(--color-white);
  color: var(--color-primary-deep);
  font-family: var(--font-fv);
  font-size: calc(14px + var(--sp-fs-adjust));
  font-weight: 700;
}

.p-form__divider-note {
  margin: 0 0 20px;
  color: var(--color-white);
  font-family: var(--font-fv);
  font-size: calc(12px + var(--sp-fs-adjust));
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ----------  送信確認  ---------- */

.p-form__confirm-lead {
  margin: 0 0 20px;
  color: var(--color-white);
  font-family: var(--font-fv);
  font-size: calc(13px + var(--sp-fs-adjust));
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.p-form__confirm-list {
  display: grid;
  gap: 10px;
  margin: 0 0 8px;
  padding: 16px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.12);
}

.p-form__confirm-item {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.p-form__confirm-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.p-form__confirm-label {
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-fv);
  font-size: calc(12px + var(--sp-fs-adjust));
  font-weight: 500;
  line-height: 1.4;
}

.p-form__confirm-value {
  color: var(--color-white);
  font-family: var(--font-fv);
  font-size: calc(14px + var(--sp-fs-adjust));
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.p-form__confirm-value.is-empty {
  font-weight: 500;
  opacity: 0.7;
}

/* ----------  操作エリア  ---------- */

.p-form__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 36px;
  /* 相談員イラストはボタンの左に重ねるだけなので、要素は増やさず背景で置く。 */
}

.p-form__actions::before {
  content: "";
  position: absolute;
  bottom: -47px;
  left: 24px;
  width: 140px;
  height: 140px;
  background-image: url("../img/form/illust-staff.png");
  background-position: bottom left;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.p-form__actions--plain {
  justify-content: space-between;
  min-height: 0;
}

.p-form__actions--plain::before {
  content: none;
}

.p-form__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 52px;
  border-radius: 12px;
  background-color: var(--color-navy);
  box-shadow: 0 3px 0 var(--color-navy-shadow);
  color: var(--color-white);
  font-family: var(--font-fv);
  font-size: calc(17px + var(--sp-fs-adjust));
  font-weight: 700;
  letter-spacing: 0.1em;
  transition:
    translate 0.15s ease,
    box-shadow 0.15s ease;
}

/* [submit] は input のため flex が効かない。中央揃えを text-align で担保する。 */
input.p-form__btn {
  display: block;
  border: none;
  text-align: center;
}

.p-form__btn:active {
  translate: 0 2px;
  box-shadow: 0 1px 0 var(--color-navy-shadow);
}

.p-form__btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
}

.p-form__btn-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  translate: 0 -50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-white);
}

.p-form__btn-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--color-navy);
  border-right: 2px solid var(--color-navy);
  rotate: 45deg;
  translate: -1px 0;
}

.p-form__back {
  color: var(--color-white);
  font-size: calc(14px + var(--sp-fs-adjust));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-form__note {
  display: flex;
  justify-content: right;
  font-size: calc(12px + var(--sp-fs-adjust));
  line-height: 1.6;
  padding: 16px 0 0;
  font-family: var(--font-display);
}

/* ==========  Contact Form 7 の上書き  ========== */

.p-form .wpcf7-form-control-wrap {
  display: block;
}

.p-form .wpcf7-spinner {
  margin-left: 8px;
}

/* CF7標準のエラーチップと、ステップ側の自前エラーで見た目を揃える。 */
.p-form .wpcf7-not-valid-tip,
.p-form__error {
  display: block;
  margin-top: 6px;
  color: #fff2ef;
  font-size: calc(13px + var(--sp-fs-adjust));
  font-weight: 700;
}

.p-form__error[hidden] {
  display: none;
}

.p-form .wpcf7-not-valid-tip::before,
.p-form__error::before {
  content: "！";
  margin-right: 4px;
  color: var(--color-accent);
}

.p-form .p-form__input.wpcf7-not-valid,
.p-form .p-form__textarea.wpcf7-not-valid,
.p-form__row.is-error .p-form__input,
.p-form__row.is-error .p-form__textarea {
  border-color: var(--color-accent);
}

.p-form__choices.is-error .wpcf7-form-control,
.p-form__choices.is-error .p-form__choices-list {
  outline: 2px solid var(--color-accent);
  outline-offset: 0;
}

.p-form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 12px 16px;
  border: 2px solid var(--color-white);
  border-radius: 8px;
  font-size: calc(14px + var(--sp-fs-adjust));
  line-height: 1.6;
}

.p-form__missing {
  padding: 24px;
  border: 2px dashed var(--color-white);
  border-radius: 8px;
  text-align: center;
}

.p-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.p-form__server-error {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 2px solid var(--color-white);
  border-radius: 8px;
  color: #fff2ef;
  font-size: calc(14px + var(--sp-fs-adjust));
  font-weight: 700;
  line-height: 1.6;
}
