﻿/* =========================================
   カラー変数（元のCSSからフォームで使用する分を抽出）
   ========================================= */
:root {
  --brand-black: #222;
  --brand-white: #ffffff;
  --brand-green: #5cb03c;
  --color-primary: var(--brand-green);
}

/* =========================================
   フォーム全体・見出し
   ========================================= */
.c-form {
 font-weight: 500;
 width: 90%;
 max-width: 1200px;
 padding-bottom: 30px;
}

@media screen and (min-width: 1024px) {
  .c-form {
    font-size: 16px;
    margin: 4em auto 0;
  }
}

@media screen and (max-width: 1023px) {
  .c-form {
    font-size: 14px;
    margin: 4em auto 0;
  }
}

.c-form__headline {
  text-align: center;
  font-weight: 600;
  margin-bottom: 3em;
}

@media screen and (min-width: 1024px) {
  .c-form__headline {
    font-size: clamp(14px, 28px, 2.1875vw);
  }
}

@media screen and (max-width: 1023px) {
  .c-form__headline {
    font-size: clamp(10px, 20px, 5.3333333333vw);
  }
}

/* =========================================
   フォーム項目（行）とラベル
   ========================================= */
.c-form__item {
  text-align: left;
}

@media screen and (min-width: 1024px) {
  .c-form__item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
  }
  .c-form__item:first-child {
    margin-top: 80px;
  }
}

@media screen and (max-width: 1023px) {
  .c-form__item {
    margin-bottom: 24px;
  }
  .c-form__item:first-child {
    margin-top: 40px;
  }
}

.c-form__item:last-child {
  margin-bottom: 0;
}

.c-form__label,
.c-form__label-required {
  position: relative;
  display: block;
  font-weight: 600;
}

@media screen and (min-width: 1024px) {
  .c-form__label,
  .c-form__label-required {
    width: 330px;
    padding-right: 1em;
  }
}

@media screen and (max-width: 1023px) {
  .c-form__label,
  .c-form__label-required {
    width: 100%;
    margin-bottom: 1em;
  }
}

.c-form__label-required {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.c-form__label-required::after {
  content: "必須";
  display: inline-block;
  margin-left: 1em;
  background-color: var(--color-primary);
  color: var(--brand-white);
  padding: 0.5em 1em;
  line-height: 1;
  border-radius: 0.25em;
}

@media screen and (min-width: 1024px) {
  .c-form__label-required::after {
    font-size: 12px;
  }
}

@media screen and (max-width: 1023px) {
  .c-form__label-required::after {
    font-size: 10px;
  }
}

/* =========================================
   入力エリア（ボディ）
   ========================================= */
@media screen and (min-width: 1024px) {
  .c-form__body {
    width: calc(100% - 330px);
  }
}

@media screen and (max-width: 1023px) {
  .c-form__body {
    width: 100%;
  }
}

/* =========================================
   テキスト・日付・テキストエリア
   ========================================= */
.c-form__input,
.c-form__input--search,
.c-form__input--short,
.c-form__input--date,
.c-form__input--min,
.c-form__input--max,
.c-form__textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 2px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.c-form__input::placeholder,
.c-form__input--search::placeholder,
.c-form__input--short::placeholder,
.c-form__input--date::placeholder,
.c-form__input--min::placeholder,
.c-form__input--max::placeholder,
.c-form__textarea::placeholder {
  color: #999;
}

.c-form__input:focus,
.c-form__input--search:focus,
.c-form__input--short:focus,
.c-form__input--date:focus,
.c-form__input--min:focus,
.c-form__input--max:focus,
.c-form__textarea:focus {
  border-color: #e5d1c5;
  background-color: #fff;
}

.c-form__input,
.c-form__input--search {
  width: 480px;
  max-width: 90%;
}

.c-form__input:not(:last-child),
.c-form__input--search:not(:last-child) {
  margin-bottom: 8px;
}

.c-form__input--short {
  width: 10em;
  max-width: 90%;
  display: inline-block;
}

.c-form__input--short:not(:last-child) {
  margin-bottom: 8px;
}

.c-form__date-wrapper {
  position: relative;
  display: inline-block;
  width: 10em;
  max-width: 90%;
}

.c-form__date-wrapper::after {
  font-family: 'Material Symbols Outlined';
  content: "calendar_today";
  font-size: 16px;
  color: var(--brand-black);
  position: absolute;
  right: 1em;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-variation-settings: 'FILL' 0, 'wght' 400;
}

.c-form__input--date {
  width: 100%;
  padding-right: 2em;
}

.c-form__input--date::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  color: transparent;
  cursor: pointer;
  z-index: 1;
}

.c-form__input--min {
  max-width: 5em;
  display: inline-block;
}

.c-form__input--min:not(:last-child) {
  margin-bottom: 8px;
}

.c-form__input--max {
  width: 100%;
  display: block;
}

.c-form__input--max:not(:last-child) {
  margin-bottom: 8px;
}

.c-form__textarea {
  min-height: 150px;
  resize: vertical;
}

/* =========================================
   ラジオボタン・チェックボックス（wpcf7なし対応版）
   ========================================= */
.c-form__radio,
.c-form__checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.c-form__radio label,
.c-form__checkbox label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.c-form__radio input,
.c-form__checkbox input {
  display: none;
}

.c-form__radio label > span,
.c-form__checkbox label > span {
  position: relative;
  display: flex;
  align-items: center;
}

.c-form__radio label > span::before,
.c-form__checkbox label > span::before {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  border: 1px solid #ccc;
  background: #fff;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* 左側にボタンを配置（デフォルト） */
.c-form__radio:not(.button-is-right) label > span,
.c-form__checkbox:not(.button-is-right) label > span {
  padding-left: 1.5em;
}

.c-form__radio:not(.button-is-right) label > span::before,
.c-form__checkbox:not(.button-is-right) label > span::before {
  left: 0;
}

/* 右側にボタンを配置（.button-is-right 指定時） */
.c-form__radio.button-is-right label > span,
.c-form__checkbox.button-is-right label > span {
  padding-right: 1.5em;
}

.c-form__radio.button-is-right label > span::before,
.c-form__checkbox.button-is-right label > span::before {
  right: 0;
}

/* ラジオボタンの丸デザイン */
.c-form__radio label > span::before {
  border-radius: 50%;
}

.c-form__radio input:checked + span::before {
  border-color: var(--color-primary);
}

.c-form__radio input:checked + span::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0.6em;
  height: 0.6em;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.c-form__radio:not(.button-is-right) label > span::after {
  left: 0.2em;
}

.c-form__radio.button-is-right label > span::after {
  right: 0.2em;
}

/* チェックボックスの四角デザイン */
.c-form__checkbox label > span::before {
  border-radius: 2px;
}

.c-form__checkbox input:checked + span::before {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.c-form__checkbox input:checked + span::after {
  font-family: 'Material Symbols Outlined';
  content: "check";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1em;
  line-height: 1;
  color: var(--brand-white);
  font-variation-settings: 'FILL' 0, 'wght' 600;
}

.c-form__checkbox:not(.button-is-right) label > span::after {
  left: 0;
}

.c-form__checkbox.button-is-right label > span::after {
  right: 0;
}

/* =========================================
   送信ボタン
   ========================================= */
.c-form__submit-wrapper {
  display: flex;
  justify-content: center;
}

@media screen and (min-width: 1024px) {
  .c-form__submit-wrapper {
    margin-top: 80px;
  }
}

@media screen and (max-width: 1023px) {
  .c-form__submit-wrapper {
    margin-top: 40px;
  }
}

.c-form__button-wrapper {
  position: relative;
}

@media screen and (min-width: 1024px) {
  .c-form__button-wrapper {
    width: 100%;
    max-width: 300px;
    height: 60px;
  }
}

@media screen and (max-width: 1023px) {
  .c-form__button-wrapper {
    min-width: 60%;
    height: 45px;
  }
}

.c-form__button-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 30px;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--brand-white);
  border-right: 1px solid var(--brand-white);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.c-form__button,
.c-form__button--search {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--brand-white);
  background-color: var(--color-primary);
  border: none;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.c-form__button:hover,
.c-form__button--search:hover {
  opacity: 0.75;
}

.c-form__button-wrapper + .c-form__button-wrapper {
  margin-left: 20px;
}

/* =========================================
   送信完了画面用スタイル（必要に応じて使用）
   ========================================= */
.c-form__complete {
  width: 960px;
  max-width: 88%;
}

@media screen and (min-width: 1180px) {
  .c-form__complete {
    margin: 120px auto 160px;
  }
}

@media screen and (max-width: 1179px) {
  .c-form__complete {
    margin: 50px auto 75px;
  }
}

.c-form__complete-catch {
  font-family: "Roboto", sans-serif;
  line-height: 1;
  text-align: center;
  color: var(--color-primary);
    margin: 0;
}

@media screen and (min-width: 1180px) {
  .c-form__complete-catch {
    font-size: clamp(36px, 64px, 8vw);
  }
}

@media screen and (max-width: 1179px) {
  .c-form__complete-catch {
    font-size: clamp(16px, 32px, 8.5333333333vw);
  }
}

.c-form__complete-title {
  margin-top:1.15em;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

@media screen and (min-width: 1180px) {
  .c-form__complete-title {
    font-size: clamp(10px, 20px, 1.5625vw);
  }
}

@media screen and (max-width: 1179px) {
  .c-form__complete-title {
    font-size: clamp(8px, 16px, 4.2666666667vw);
  }
}

.c-form__complete-text {
  margin-top: 5em;
  font-size: 14px;
  line-height: 2;
}

@media screen and (min-width: 1180px) {
  .c-form__complete-text {
    margin: 100px auto;
      text-align: center;
  }
}

@media screen and (max-width: 1179px) {
  .c-form__complete-text {
    margin: 50px auto;
  }
}

.c-form__complete-text span {
  display: inline-block;
}