/* ===========================================================
   フロントエンド（お客様側）スタイル
   ファイル: index.php, confirm.php, submit.php
   =========================================================== */

/* 基本設定 */
body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN',
    'Hiragino Sans', Meiryo, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* ヘッダースタイル */
.site-header {
  background-color: #fff;
  padding: 15px 40px;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.logo img {
  height: 40px;
  display: block;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 30px;
}

.main-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 15px;
  position: relative;
  padding-bottom: 5px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #007bff;
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ハンバーガーメニュー */
.hamburger-menu {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  justify-content: space-around;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  transition: all 0.3s;
}

/* フォームコンテナ */
.form-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px 60px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header h1 {
  font-size: 28px;
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 10px;
}

.form-header p {
  font-size: 15px;
  color: #555;
}

/* フォームグループの基本レイアウト */
.form-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

/* ラベルスタイル */
.form-label {
  width: 180px;
  flex-shrink: 0;
  padding-top: 12px;
  font-weight: bold;
}

.form-label .required {
  background-color: #d9534f;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: normal;
}

/* 任意バッジ（必須と同じ形状、色は青・文字は白） */
.form-label .optional {
  background-color: #007bff;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: normal;
}

.form-input {
  flex: 1;
}

.split-input-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.split-input {
  flex: 1;
  min-width: 160px;
}

.split-input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

/* フォーム内ヘルプテキスト */
.form-help {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

/* 全てのフォーム入力欄の共通スタイル */
.form-container input[type='text'],
.form-container input[type='email'],
.form-container input[type='tel'],
.form-container input[type='password'],
.form-container select,
.form-container textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: none;
}

.form-container textarea {
  resize: vertical;
  min-height: 120px;
}

/* チェックボックスグループ */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sleep-products-wrapper .checkbox-group {
  margin-top: 12px;
  margin-bottom: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
}

.checkbox-item input[type='checkbox'] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checkbox-item label {
  font-weight: normal;
  background-color: #f0f2f5;
  padding: 12px 20px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.checkbox-item label:hover {
  background-color: #e5e9f0;
}

.checkbox-item input[type='checkbox']:checked + label {
  background-color: #e7f3ff;
  color: #0056b3;
  font-weight: bold;
}

/* ラジオボタングループ */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.radio-main {
  display: flex;
  align-items: center;
  width: 100%;
}

.radio-main input[type='radio'] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.radio-main label {
  font-weight: normal;
  background-color: #f0f2f5;
  padding: 12px 20px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  display: block;
}

.radio-main label:hover {
  background-color: #e5e9f0;
}

.radio-main input[type='radio']:checked + label {
  background-color: #e7f3ff;
  color: #0056b3;
  font-weight: bold;
}

.radio-group.radio-inline {
  gap: 6px;
}

.radio-group.radio-inline .radio-item {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.radio-group.radio-inline .radio-item input[type='radio'] {
  margin-right: 6px;
  position: relative;
  z-index: 1;
}

.radio-group.radio-inline .radio-item label {
  background: none;
  padding: 0;
  border-radius: 0;
  width: auto;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.radio-group.radio-inline .radio-item label:hover {
  color: #0056b3;
}

.radio-group.radio-inline .radio-item input[type='radio']:checked + label {
  color: #0056b3;
  font-weight: bold;
}

.sleep-products-wrapper {
  width: 100%;
}

.sleep-products-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  width: 100%;
  flex-shrink: 1;
}

.sleep-products-label .required {
  background-color: #d9534f;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: normal;
}

/* プライバシーポリシー */
.privacy-policy-section {
  margin-top: 40px;
}

.privacy-policy-box {
  height: 150px;
  overflow-y: scroll;
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}

.privacy-policy-box p {
  font-size: 13px;
  margin-bottom: 1em;
}

/* 同意チェックボックス */
.policy-check {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 10px;
}

.policy-check input[type='checkbox'] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.policy-check label {
  font-weight: normal;
  white-space: nowrap;
}

/* 送信ボタン */
.submit-button-wrapper {
  text-align: center;
  margin-top: 40px;
}

.submit-button-wrapper button,
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 280px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background-image: linear-gradient(to right, #007bff, #0056b3);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.submit-button-wrapper button:hover,
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.submit-button-wrapper button span {
  margin-right: 8px;
}

/* 確認ページ用のスタイル */
.confirmation-area {
  margin-top: 30px;
}

.confirmation-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
  border: 1px solid #e0e0e0;
}

.confirmation-table th,
.confirmation-table td {
  padding: 15px;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

.confirmation-table th {
  width: 200px;
  font-weight: bold;
  background-color: #f9f9f9;
}

.confirmation-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-button-back,
.form-button-submit {
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid #ccc;
  font-weight: bold;
  min-width: 200px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.form-button-back {
  background-color: #fff;
  color: #555;
  transition: all 0.2s;
}

.form-button-back:hover {
  background-color: #f0f0f0;
}

.form-button-submit {
  background-image: linear-gradient(to right, #007bff, #0056b3);
  color: #fff;
  border: none;
}

.form-button-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* 確認画面スタイル（互換性のため残す） */
.confirm-section {
  background-color: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 35px;
}

.confirm-section h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

.confirm-section p {
  margin: 8px 0;
  line-height: 1.6;
}

.confirm-section strong {
  color: #34495e;
  display: inline-block;
  min-width: 120px;
}

/* ボタングループ（互換性のため残す） */
.button-group {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.button-group .btn {
  flex: 1;
  padding: 18px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.btn-back {
  background-color: #95a5a6;
  color: white;
}

.btn-back:hover {
  background-color: #7f8c8d;
  transform: translateY(-1px);
}

.btn-submit {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-1px);
}

/* 成功メッセージ */
.success-message {
  text-align: center;
  padding: 60px 20px;
}

.success-message h2 {
  color: #27ae60;
  font-size: 28px;
  margin-bottom: 20px;
}

.success-message p {
  font-size: 18px;
  color: #7f8c8d;
  line-height: 1.6;
}

/* メッセージコンテナ (submit.php用) */
.message-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.message-container h1 {
  color: #2c3e50;
  font-size: 28px;
  margin-bottom: 20px;
}

.message-container p {
  color: #555;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.message-container a {
  display: inline-block;
  padding: 12px 30px;
  background-image: linear-gradient(to right, #007bff, #0056b3);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.message-container a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .site-header {
    padding: 15px 20px;
  }

  .main-nav {
    display: none;
  }

  .hamburger-menu {
    display: flex;
  }

  .form-container {
    margin: 20px;
    padding: 30px 20px;
  }

  .form-group {
    flex-direction: column;
    gap: 10px;
  }

  .form-label {
    width: 100%;
    padding-top: 0;
  }

  .split-input-row {
    flex-direction: column;
    gap: 8px;
  }

  .form-header h1 {
    font-size: 24px;
  }

  .form-header p {
    font-size: 14px;
  }

  .button-group {
    flex-direction: column;
  }

  .confirmation-buttons {
    flex-direction: column;
    align-items: center;
  }

  .form-button-back,
  .form-button-submit {
    width: 100%;
    max-width: 300px;
  }

  /* スマホ表示時のメールアドレス入力欄を少し広げる */
  input[type='email'] {
    width: 100%;
    min-width: 280px;
    box-sizing: border-box;
  }
}
