/* =============================================
   CHYLIM — お問い合わせページ CSS
   chylim_contact.css
   Contact Form 7 実クラス名に対応
============================================= */

/* ===== CONTACT PAGE BODY ===== */
.contact-body {
  padding: 64px 24px 100px;
  background: #fafaf8;
  min-height: 70vh;
}
.contact-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* ページヘッダー */
.contact-header {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--green-dark);
}
.contact-header-label {
  font-family: var(--font-sub);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--green-main);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.contact-header h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 56px);
  color: var(--green-dark);
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 14px;
}
.contact-header-desc {
  font-size: 14px;
  color: var(--gray-mid);
  line-height: 1.8;
}

/* ===== CF7 フォーム全体 ===== */
.wpcf7 {
  /* CF7のデフォルトマージンをリセット */
}
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ===== フォームグループ（各フィールドのラッパー） ===== */
/* CF7では <p> タグでフィールドを囲むケースが多い */
.wpcf7-form p,
.cf7-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 24px 0;
}

/* ラベル */
.wpcf7-form label,
.wpcf7-form p > span:first-child {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 2px;
}

/* 必須バッジ（CF7の[your-name*] など * がついたもの用） */
.wpcf7-form .required::after,
abbr[title="required"] {
  content: '必須';
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* ===== 入力フィールド共通 ===== */
.wpcf7-text,
.wpcf7-email,
.wpcf7-tel,
.wpcf7-number,
.wpcf7-date,
.wpcf7-url,
.wpcf7-select,
.wpcf7-textarea,
.wpcf7-quiz {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-sizing: border-box;
}

/* フォーカス時 */
.wpcf7-text:focus,
.wpcf7-email:focus,
.wpcf7-tel:focus,
.wpcf7-number:focus,
.wpcf7-date:focus,
.wpcf7-url:focus,
.wpcf7-select:focus,
.wpcf7-textarea:focus,
.wpcf7-quiz:focus {
  border-color: var(--green-main);
  box-shadow: 0 0 0 3px rgba(64,145,108,0.15);
}

/* テキスト・メール・電話 */
.wpcf7-text,
.wpcf7-email,
.wpcf7-tel,
.wpcf7-number,
.wpcf7-date,
.wpcf7-url {
  padding: 11px 14px;
  height: 46px;
}

/* テキストエリア */
.wpcf7-textarea {
  padding: 12px 14px;
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

/* プルダウン（select） */
.wpcf7-select {
  padding: 11px 40px 11px 14px;
  height: 46px;
  cursor: pointer;
  /* カスタム矢印 */
  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 d='M1 1l5 5 5-5' stroke='%2340916c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.wpcf7-select:focus {
  border-color: var(--green-main);
}

/* ===== バリデーションエラー ===== */
/* フィールドが不正な場合（CF7がクラスを付与） */
.wpcf7-not-valid {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.12) !important;
  background: #fff8f8 !important;
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
  display: block;
  font-size: 12px;
  color: #e53e3e;
  font-weight: 600;
  margin-top: 4px;
}

/* ===== レスポンスメッセージ（送信後） ===== */
.wpcf7-response-output {
  margin: 16px 0 0;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  border: none !important; /* CF7デフォルトborderを上書き */
}

/* 送信成功 */
.wpcf7-mail-sent-ok {
  background: #f0fdf4;
  color: #166534;
  border-left: 4px solid var(--green-main) !important;
}

/* 送信失敗 */
.wpcf7-mail-sent-ng,
.wpcf7-aborted {
  background: #fff8f8;
  color: #c53030;
  border-left: 4px solid #e53e3e !important;
}

/* バリデーションエラー（入力不備） */
.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  background: #fffbeb;
  color: #92400e;
  border-left: 4px solid var(--accent) !important;
}

/* スパムエラー */
.wpcf7-spam-blocked {
  background: #fff8f8;
  color: #c53030;
  border-left: 4px solid #e53e3e !important;
}

/* ===== 送信ボタン ===== */
.wpcf7-submit {
  width: 100%;
  padding: 15px 32px;
  background: var(--green-dark);
  color: white;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(26,58,42,0.25);
  margin-top: 8px;
}
.wpcf7-submit:hover {
  background: var(--green-main);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,58,42,0.3);
}
.wpcf7-submit:active {
  transform: translateY(0);
}

/* 送信中スピナー（CF7が .wpcf7-spinner を挿入する） */
.wpcf7-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: cf7spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}
@keyframes cf7spin {
  to { transform: rotate(360deg); }
}

/* ===== プライバシーポリシー同意チェックボックス ===== */
/* CF7の [acceptance] タグ */
.wpcf7-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.wpcf7-acceptance input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--green-main);
  margin-top: 2px;
  cursor: pointer;
}

/* ===== 区切り線（CF7のp要素間） ===== */
.wpcf7-form .contact-divider {
  border: none;
  border-top: 1px solid #efefef;
  margin: 8px 0 24px;
}

/* ===== お知らせボックス（フォーム上部の案内等） ===== */
.contact-notice {
  background: var(--green-pale);
  border-left: 4px solid var(--green-main);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--green-dark);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .contact-body { padding: 48px 16px 72px; }
  .wpcf7-textarea { min-height: 140px; }
  .wpcf7-submit { font-size: 14px; padding: 14px 24px; }
}
