/*
 * リペアタイルラボ（repairingtile.jp）お問い合わせフォーム
 */


/* ============================================================
   1. 文字サイズ肥大化バグの修正（430〜800px幅で文字が異常に大きくなる不具合）
   ============================================================ */

@media screen and (max-width: 800px) {
  .f60 { font-size: clamp(27px, 7.2vw, 60px) !important; }
  .f50 { font-size: clamp(30px, 8vw, 50px) !important; }
  .f40 { font-size: clamp(28px, 7.5vw, 40px) !important; }
  .f38 { font-size: clamp(26px, 7vw, 38px) !important; }
  .f36 { font-size: clamp(24px, 6.5vw, 36px) !important; }
  .f34 { font-size: clamp(23px, 6vw, 34px) !important; }
  .f32 { font-size: clamp(21px, 5.7vw, 32px) !important; }
  .f30 { font-size: clamp(19px, 5vw, 30px) !important; }
  .f28 { font-size: clamp(17px, 4.6vw, 28px) !important; }
  .f26 { font-size: clamp(17px, 4.4vw, 26px) !important; }
  .f24 { font-size: clamp(16px, 4.2vw, 24px) !important; }
  .f22 { font-size: clamp(15px, 4vw, 22px) !important; }
  .f20 { font-size: clamp(14px, 3.8vw, 20px) !important; }
  .f18 { font-size: clamp(14px, 3.6vw, 18px) !important; }
  .f16 { font-size: clamp(12px, 3.2vw, 16px) !important; }
  .f14 { font-size: clamp(11px, 3vw, 14px) !important; }
  .f12 { font-size: clamp(11px, 2.8vw, 12px) !important; }
  .f10 { font-size: clamp(9px, 2.4vw, 12px) !important; }
  #cv_box .cv_boxin .itemname { font-size: clamp(14px, 3.8vw, 30px) !important; }
  #cv_box .cv_boxin .pricebox { font-size: clamp(15px, 4vw, 32px) !important; }
  #cv_box .cv_boxin .linktext { font-size: clamp(8px, 2.2vw, 18px) !important; }
  footer .copybox ul.copylist { font-size: clamp(9px, 2.4vw, 19px) !important; }
  #section_linksother a.linkss .text .janr { font-size: clamp(11px, 3vw, 24px) !important; }
  #section_linksother a.linkss .text .textcontena .page_title { font-size: clamp(17px, 4.4vw, 40px) !important; }
  #section_linksother a.linkss .text .textcontena .mores { font-size: clamp(13px, 3.4vw, 27px) !important; }
}

@media screen and (max-width: 800px) {
  #section01 h1 { font-size: clamp(26px, 6.8vw, 54px) !important; }
  #section02 ul.columnlist li .base_text { font-size: clamp(12px, 3.2vw, 26px) !important; }
  #section02 .days_cate .cate { font-size: clamp(11px, 3vw, 24px) !important; }
  #section02 figcaption.ministext { font-size: clamp(11px, 2.8vw, 12px) !important; }
  #section02 #page_links .mokuji { font-size: clamp(15px, 4vw, 24px) !important; }
  #section02 #page_links ol a { font-size: clamp(13px, 3.4vw, 17px) !important; }
  #section02 #page_links ol ol a { font-size: clamp(13px, 3.4vw, 17px) !important; }
  #section02 #wysiwyg p { font-size: clamp(14px, 3.6vw, 16px) !important; }
  #section02 #wysiwyg h1 { font-size: clamp(19px, 5vw, 26px) !important; }
  #section02 #wysiwyg h1.design { font-size: clamp(19px, 5vw, 26px) !important; }
  #section02 #wysiwyg h2 { font-size: clamp(18px, 4.7vw, 24px) !important; }
  #section02 #wysiwyg h2.design { font-size: clamp(18px, 4.7vw, 22px) !important; }
  #section02 #wysiwyg h3 { font-size: clamp(17px, 4.4vw, 20px) !important; }
  #section02 #wysiwyg h3.design { font-size: clamp(17px, 4.4vw, 20px) !important; }
  #section02 #wysiwyg h4 { font-size: clamp(16px, 4.2vw, 18px) !important; }
  #section02 #wysiwyg h4.design { font-size: clamp(16px, 4.2vw, 18px) !important; }
  #section02 #wysiwyg h5 { font-size: clamp(15px, 4vw, 16px) !important; }
  #section02 #wysiwyg h5.design { font-size: clamp(15px, 4vw, 16px) !important; }
  #section02 #wysiwyg h6 { font-size: clamp(13px, 3.4vw, 16px) !important; }
  #section02 #wysiwyg h6.design { font-size: clamp(13px, 3.4vw, 16px) !important; }
  .page_navi ul { font-size: clamp(12px, 3.2vw, 26px) !important; }
}

.wpcf7-list-item-label,
.cf7-q, .cf7-a,
.cf7-q p, .cf7-a p {
  overflow-wrap: break-word;
  word-break: break-word;
}


/* ============================================================
   2. お問い合わせフォームのデザイン改善
   ブランドカラー（見出しに使われている紫）を基準に、
   ・タイル柄の背景に埋もれないよう、フォーム全体を白いカードで浮かせる
   ・入力欄／チェックボックス／ボタンを現代的な見た目に統一
   ・項目のかたまりが分かるように余白と区切りを整理
   ============================================================ */

:root {
  --rp-primary: #521a72;      /* サイト見出しの紫 */
  --rp-primary-dark: #3c1354;
  --rp-primary-soft: #f3edf7; /* 紫の淡色（背景・ホバー用） */
  --rp-border: #ddd5e3;
  --rp-text: #333333;
  --rp-required: #eb2a2a;     /* 既存の「必須」バッジの赤を踏襲 */
}

/* フォーム全体を白いカードとして浮かせ、タイル柄の背景から独立させる */
.wpcf7-form {
  background: rgba(255, 255, 255, 0.8) !important; /* タイル柄の背景がうっすら透けるように半透明に */
  border: 1px solid var(--rp-border);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 48px) !important;
  box-shadow: 0 8px 30px rgba(60, 19, 84, 0.08);
  color: var(--rp-text);
}

/* 各項目のかたまり */
.cf7-item {
  padding-bottom: 22px;
  margin-bottom: 22px !important;
  border-bottom: 1px solid #eee6f0;
}
.cf7-item:last-of-type {
  border-bottom: none;
}

/* ラベル */
.cf7-q label {
  font-weight: 600;
  color: var(--rp-primary-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* 「必須」バッジをピル型に */
.cf7-req {
  display: inline-block;
  background: var(--rp-required) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 2px 10px !important;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* 案件情報のまとまりの前に区切りを入れる（工事時期〜役物タイル） */
.cf7-item:has([data-name="construction-period"]) {
  margin-top: 6px;
  padding-top: 26px;
  border-top: 2px solid var(--rp-primary-soft);
}

/* お問い合わせ内容・添付ファイルのまとまりの前にも区切り */
.cf7-item:has([data-name="your-message"]) {
  padding-top: 26px;
  border-top: 2px solid var(--rp-primary-soft);
}

/* テキスト入力・テキストエリア・セレクト */
.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-select,
.wpcf7-form-control.wpcf7-date {
  background: #fbfaf9 !important;
  border: 1.5px solid var(--rp-border) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-size: 16px !important; /* iOSでフォーカス時に自動ズームされるのを防ぐ */
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wpcf7-form-control.wpcf7-textarea {
  max-width: 100%;
}
.wpcf7-form-control.wpcf7-text:focus,
.wpcf7-form-control.wpcf7-textarea:focus,
.wpcf7-form-control.wpcf7-select:focus {
  outline: none !important;
  border-color: var(--rp-primary) !important;
  box-shadow: 0 0 0 3px rgba(82, 26, 114, 0.15) !important;
  background: #ffffff !important;
}
.wpcf7-form-control.wpcf7-text::placeholder,
.wpcf7-form-control.wpcf7-textarea::placeholder {
  color: #9a92a3;
}

/* チェックボックス・ラジオボタン */
.wpcf7-list-item {
  display: block;
  margin: 0 0 10px 0 !important;
}
.wpcf7-list-item input[type="checkbox"],
.wpcf7-list-item input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--rp-primary);
  cursor: pointer;
}
.wpcf7-list-item label {
  /* inline-flex にするのがポイント：display:flex（ブロック要素）にすると、
     プライバシーポリシー同意など「text-align:center で中央寄せされている項目」の
     centering が効かなくなり、チェックボックスだけ左端に寄って見える不具合が出るため */
  display: inline-flex;
  align-items: flex-start;
  padding: 6px 10px 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease;
  max-width: 100%;
}
.wpcf7-list-item label:hover {
  background-color: var(--rp-primary-soft);
}
.wpcf7-list-item-label {
  flex: 1 1 auto;
  min-width: 0;
}

/* ファイル添付 */
.wpcf7-form-control.wpcf7-file {
  display: block;
  margin-bottom: 8px;
}
.wpcf7-form-control.wpcf7-file::file-selector-button {
  background: #fff;
  border: 1.5px solid var(--rp-primary);
  color: var(--rp-primary);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
  transition: background-color .15s ease, color .15s ease;
}
.wpcf7-form-control.wpcf7-file::file-selector-button:hover {
  background: var(--rp-primary);
  color: #fff;
}

/* 送信ボタン */
.wpcf7-form-control.wpcf7-submit {
  display: block;
  margin: 8px auto 0;
  background: linear-gradient(135deg, var(--rp-primary) 0%, var(--rp-primary-dark) 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 16px 56px !important;
  font-size: 17px !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(82, 26, 114, 0.3);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.wpcf7-form-control.wpcf7-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(82, 26, 114, 0.35);
}
.wpcf7-form-control.wpcf7-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* 送信結果メッセージ（成功・エラー） */
.wpcf7-response-output {
  border-radius: 10px !important;
  padding: 14px 18px !important;
  font-weight: 600;
}
.wpcf7-form.sent .wpcf7-response-output {
  border-color: #2f9e44 !important;
  color: #2f9e44 !important;
  background: #eefaf0;
}
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.spam .wpcf7-response-output {
  border-color: var(--rp-required) !important;
  color: var(--rp-required) !important;
  background: #fdeeee;
}

/* 項目ごとのエラーメッセージ */
.wpcf7-not-valid-tip {
  color: var(--rp-required) !important;
  font-size: 13px !important;
  margin-top: 6px;
}

/* プライバシーポリシー同意・案内メールのチェック行は少し余白を広めに */
.cf7-item:has([data-name="marketing_email_consent"]),
.cf7-item:has([data-name="your-accept"]) {
  border-bottom: none;
  padding-bottom: 8px;
}
