/**
 * お問い合わせページ専用スタイル
 * 
 * 倉本鐵工株式会社のお問い合わせページのスタイリング
 * 
 * @package Kuramoto
 * @version 1.0.0
 * @author 倉本鐵工株式会社
 */

/* お問い合わせ案内セクション */
.contact-intro {
  background: #fff;
  padding: 60px 0 0;
  margin: 40px 0;
}

.contact-intro-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-intro-text {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  text-align: center;
}

.contact-intro-text:nth-child(2) {
  margin-bottom: 10px;
}

.contact-details {
  margin: 40px auto;
  max-width: 350px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: clamp(1.438rem, 1.325rem + 0.56vw, 2rem);
  justify-content: center;
}

.contact-detail-item:last-child {
  font-size: 20px;
}

.contact-detail-item:last-child .contact-label,
.contact-detail-item:last-child .contact-value {
  color: #333;
}

.contact-detail-item:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-weight: 600;
  color: #333;
  min-width: 60px;
  margin-right: 15px;
}

.contact-value {
  color: #5CC9E2;
  font-weight: 700;
}

/* iOSでの電話番号自動リンク化を防ぐ（色の変更のみ防止） */
.contact-phone-number {
  color: #5CC9E2 !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

.contact-phone-number:hover,
.contact-phone-number:active,
.contact-phone-number:visited {
  color: #5CC9E2 !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
}

.contact-notes {
  text-align: center;
}

.contact-note {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 10px;
}

.contact-note:nth-child(2),
.contact-note:nth-child(3) {
  color: #FF5454;
  font-weight: 600;
}


.contact-note:last-child {
  margin-bottom: 0;
}

/* お問い合わせフォームセクション */
.contact-form-section {
  padding: 0 0 60px;
  margin: 40px 0;
}

.contact-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.form-type-selector {
  padding: 0 40px;
}

/* Contact Form 7 スタイル調整 */
.contact-form-wrapper .wpcf7 {
  padding: 0 40px;
  border-radius: 8px;
}

.contact-form-wrapper .wpcf7-form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  background: rgba(30, 150, 252, 0.05);
}

/* ラジオボタンの背景を白に戻す */
.wpcf7-form-control.wpcf7-radio {
  background: #fff;
}

/* 性別のラジオボタンも四角形スタイルに */
.form-input input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #5CC9E2;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
  margin-right: 8px;
}

.form-input input[type="radio"]:checked {
  background: #5CC9E2;
  border-color: #5CC9E2;
}

.form-input input[type="radio"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.form-input label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
}

/* 性別のラジオボタンを横並びに */
.form-input {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.contact-form-wrapper .wpcf7-form-control::placeholder {
  color: #aaa;
  font-style: italic;
}

.contact-form-wrapper .wpcf7-form-control:focus {
  outline: none !important;
  border: 3px solid #5CC9E2 !important;
  box-shadow: 0 0 0 3px rgba(92, 201, 226, 0.1) !important;
}

/* フォーカス時のスタイル */
.contact-form-wrapper .wpcf7-form-control:focus {
  outline: none !important;
  border: 3px solid #5CC9E2 !important;
  box-shadow: 0 0 0 3px rgba(92, 201, 226, 0.1) !important;
}

.contact-form-wrapper .wpcf7-submit {
  display: block;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #70CC94 0%, #5CC9E2 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  padding: 15px 30px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(112, 204, 148, 0.3);
  position: relative;
  overflow: hidden;
  min-width: 200px;
  max-width: 300px;
  width: 250px;
  height: 70px;
  border: none;
  cursor: pointer;
  margin: 30px auto;
  text-align: center;
}

.contact-form-wrapper .wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(112, 204, 148, 0.4);
}

/* 送信ボタンのテキストスタイル */
.contact-form-wrapper .wpcf7-submit::before {
  content: '送信する';
  flex: 1;
  text-align: center;
  padding-right: 15px;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

/* 送信ボタンのアイコン（矢印） */
.contact-form-wrapper .wpcf7-submit::after {
  content: '›';
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #5CC9E2;
  font-size: 1.2rem;
  font-weight: bold;
}

/* フォームエラー表示 */
.form-error {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}

.form-error p {
  margin: 0 0 10px 0;
}

.form-error p:last-child {
  margin-bottom: 0;
}

/* Contact Form 7 エラーメッセージ */
.wpcf7-not-valid-tip {
  color: #FF0000;
  font-size: 14px;
  margin-top: 5px;
  font-weight: 500;
}

.wpcf7-not-valid {
  border-color: #dc3545 !important;
}

.wpcf7-response-output {
  margin: 20px 0;
  padding: 15px;
  border-radius: 4px;
}

.wpcf7-mail-sent-ok {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.wpcf7-mail-sent-ng {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.wpcf7-spam-blocked {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.wpcf7-validation-errors {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* 条件分岐フィールドのスタイル */
.wpcf7cf-field-visible {
  display: block !important;
}

.wpcf7cf-field-hidden {
  display: none !important;
}

/* Conditional Fields プラグインの隠し要素を上書き */
.wpcf7cf-hidden {
  display: block !important;
}

/* より具体的なセレクタでプラグインのスタイルを上書き */
.wpcf7-form .wpcf7cf-hidden {
  display: block !important;
}

/* 条件分岐で表示されるべきフィールドを強制表示 */
.wpcf7-form div[class*="wpcf7cf-"] {
  display: block !important;
}

/* より強力なアプローチ：すべての隠し要素を表示 */
.wpcf7-form .wpcf7cf-hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 特定の隠し要素を制御 */
.wpcf7-form .wpcf7cf-hidden:nth-child(1) {
  display: block !important;
}

.wpcf7-form .wpcf7cf-hidden:nth-child(2) {
  display: none !important;
}

/* 求人応募フィールドが表示されている状態 */
.wpcf7-form.recruitment-mode [data-group="job-application"] {
  display: block !important;
}

.wpcf7-form.recruitment-mode [data-group="contact-general"] {
  display: none !important;
}

/* その他お問い合わせフィールドが表示されている状態 */
.wpcf7-form.other-mode [data-group="job-application"] {
  display: none !important;
}

.wpcf7-form.other-mode [data-group="contact-general"] {
  display: block !important;
}

/* 初期状態：求人応募フィールドを表示 */
.wpcf7-form [data-group="job-application"] {
  display: block !important;
}

.wpcf7-form [data-group="contact-general"] {
  display: none !important;
}

/* 必須バッジのスタイル */
.cf7-req {
  color: #FF5454;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 8px;
  font-weight: 500;
  border: 1px solid #FF5454;
}

/* ラジオボタンのスタイル */
.wpcf7-radio {
  display: flex;
  gap: 20px;
}

.wpcf7-radio .wpcf7-list-item {
  margin: 0;
}

.wpcf7-radio input[type="radio"] {
  margin-right: 8px;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #5CC9E2;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.wpcf7-radio input[type="radio"]:checked {
  background: #5CC9E2;
  border-color: #5CC9E2;
}

.wpcf7-radio input[type="radio"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}


.wpcf7-radio label {
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* プライバシーポリシーリンクのスタイル */
.wpcf7-form a {
  color: #5CC9E2;
  text-decoration: underline;
}

.wpcf7-form a:hover {
  color: #0d6efd;
  text-decoration: none;
}

/* フォームフィールドの横並びレイアウト */
.form-field {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 20px;
}

.form-label {
  min-width: 200px;
  padding-top: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
}

/* 任意フィールドのスタイル */
.cf7-req.not-req {
  color: #666;
  border-color: #666;
  background: transparent;
}


/* 条件分岐で表示/非表示されるフィールドグループ */
[data-field-group="recruitment"],
[data-field-group="other"] {
  transition: all 0.3s ease;
}


/* フォームフィールドのスタイル改善 */
.wpcf7-form-control-wrap {
  margin-bottom: 20px;
}

.wpcf7-form-control-wrap label {
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.wpcf7-form-control-wrap .wpcf7-form-control {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
}

.wpcf7-form-control-wrap .wpcf7-form-control:focus {
  outline: none !important;
  border: 3px solid #5CC9E2 !important;
  box-shadow: 0 0 0 3px rgba(92, 201, 226, 0.1) !important;
}

/* フォーカス時のスタイル */
.wpcf7-form-control-wrap .wpcf7-form-control:focus {
  outline: none !important;
  border: 3px solid #5CC9E2 !important;
  box-shadow: 0 0 0 3px rgba(92, 201, 226, 0.1) !important;
}

.btn-flat-Panel {
  text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .contact-intro {
    padding: 40px 0;
  }

  .contact-intro-content {
    padding: 0 15px;
  }

  .contact-details {
    padding: 20px;
    margin: 30px auto;
  }

  .contact-label {
    margin-bottom: 5px;
    margin-right: 0;
  }

  .contact-form-section {
    padding: 40px 0;
  }

  .contact-form-wrapper .wpcf7 {
    padding: 30px 20px;
  }

  .form-type-selector {
    padding: 0 20px;
  }

  .form-field {
    flex-direction: column;
  }
}