@charset "UTF-8";

/* ===========================
   Contact Form 7 スタイル
=========================== */

/* フォーム全体 */
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 行レイアウト */
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.3rem;
}

.form-row--top {
  align-items: flex-start;
}

/* 必須・任意バッジ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  padding: 0.2em 0;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  background-color: #9CA3AF;  
}

.badge.required {
  background-color: #d94d61;

}


/* ラベル */
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1F2937;
  flex-shrink: 0;
}

/* SP: バッジ+ラベルを1行、入力欄を次の行に全幅で表示 */
.form-row .wpcf7-form-control-wrap {
  width: 100%;
}

/* テキスト・メール・電話・URL 入力 */
.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-tel,
.wpcf7-form .wpcf7-url,
.wpcf7-form .wpcf7-number,
.wpcf7-form .wpcf7-date {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #D1D5DB;
  border-radius: 0;
  font-size: 0.9375rem;
  color: #1F2937;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

/* テキストエリア */
.wpcf7-form .wpcf7-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #D1D5DB;
  border-radius: 0;
  font-size: 0.9375rem;
  color: #1F2937;
  background-color: #fff;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

/* セレクトボックス */
.wpcf7-form .wpcf7-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #D1D5DB;
  border-radius: 0;
  font-size: 0.9375rem;
  color: #1F2937;
  background-color: #fff;
  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/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  outline: none;
  cursor: pointer;
}

/* フォーカス時 */
.wpcf7-form .wpcf7-text:focus,
.wpcf7-form .wpcf7-email:focus,
.wpcf7-form .wpcf7-tel:focus,
.wpcf7-form .wpcf7-url:focus,
.wpcf7-form .wpcf7-number:focus,
.wpcf7-form .wpcf7-date:focus,
.wpcf7-form .wpcf7-textarea:focus,
.wpcf7-form .wpcf7-select:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* バリデーションエラー時 */
.wpcf7-form .wpcf7-not-valid {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #EF4444;
}

/* チェックボックス・ラジオボタン */
.wpcf7-checkbox,
.wpcf7-radio {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.wpcf7-list-item {
  margin: 0 !important;
}

/* デフォルトのinputを非表示 */
.wpcf7-checkbox input[type="checkbox"],
.wpcf7-acceptance input[type="checkbox"],
.wpcf7-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* ラジオボタン */
.wpcf7-radio .wpcf7-list-item-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-left: 1.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.5;
}

.wpcf7-radio .wpcf7-list-item-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  background-color: #F9FAFB;
  transition: border-color 0.15s;
}

.wpcf7-radio .wpcf7-list-item-label::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #0056b3;
  opacity: 0;
  transition: opacity 0.15s;
}

.wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label::before {
  border-color: #0056b3;
}

.wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label::after {
  opacity: 1;
}

/* チェックボックス・同意チェックボックス */
.wpcf7-checkbox .wpcf7-list-item-label,
.wpcf7-acceptance .wpcf7-list-item-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-left: 1.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.5;
}

.wpcf7-checkbox .wpcf7-list-item-label::before,
.wpcf7-acceptance .wpcf7-list-item-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 2px solid #D1D5DB;
  background-color: #F9FAFB;
  transition: border-color 0.15s, background-color 0.15s;
}

.wpcf7-checkbox .wpcf7-list-item-label::after,
.wpcf7-acceptance .wpcf7-list-item-label::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 50%;
  width: 6px;
  height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.15s;
}

.wpcf7-checkbox input[type="checkbox"]:checked + .wpcf7-list-item-label::before,
.wpcf7-acceptance input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
  border-color: #0056b3;
  background-color: #0056b3;
}

.wpcf7-checkbox input[type="checkbox"]:checked + .wpcf7-list-item-label::after,
.wpcf7-acceptance input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
  opacity: 1;
}

/* 同意チェックボックス内のリンク */
.wpcf7-acceptance .wpcf7-list-item-label a {
  color: #0056b3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 同意チェックボックス行 */
.form-acceptance {
  align-items: center;
}

/* 送信ボタン */
.form-submit {
  text-align: center;
  margin-top: 0.5rem;
}

.wpcf7-form input[type="submit"],
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 20rem;
  padding: 0.875rem 2rem;
  background-color: #0056b3;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  letter-spacing: 0.05em;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-submit:hover {
  background-color: #004494;
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-submit:active {
  transform: scale(0.98);
}

.wpcf7-form input[type="submit"]:disabled,
.wpcf7-submit:disabled {
  background-color: #9CA3AF;
  cursor: not-allowed;
}

/* 送信中スピナー */
.wpcf7-spinner {
  display: none;
}

/* レスポンスメッセージ */
.wpcf7-response-output {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  text-align: center;
}

.wpcf7-mail-sent-ok {
  background-color: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #065F46;
}

.wpcf7-mail-sent-ng,
.wpcf7-aborted {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  background-color: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #92400E;
}

/* プレースホルダー */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* PC: 3カラム（バッジ | ラベル | 入力欄） */
@media (min-width: 768px) {
  .form-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0 0.5rem;
  }

  .form-row--top {
    align-items: flex-start;
    padding-top: 0.5rem;
  }

  .form-label {
    width: 200px;
    min-width: 200px;
  }

  .form-row .wpcf7-form-control-wrap {
    flex: 1;
    width: auto;
  }
}
