/* ========================================
   問い合わせフォーム スタイル
   ======================================== */

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: 'Noto Sans JP', 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
}

/* ---- フォームグループ ---- */
.form-group {
  margin-bottom: 28px;
}

/* ---- ラベル ---- */
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-label--required::after {
  content: '必須';
  display: inline-block;
  background-color: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 1px;
}

/* ---- テキスト入力 ---- */
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: #333;
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #3c78d8;
  box-shadow: 0 0 0 3px rgba(60, 120, 216, 0.15);
  background-color: #fff;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #aaa;
}

/* ---- テキストエリア ---- */
.form-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}

/* ---- セレクトボックス ---- */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ---- 横並びレイアウト ---- */
.form-row {
  display: flex;
  gap: 12px;
}

.form-col {
  flex: 1;
}

/* ---- サブラベル ---- */
.form-sub-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* ---- 住所セクション ---- */
.form-address-section {
  margin-top: 14px;
}

.form-address-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

/* ---- 郵便番号 ---- */
.form-row--postal {
  align-items: center;
  max-width: 260px;
}

.form-input--postal {
  width: 100px;
  text-align: center;
  letter-spacing: 2px;
}

.form-postal-sep {
  font-size: 18px;
  color: #666;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ---- ヒント文 ---- */
.form-hint {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  line-height: 1.4;
}

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

.form-radio {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  transition: all 0.2s ease;
}

.form-radio:hover {
  border-color: #3c78d8;
  background: #f0f5ff;
}

.form-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-radio-mark {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #bbb;
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.form-radio-mark::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3c78d8;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease;
}

.form-radio input[type="radio"]:checked ~ .form-radio-mark {
  border-color: #3c78d8;
}

.form-radio input[type="radio"]:checked ~ .form-radio-mark::after {
  transform: translate(-50%, -50%) scale(1);
}

.form-radio-text {
  font-size: 14px;
  color: #333;
}

/* ---- 送信ボタン ---- */
.form-actions {
  text-align: center;
  margin-top: 36px;
}

.form-submit-btn {
  display: inline-block;
  min-width: 220px;
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, #3c78d8, #2563a8);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(60, 120, 216, 0.3);
  font-family: inherit;
}

.form-submit-btn:hover {
  background: linear-gradient(135deg, #2563a8, #1a4c8b);
  box-shadow: 0 4px 16px rgba(60, 120, 216, 0.4);
  transform: translateY(-1px);
}

.form-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(60, 120, 216, 0.3);
}

.form-submit-btn:disabled {
  background: #999;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ---- メッセージ ---- */
.form-message {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.form-message--success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-message--error {
  background-color: #fce4ec;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ---- バリデーションエラー ---- */
.form-input--error,
.form-select--error,
.form-textarea--error {
  border-color: #e53935 !important;
  background-color: #fff5f5 !important;
}

.form-error-text {
  color: #e53935;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* ---- ローディングスピナー ---- */
.form-submit-btn--loading {
  position: relative;
  color: transparent !important;
}

.form-submit-btn--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: formSpinner 0.6s linear infinite;
}

@keyframes formSpinner {
  to { transform: rotate(360deg); }
}

/* ========================================
   レスポンシブ（モバイル）
   ======================================== */
@media only screen and (max-width: 641px) {
  .contact-form {
    padding: 20px 10px;
  }

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

  .form-row--postal {
    flex-direction: row;
    max-width: 220px;
  }

  .form-input--postal {
    width: 80px;
  }

  .form-submit-btn {
    width: 100%;
    min-width: auto;
  }

  .form-label {
    font-size: 13px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* iOS拡大防止 */
    padding: 10px 12px;
  }
}
