/**
 * contact.css
 * お問い合わせページ・サンクスページ専用スタイル
 */

/* 1. フォントと基本見出しスタイル */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@700&display=swap');

.tw\:font-serif {
  font-family: 'Shippori Mincho', serif !important;
}

/* 2. フォームグループ de レイアウト */
.form-group {
  margin-bottom: 40px;
}

.form-group label {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
  font-size: 16px;
}

/* 氏名（最初の項目）の上に余白を追加 */
.contact-form .form-group:first-child {
  margin-top: 60px;
}

/* 姓名入力欄の「名」の左側に個別の余白を追加 (PC版) */
@media (min-width: 769px) {
  .contact-form .tw\:flex.tw\:gap-8 > .tw\:flex-1:last-child {
    margin-left: 24px;
  }
}

/* ラベル内の必須・任意タグ */
.required {
  background-color: #ec4899;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 10px;
  font-weight: normal;
}

.optional {
  background-color: #9ca3af;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 10px;
  font-weight: normal;
}

/* 3. 入力フィールドの共通スタイル */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  background-color: #fff;
  transition: all 0.3s ease;
  outline: none;
  color: #1f2937;
}

/* フォーカス時の挙動 */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
  background-color: #fff;
}

/* プレースホルダーの色 */
.contact-form ::placeholder {
  color: #9ca3af;
}

/* セレクトボックスの矢印カスタマイズ */
.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 20px;
  cursor: pointer;
}

/* 4. バリデーションエラー時のスタイル */

/* エラーメッセージ：初期状態は非表示、赤色 */
.contact-form .error-msg {
  color: #ef4444 !important; /* 明るい赤色 */
  font-size: 12px !important;
  font-weight: 600 !important;
  margin-top: 6px !important;
  line-height: 1.4 !important;
  display: none; /* デフォルトは非表示 */
}

/* tw:hidden クラスが付いていない時（エラー発生時）のみ表示 */
.contact-form .error-msg:not(.tw\:hidden) {
  display: block !important;
}

/* JSで付与されるエラー用背景色の補完 */
.contact-form .tw\:bg-red-50 {
  background-color: #fef2f2 !important;
}

/* JSで付与されるエラー用枠線の補完 */
.contact-form .tw\:border-red-500 {
  border-color: #ef4444 !important;
}

/* 5. 送信ボタン（お問い合わせフォーム用） */
.submit-button {
  display: inline-block; /* マージンを適用させるため */
  margin-top: 40px;      /* 上部マージンを拡大 */
  margin-bottom: 40px;   /* 下部マージンを拡大 */
  background-color: #ec4899;
  color: #fff;
  font-weight: 700;
  padding: 20px 80px;
  border-radius: 9999px;
  font-size: 18px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.4);
}

.submit-button:hover {
  background-color: #db2777;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(236, 72, 153, 0.5);
}

/* 6. 確認モーダルのスタイル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #fff;
  padding: 40px;
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
}

.modal-btn {
  padding: 12px 32px;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 16px;
}

.modal-btn-cancel { background-color: #f3f4f6; color: #4b5563; }
.modal-btn-confirm { background-color: #ec4899; color: #fff; }

/* 7. サンクスページ（送信完了画面）専用スタイル */
.thanks-container {
  background-color: #f9fafb !important;
  border-radius: 32px !important;
  padding: 80px 40px !important;
  text-align: center !important;
  margin-bottom: 48px !important;
}

.thanks-icon {
  font-size: 64px !important;
  color: #ec4899 !important;
  margin-bottom: 24px !important;
  display: inline-block !important;
}

.thanks-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 24px !important;
  border: none !important;
  padding: 0 !important;
}

.thanks-text {
  color: #4b5563 !important;
  line-height: 2.0 !important;
  margin-bottom: 0 !important;
}

/* サンクスページ・ボタンナビゲーション */
.thanks-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}

.thanks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s;
  min-width: 220px;
  text-decoration: none !important;
}

/* 「トップページへ戻る」ボタン：全ての状態の文字色を白に強制 */
a.thanks-btn-primary,
a.thanks-btn-primary:link,
a.thanks-btn-primary:visited,
a.thanks-btn-primary:hover,
a.thanks-btn-primary:active {
  background-color: #ec4899 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

a.thanks-btn-primary:hover {
  background-color: #db2777 !important;
  transform: translateY(-2px);
}

/* 「ブログを見る」ボタン */
a.thanks-btn-secondary,
a.thanks-btn-secondary:link,
a.thanks-btn-secondary:visited {
  background-color: #fff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
  text-decoration: none !important;
}

a.thanks-btn-secondary:hover {
  border-color: #ec4899 !important;
  color: #ec4899 !important;
  transform: translateY(-2px);
}

/* 8. ラジオボタンの装飾 (チップスタイル) */
.radio-group {
  display: flex;
  gap: 16px;
}

.radio-label {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #4b5563;
}

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

.radio-label span {
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* 疑似チェックマーク */
.radio-label span::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  background: #fff;
  transition: all 0.2s;
}

/* 選択時のスタイル */
.radio-label:has(input:checked) {
  border-color: #ec4899;
  background-color: #fdf2f8;
  color: #ec4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.radio-label:has(input:checked) span::before {
  border-color: #ec4899;
  background-color: #ec4899;
  box-shadow: inset 0 0 0 4px #fff;
}

.radio-label:hover {
  border-color: #ec4899;
  background-color: #fdf2f8;
}

/* 9. レスポンシブ調整 (スマホ) */
@media (max-width: 768px) {
  .form-group { margin-bottom: 30px; }

  /* 氏名入力欄の「姓」と「名」をスマホで縦並びにする */
  .contact-form .tw\:flex.tw\:gap-8 {
    flex-direction: column !important;
    gap: 16px !important;
  }
  
  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form input[type="tel"],
  .contact-form select,
  .contact-form textarea {
    padding: 14px 16px;
    font-size: 16px;
  }

  .submit-button {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    margin-top: 30px;    /* スマホ用に微調整 */
    margin-bottom: 30px;
  }

  .thanks-container { padding: 60px 20px !important; }

  .thanks-nav {
    flex-direction: column;
    gap: 16px;
  }

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

  .radio-group {
    flex-direction: column;
    gap: 12px;
  }
}
