/* ============================================================
   contact.css
   ------------------------------------------------------------
   【このファイルの役割】
   お問い合わせページ専用のCSSです。

   このファイルで管理しているもの
   ・お問い合わせページ上部
   ・ページ見出し
   ・お問い合わせフォーム
   ・入力欄
   ・電話番号入力欄
   ・性別選択
   ・年齢入力
   ・必須表示
   ・個人情報の説明
   ・送信ボタン
   ・確認画面のボタン
   ・スマートフォン表示

   【重要】
   このCSSはお問い合わせページ専用です。

   サイト全体のヘッダー・フッターなどは
   common.cssで管理しています。

   【変更するとき】
   お問い合わせページの見た目を変更したい場合
   → このファイルを確認

   ヘッダー・フッターなど共通部分を変更したい場合
   → common.cssを確認

   CSSの数値を変更すると表示位置や大きさが変わるため、
   レイアウトを変更する必要がなければ数値を変更しないでください。
   ------------------------------------------------------------ */

@import url(common.css);

/*
  common.cssを読み込んでいます。

  ヘッダー・フッター・ハンバーガーメニューなど、
  サイト全体で共通するデザインを使用するための設定です。

  【通常変更しない】
*/

/* ============================================================
   ヘッダー固定分
   ------------------------------------------------------------
   common.cssでもmainの上余白を設定していますが、
   このページではお問い合わせページ用の設定を指定しています。

   【変更注意】
   ヘッダーの高さと関係するため、
   よく分からない場合は変更しないでください。
   ============================================================ */

main {
  padding-top: 70px;
}

/* ============================================================
   メインビジュアル
   ------------------------------------------------------------
   ページ上部の
   「お問い合わせ / CONTACT」
   を表示する部分です。

   文字の内容はHTMLで変更します。
   大きさ・余白・色などはこのCSSで変更します。
   ============================================================ */

.contact-visual {
  width: 100%;
  padding: 55px 20px 50px;
  background: #fffdf9;
  box-sizing: border-box;
}

.contact-visual-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;
  box-sizing: border-box;
}

/*
  「CONTACT」の文字です。

  HTMLのcontact-visual内にあるp要素が対象です。
*/

.contact-visual p {
  order: 1;

  margin: 0 0 10px;

  color: #eaa317;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.5;
}

/*
  「お問い合わせ」の見出しです。

  HTML側のh2が対象です。
*/

.contact-visual h2 {
  order: 2;

  margin: 0;

  color: #333;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

/*
  見出し下のオレンジ色の短い線です。

  HTMLには直接書かれていない装飾で、
  CSSの::afterで表示しています。
*/

.contact-visual h2::after {
  content: "";

  display: block;

  width: 48px;
  height: 2px;

  margin: 20px auto 0;

  background: #eaa317;
  border-radius: 10px;
}

/* ============================================================
   お問い合わせセクション
   ------------------------------------------------------------
   フォームを含むお問い合わせページの本体部分です。
   ============================================================ */

.contact-section {
  width: 100%;
  padding: 0 20px 100px;

  background: #fffdf9;

  box-sizing: border-box;
}

.contact-container {
  width: 100%;
  max-width: 1000px;

  margin: 0 auto;

  box-sizing: border-box;
}

/* ============================================================
   ページ見出し
   ------------------------------------------------------------
   フォームの上に表示される説明文です。

   文章そのものはHTMLで変更します。
   文字サイズや余白はここで変更します。
   ============================================================ */

.contact-heading {
  margin: 0 0 45px;
  text-align: center;
}

.contact-heading h3 {
  margin: 0 0 20px;

  color: #333;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.6;
}

.contact-heading p {
  margin: 0;

  color: #555;
  font-size: 14px;
  line-height: 1.9;
}

.contact-heading p + p {
  margin-top: 5px;
}

/* ============================================================
   フォーム
   ------------------------------------------------------------
   お問い合わせフォーム全体の設定です。

   フォームの入力項目はHTMLで管理し、
   見た目はこのCSSで管理します。

   【重要】
   入力項目を追加・削除する場合は、
   HTMLだけでなくPHP側の処理にも関係するため注意してください。
   ============================================================ */

.contact-form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/*
  フォームを表形式に見せるための外枠です。
*/

.form-table {
  width: 100%;
  max-width: 100%;

  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;

  background: #fff;

  box-sizing: border-box;
}

/*
  フォームの各項目を1行として管理しています。

  例：
  お名前 ｜ 入力欄
  メール ｜ 入力欄
  電話番号 ｜ 入力欄

  PCでは左右2列、
  スマートフォンでは上下1列に切り替わります。
*/

.form-row {
  display: flex;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  margin: 0;

  border-bottom: 1px solid #ddd;

  box-sizing: border-box;
}

/*
  左側の項目名です。

  例：
  お名前
  メールアドレス
  電話番号

  必須表示もこの中に入っています。
*/

.form-row > label {
  display: flex;
  align-items: center;

  width: 30%;
  min-width: 30%;

  margin: 0;
  padding: 18px 20px;

  border-right: 1px solid #ddd;

  background: #fffaf0;

  color: #333;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;

  box-sizing: border-box;
}

/*
  右側の入力欄エリアです。

  input・select・textareaなどをこの中に配置します。
*/

.form-field {
  display: flex;
  align-items: center;

  flex: 1;
  min-width: 0;

  padding: 14px 20px;

  box-sizing: border-box;
}

/*
  通常の入力欄をまとめて設定しています。

  対象：
  ・文字入力
  ・メールアドレス
  ・年齢
  ・電話番号
  ・プルダウン
  ・お問い合わせ詳細

  【変更可能】
  入力欄の高さ・文字サイズ・枠などを変更したい場合はここを確認します。
*/

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  display: block;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  margin: 0;
  padding: 11px 13px;

  border: 1px solid #ddd;
  border-radius: 4px;

  background: #fff;

  color: #333;

  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;

  box-sizing: border-box;
}

/*
  お問い合わせ詳細の入力欄です。

  min-heightは最低限の高さ、
  resize: verticalは上下方向だけサイズ変更可能という意味です。
*/

.form-field textarea {
  min-height: 180px;
  resize: vertical;
}

/*
  入力欄をクリックしたときの枠色です。

  現在はサイトのテーマカラーであるオレンジになります。
*/

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #eaa317;
}

/* ============================================================
   電話番号
   ------------------------------------------------------------
   電話番号を3つの入力欄に分けて表示します。

   例：
   04 - 7197 - 3357

   入力欄の幅や「-」の間隔をここで管理します。
   ============================================================ */

.tel-group {
  display: flex;
  align-items: center;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  gap: 8px;

  box-sizing: border-box;
}

.tel-group input[type="tel"] {
  width: 90px;
  max-width: 90px;
  min-width: 0;

  flex: 0 1 90px;

  padding: 11px 8px;

  box-sizing: border-box;
}

.tel-group span {
  flex: 0 0 auto;

  color: #555;
  font-size: 15px;
}

/* ============================================================
   性別
   ------------------------------------------------------------
   男性・女性・回答しないのラジオボタンを横並びにします。

   HTML側で選択肢を変更できますが、
   name="gender"などフォーム処理に関係する部分は変更注意です。
   ============================================================ */

.gender-group {
  display: flex;
  align-items: center;

  gap: 20px;

  box-sizing: border-box;
}

.gender-option {
  display: flex;
  align-items: center;

  gap: 6px;

  width: auto;

  color: #333;
  font-size: 15px;
  line-height: 1.6;
}

.gender-option input[type="radio"] {
  width: auto;
  margin: 0;
}

/* ============================================================
   年齢
   ------------------------------------------------------------
   年齢入力欄と「歳」の表示を管理します。

   数字入力欄の大きさもここで変更できます。
   ============================================================ */

.age-group {
  display: flex;
  align-items: center;

  gap: 8px;
}

.age-group input[type="number"] {
  width: 80px;
  max-width: 80px;
}

.age-group span {
  color: #555;
  font-size: 15px;
}

/*
  年齢入力欄の上下ボタンを非表示にしています。

  現在のデザインでは上下ボタンを表示しません。
*/

.age-group input[type="number"]::-webkit-inner-spin-button,
.age-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.age-group input[type="number"] {
  appearance: textfield;
}

/* ============================================================
   必須
   ------------------------------------------------------------
   「必須」のオレンジ色の小さな表示です。

   HTMLの.requiredクラスに適用されます。
   ============================================================ */

.required {
  display: inline-block;

  margin-left: 8px;
  padding: 2px 6px;

  border-radius: 3px;

  background: #eaa317;
  color: #fff;

  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;

  vertical-align: middle;
}

/* ============================================================
   プライバシー
   ------------------------------------------------------------
   フォーム下に表示する個人情報の取り扱い説明です。

   文章はHTML側で変更します。

   このCSSでは枠・背景・文字サイズなどを管理します。
   ============================================================ */

.privacy-box {
  margin: 40px 0 30px;
  padding: 25px;

  border: 1px solid #ddd;
  border-radius: 8px;

  background: #fff;

  box-sizing: border-box;
}

.privacy-box .privacy-title {
  margin: 0 0 15px;

  color: #333;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.privacy-box p {
  margin: 0 0 15px;

  color: #333;
  font-size: 14px;
  line-height: 1.8;
}

.privacy-box p:last-child {
  margin-bottom: 0;
}

.privacy-box a {
  color: #eaa317;
  text-decoration: underline;
}

/* ============================================================
   送信ボタン
   ------------------------------------------------------------
   「入力内容を確認する」ボタンのデザインです。

   ボタンを押すとcontact.phpへフォームが送信されます。

   【注意】
   ボタンの見た目は変更できますが、
   type="submit"などHTML側の送信設定は変更しないでください。
   ============================================================ */

.form-submit {
  margin-top: 30px;

  text-align: center;
}

.form-submit button {
  display: inline-block;

  min-width: 280px;

  padding: 15px 30px;

  border: 0;
  border-radius: 5px;

  background: #eaa317;
  color: #fff;

  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;

  cursor: pointer;

  transition: opacity 0.3s ease;

  box-sizing: border-box;
}

/*
  PCでボタンにマウスを乗せたとき、
  少し透明になります。
*/

.form-submit button:hover {
  opacity: 0.8;
}

.form-submit button span {
  margin-left: 8px;
}

/* ============================================================
   確認画面ボタン
   ------------------------------------------------------------
   お問い合わせ確認画面で使用するボタンの設定です。

   contact.php側の確認画面でも使用するため、
   この部分は削除しないでください。
   ============================================================ */

.confirm-buttons {
  display: flex;

  justify-content: center;
  align-items: center;

  gap: 20px;

  flex-wrap: wrap;
}

/*
  確認画面の最初のボタンをグレーにしています。
*/

.confirm-buttons button:first-child {
  background: #999;
}

.confirm-buttons button:first-child:hover {
  background: #777;
  opacity: 1;
}

/* ============================================================
   スマートフォン表示
   ------------------------------------------------------------
   768px以下の画面で適用される設定です。

   【重要】
   PC版の表示が問題なく、
   スマートフォンだけを変更したい場合は、
   基本的にこの中を確認します。

   同じクラスの設定がPC版と重複している場合、
   ここに書かれているスマートフォン用設定が優先されます。
   ============================================================ */

@media screen and (max-width: 768px) {
  /* ------------------------------------------------------------
     お問い合わせページ全体
     ------------------------------------------------------------
     スマートフォン版のページ上部と余白を調整します。
     ------------------------------------------------------------ */

  .contact-visual {
    height: 180px;
  }

  .contact-section {
    padding: 50px 15px;
  }

  .contact-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .contact-heading {
    margin-bottom: 35px;
    font-size: 26px;
    text-align: center;
  }

  /* ------------------------------------------------------------
     フォーム
     ------------------------------------------------------------
     PCでは左右2列だったフォームを、
     スマートフォンでは上下1列に変更します。
     ------------------------------------------------------------ */

  .contact-form {
    width: 100%;
  }

  .form-table {
    width: 100%;
  }

  .form-row {
    display: block;
    width: 100%;
  }

  .form-row > label {
    display: block;
    width: 100%;
    margin-bottom: 8px;
  }

  .form-field {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
  }

  /* ------------------------------------------------------------
     通常の入力欄
     ------------------------------------------------------------
     スマートフォンでは入力しやすい大きさに調整します。
     ------------------------------------------------------------ */

  .form-field input[type="text"],
  .form-field input[type="email"],
  .form-field input[type="tel"],
  .form-field input[type="number"],
  .form-field select,
  .form-field textarea {
    box-sizing: border-box;
    max-width: 100%;
    font-size: 16px;
  }

  .form-field input[type="text"],
  .form-field input[type="email"],
  .form-field select {
    width: 100%;
    height: 42px;
    padding: 6px 10px;
  }

  .form-field textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
  }

  /* ------------------------------------------------------------
     電話番号
     ------------------------------------------------------------
     スマートフォンの横幅に合わせて、
     3つの入力欄を横並びで収めます。
     ------------------------------------------------------------ */

  .form-field.tel-group {
    display: flex;
    align-items: center;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0;
    padding: 10px 15px;

    gap: 6px;
    box-sizing: border-box;
  }

  .form-field.tel-group input[type="tel"] {
    flex: 1;
    min-width: 0;
    width: auto;

    height: 42px;
    padding: 6px 8px;

    box-sizing: border-box;
    font-size: 16px;
  }

  .form-field.tel-group span {
    flex-shrink: 0;
  }

  /* ------------------------------------------------------------
     性別
     ------------------------------------------------------------
     スマートフォンでは横幅に合わせて
     必要に応じて折り返せるようにしています。
     ------------------------------------------------------------ */

  .form-field.gender-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;

    width: 100%;
    box-sizing: border-box;
  }

  .gender-option {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  /* ------------------------------------------------------------
     年齢
     ------------------------------------------------------------
     スマートフォン版の年齢入力欄です。
     ------------------------------------------------------------ */

  .form-field.age-group {
    display: flex;
    align-items: center;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0;
    padding: 10px 15px;

    box-sizing: border-box;
  }

  .form-field.age-group input[type="number"] {
    width: 90px;
    height: 42px;

    padding: 6px 8px;

    box-sizing: border-box;
    font-size: 16px;
  }

  .form-field.age-group span {
    margin-left: 6px;
  }

  /* ------------------------------------------------------------
     個人情報保護方針
     ------------------------------------------------------------
     スマートフォンでは左右の余白を小さくして、
     画面内に収まりやすくしています。
     ------------------------------------------------------------ */

  .privacy-box {
    width: 100%;
    box-sizing: border-box;
    margin-top: 30px;
    padding: 20px 15px;
  }

  /* ------------------------------------------------------------
     確認・送信ボタン
     ------------------------------------------------------------
     スマートフォンではボタンを縦並びにします。

     ボタンが画面からはみ出さないように、
     最大幅も設定しています。
     ------------------------------------------------------------ */

  .form-submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;

    width: 100%;
    margin-top: 30px;
  }

  .form-submit button,
  .form-submit input[type="submit"],
  .form-submit input[type="button"] {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 360px;
    min-height: 52px;

    padding: 12px 20px;

    box-sizing: border-box;

    /* ボタンの文字を改行させない */
    white-space: nowrap;
    word-break: keep-all;
  }

  /* ------------------------------------------------------------
     確認画面の戻る・送信ボタン
     ------------------------------------------------------------
     確認画面でもスマートフォンでは
     ボタンを縦方向に並べます。
     ------------------------------------------------------------ */

  .confirm-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;

    width: 100%;
  }

  .confirm-buttons button,
  .confirm-buttons input[type="submit"],
  .confirm-buttons input[type="button"] {
    width: 100%;
    max-width: 360px;
    min-height: 52px;

    padding: 12px 20px;

    box-sizing: border-box;

    white-space: nowrap;
    word-break: keep-all;
  }
}
