@charset "utf-8";

/* 全体の背景色 */
body {
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

/* 全体を中央に配置 */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* フォームを上揃えに変更 */
  margin: 0 auto;
  padding: 20px; /* 余白を追加して画面の端と内容がくっつかないように */
  overflow-y: scroll; /* 縦スクロールを有効化 */
  box-sizing: border-box; /* ボックスサイズを適切に計算 */
}

html, body {
  height: 100%; /* 全体の高さを100%に */
  margin: 0;
  padding: 0;
  overflow: auto; /* コンテンツが画面を超えた場合にスクロールを有効化 */
  box-sizing: border-box;
}

h3 {
  font-size: 18px;
  font-family: sans-serif;
  color: gray;
  position: relative;
  padding-bottom: 10px; /* 文字と下線の間に余白 */
}
h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: gray;
}

/* 画面のメインブロック */
.main_block {
  border: 1px solid #ccc;
  padding: 20px; /* 内側の余白 */
  font-size: 14px;
  font-family: sans-serif;
  max-width: 600px; /* フォームの最大幅を設定 */
  width: 90%; /* 親要素の90%幅に */
  margin: 0 auto; /* 中央揃え */
  background-color: #fff; /* 背景色を白に */
  border-radius: 8px; /* 枠に角丸を追加 */
}
.main_block .info {
  font-size: 12px; /* 小さなフォントサイズ */
  color: #575966;
  margin: 0; /* 不要な余白を削除 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* iframeのスタイル */
iframe {
  border: 1px solid #ccc;
  padding: 20px; /* 内側の余白 */
  width: 90%; /* フォーム幅に合わせる */
  max-width: 600px;
  height: 200px; /* 高さは適宜調整 */
  margin: 20px 0; /* 上下に余白 */
  background-color: #fff; /* 背景色を白に */
  border-radius: 8px; /* 枠に角丸を追加 */
  font-size: 12px; /* フォントサイズを小さく */
  font-weight: normal; /* 通常の太さにする */
  line-height: 1.5; /* 行間を適度に広げる */
  color: #333; /* 文字色を控えめに */
}

/* フォームのスタイル */
.contact-form {
  border: 1px solid #ccc;
  padding: 20px; /* 内側の余白 */
  font-size: 14px;
  font-family: sans-serif;
  max-width: 600px; /* フォームの最大幅を設定 */
  width: 90%; /* 親要素の90%幅に */
  margin: 0 auto; /* 中央揃え */
  /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/ /* 影を追加して立体感を出す */
  background-color: #fff; /* 背景色を白に */
  border-radius: 8px; /* 枠に角丸を追加 */
}

/* 入力項目のスタイル */
.contact-form .item {
  margin-bottom: 20px; /* 各項目間の余白 */
}

/* ラベルのスタイル */
.contact-form .label {
  margin-bottom: 5px; /* 入力欄との間に余白を追加 */
  font-size: 14px; /* フォントサイズ */
  font-family: sans-serif;
  display: block; /* ラベルもブロック要素にして幅を100%に */
  font-weight: bold;
}

/* ラベルなし項目のスタイル */
.contact-form .item.no-label {
  text-align: center; /* 中央揃え */
}

/* 送信ボタン */
.contact-form .item.no-label input[type="submit"] {
  display: inline-block; /* ボタンを中央に */
  margin: 0 auto; /* 自動で中央配置 */
}

/*ボタンのスタイル */
input[type=submit] {
  border: none;
  outline: none;
  display: block;
  line-height: 30px;
  width: 50%;
  text-align: center;
  font-size: 16px;
  color: #fff;
  background-color: #5bc8ac;
  /*border-bottom: 4px solid #464;*/ /* 少し濃い色で立体感 */
  border-bottom: 4px solid  #008b8b;
  cursor:pointer;
  cursor: pointer;
  border-radius: 5px; /* 角丸 */
  transition: 0.3s ease all; /* ホバー時のスムーズなアニメーション */
  box-sizing: content-box;
  transition:0.3s ease all
}
input[type=submit]:hover{
  border-bottom-width:0;
  transform:translateY(4px)
}

/* 入力項目のグループ */
.contact-form .input-group {
  width: 100%; /* 入力欄を親要素の幅に合わせる */
}

/* 入力項目のグループ内の注意書き　*/
.contact-form .input-group .note {
  font-size: 12px;
  color: #228B22;
  margin: 0;
}

.contact-form input[type="text"],
.contact-form input[type="file"],
.contact-form input[type="email"],
.contact-form input[type="date"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  font-family: sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  margin-left: 0;
  color: #333;
}

/* フォーカス時のスタイル */
input[type="text"]:focus,
input[type="file"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border: 2px solid #5bc8ac;
  box-shadow: 0 0 5px #008b8b; /* フォーカス時の影を追加 */
  background-color: #f0f8ff;    /* 背景色を少し変えて強調 */
}

/* ファイル選択フィールド　*/
input[type="file"] {
  display: block; /* 確実に表示 */
  pointer-events: auto; /* クリックを有効化 */
  z-index: 1; /* 他の要素よりも前面に配置 */
}
.contact-form .item .input-group input[type="file"] {
  cursor: pointer; /* ファイル選択ボタンにポインタースタイルを追加 */
}
input[type="file"]:focus {
  /*outline: 2px solid #007bff;*/  /* フォーカス時の枠線 */
  outline: 2px solid #5bc8ac;
  /*border-color: #007bff;*/       /* フォーカス時の枠 */
  border-color: #5bc8ac;
  /*box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);*/ /* フォーカス時の影を追加 */
  box-shadow: 0 0 5px #008b8b;
  background-color: #f0f8ff;   /* 背景色を少し変えて強調 */
}

/* シリアル番号の入力欄のスタイル */
.contact-form .item.serial-number {
  display: flex;
  align-items: flex-start; /* ラベルと注意書きの高さを合わせる */
}
.contact-form .item.serial-number .label {
  margin-right: 10px; /* ラベルと注意書きの間に余白 */
}
.contact-form .item.serial-number .input-group {
  margin-left: 10px; /* 注意書きとの間に余白 */
}
.contact-form .input-group input[type="text"] {
  margin-top: 5px; /* テキストボックスとファイル入力フィールドの間に余白 */
}
.contact-form .input-group input[type="file"] {
  margin-top: 5px; /* ファイル入力フィールドとテキストボックスの間に余白 */
}

/* テキストエリア */
.contact-form .item textarea {
  resize: vertical; /* 縦方向のみサイズ変更可能 */
  outline: none; /* フォーカス時のアウトラインを削除 */
}

/* ラジオボタン */
.contact-form .item input[type="radio"] + label {
  margin-right: 5px; /* ラジオボタン間のスペース */
}

/* セレクトボックス */
.contact-form .item select {
  background-color: white;
}

/* 注意書きのスタイル */
.contact-form .note {
  font-size: 11px; /* 小さなフォントサイズ */
  color: #228B22; /* 緑色の注意書き */
  margin: 0; /* 不要な余白を削除 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* 項目の説明　*/
.contact-form .item_info {
  font-size: 11px; /* 小さなフォントサイズ */
  color: #575966;
  margin: 10; /* 余白 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* 注意書き */
.err_note {
  font-size: 11px; /* 小さなフォントサイズ */
  color: red;
  margin: 0; /* 不要な余白を削除 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* 注意書き（中央）black */
.item_info_i_center_black {
  font-size: 12px;
  color: #575966;
  margin: 0; /* 不要な余白を削除 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* 注意書き（中央） */
.item_info_i_center {
  font-size: 14px;
  color: red;
  margin: 10; /* 不要な余白を削除 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* 注意書き(確認画面) */
.confirm_err_note {
  font-size: 14px;
  color: red;
  margin: 0; /* 不要な余白を削除 */
  word-break: break-word; /* 長い単語を折り返す */
}

/* 登録エラーメッセージの表示エリア　エラー発生時にフォーカスされる */
.err_top {
  display: flex; /* ブロック要素として表示 */
  justify-content: center; /* 子要素を中央に配置 */
  width: 100%; /* コンテナ幅を最大に */
  margin: 0 auto;
}

/* 登録フォームの上に表示するエラーメッセージ　*/
.err_top .err_system {
  display: block; /* ブロック要素として表示 */
  margin-top: 10px; /* 入力欄とエラーメッセージの間隔 */
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5; /* 読みやすさを向上 */
  color: red;
  background-color: #f8dde1;
  border: 1px solid #ccc;
  padding: 20px; /* 内側の余白 */
  width: fit-content; /* 内容の幅にフィット */
  text-align: left; /* 文字の左寄せ */
}

/* 登録フォーム　入力エラーメッセージ */
form.contact-form .err_message {
  display: block; /* ブロック要素として表示 */
  margin-top: 5px; /* 入力欄とエラーメッセージの間隔 */
  color: red;
  font-size: 12px;
  line-height: 1.5; /* 読みやすさを向上 */
}
/* ラベルの後の必須マーク */
.required::after {
  content: "必須";
  color: #ffffff;
  background: #cc0000;
  font-size: 0.8em;
  padding: 0.1em 0.3em;
  line-height: 0.8;
  border-radius: 0.3em;
  margin-left:0.6em;
  }
  /* ラベルの後の任意マーク */  
  .optional::after {
    content: "任意";
    color: #ffffff;
    background: #575966;
    font-size: 0.8em;
    padding: 0.1em 0.3em;
    line-height: 0.8;
    border-radius: 0.3em;
    margin-left:0.6em;
    }
 /* ラベルの後のアスタリスク　*/ 
 /*
.required::after {
  content: "*";
  color: #cc0000;
  font-size: 1.4em;
  font-weight: bold;
  padding: 0.1em 0.4em;;
  line-height: 1;
  border-radius: 0.3em;
  margin-left: -0.1em;
  position: relative;
  top: 3px;
}*/

.required-mark {
  color: #cc0000;
  font-size: 1.4em;
  font-weight: bold;
  /*vertical-align: baseline;*/ /* 文字と同じ高さ */
  vertical-align: middle;
}

/* ローディング */
#loading {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}
#loading .spinner {
  border: 14px solid #f3f3f3;
  border-top: 14px solid #5bc8ac;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media screen and (max-width: 600px) {

  .container {
      padding: 10px; /* スマホでは余白を少し減らす */
    }
  
  .contact-form .item {
    align-items: stretch; /* 要素を幅いっぱいに広げる */
    margin-bottom: 15px; /* スマホでは少し余白を狭く */
  }

  .contact-form .label {
    /*margin-bottom: 5px;*/ /* ラベルと入力欄の間に余白 */
    width: auto; /* ラベル幅を可変に */
    /*margin-right: 0;*/ /* 右の余白を削除 */
    font-size: 16px; /* スマホ用のフォントサイズを調整 */
  }
  
  .contact-form .item_info {
    font-size: 16px; /* スマホ用のフォントサイズを調整 */
  }
  
  .contact-form .err_message {
    margin-left: 0; /* エラーメッセージの位置を調整（スマホ用） */
  }

  .contact-form .input-group input[type="text"],
  .contact-form .input-group input[type="file"],
  .contact-form .input-group input[type="email"],
  .contact-form .input-group input[type="date"],
  .contact-form .input-group select,
  .contact-form .input-group textarea {
    width: 100%; /* 入力欄を画面幅いっぱいに */
  }

  .contact-form .note {
    max-width: 100%; /* 注意書きを全幅に */
  }
}
