/* =====================================================
   SOUTHGATE TAXI — FluentForm Custom CSS
   管理画面 → 外観 → カスタマイズ → 追加CSS に貼り付け
   または wp_head フックで読み込む
   ===================================================== */

/* ── フォームコンテナ全体 ─────────────────────────── */
.fluentform,
.fluentform * {
  box-sizing: border-box;
}

.fluentform .ff-el-group {
  margin-bottom: 22px !important;
}

/* ── ラベル ───────────────────────────────────────── */
.fluentform label.ff-el-input--label,
.fluentform .ff-el-input--label {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #8A8A85 !important;
  margin-bottom: 9px !important;
  font-weight: 400 !important;
  display: block !important;
}

.fluentform label.ff-el-input--label .ff-asterisk {
  color: #F5F5F0 !important;
  margin-left: 4px;
}

/* ── テキスト・日付・セレクト入力 ────────────────── */
.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform input[type="number"],
.fluentform input[type="date"],
.fluentform input[type="time"],
.fluentform input[type="url"],
.fluentform select,
.fluentform textarea {
  background: #161616 !important;
  border: 1px solid #3D3D3D !important;
  border-radius: 0 !important;
  color: #F5F5F0 !important;
  padding: 17px 18px !important;
  font-size: 15px !important;
  font-family: 'Noto Sans JP', sans-serif !important;
  width: 100% !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: border-color 0.25s ease !important;
  height: auto !important;
  line-height: 1.5 !important;
}

.fluentform input[type="text"]:focus,
.fluentform input[type="email"]:focus,
.fluentform input[type="tel"]:focus,
.fluentform input[type="date"]:focus,
.fluentform select:focus,
.fluentform textarea:focus {
  border-color: #F5F5F0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.fluentform input::placeholder,
.fluentform textarea::placeholder {
  color: #4a4a45 !important;
  font-size: 14px !important;
}

/* ── セレクトボックスのカスタム矢印 ──────────────── */
.fluentform select {
  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='%238A8A85' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-color: #161616 !important;
  padding-right: 44px !important;
  cursor: pointer !important;
}

/* ── テキストエリア ───────────────────────────────── */
.fluentform textarea {
  resize: vertical !important;
  min-height: 120px !important;
}

/* ── ラジオ/チェックボックス 共通ラベル ──────────── */
.fluentform .ff-el-form-check-label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 18px !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: background 0.2s ease, color 0.2s ease !important;
  font-size: 14px !important;
  color: #8A8A85 !important;
  font-family: 'Noto Sans JP', sans-serif !important;
  margin: 0 !important;
  width: 100% !important;
  white-space: normal !important;
  word-break: keep-all !important;
  line-height: 1.6 !important;
}

.fluentform .ff-el-form-check-label:hover {
  background: #161616 !important;
  color: #F5F5F0 !important;
}

/* ラジオ/チェックボックスのカスタムデザイン */
.fluentform .ff-el-form-check-input[type="radio"],
.fluentform .ff-el-form-check-input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  border: 1px solid #3D3D3D !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  transition: border-color 0.2s, background 0.2s !important;
  margin: 0 !important;
}

.fluentform .ff-el-form-check-input[type="radio"]:checked,
.fluentform .ff-el-form-check-input[type="checkbox"]:checked {
  background: #F5F5F0 !important;
  border-color: #F5F5F0 !important;
}

/* 選択済みのラベル */
.fluentform .ff-el-form-check-input[type="radio"]:checked + span,
.fluentform .ff-el-form-check-input[type="checkbox"]:checked + span,
.fluentform .ff-el-form-check-input[type="radio"]:checked ~ label,
.fluentform .ff-el-form-check-input[type="radio"]:checked ~ .ff-el-form-check-label {
  color: #F5F5F0 !important;
  background: #161616 !important;
}

/* ── ラジオ・チェックグループ 共通リセット ──────── */
/* FluentFormが付けるff_list_3colをリセット（デフォルトは縦積み） */
.fluentform .ff_list_3col.ff-el-group {
  display: block !important;
  background: transparent !important;
  border: none !important;
  margin-bottom: 0 !important;
}

.fluentform .ff_list_3col .ff-el-form-check-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: transparent !important;
  border: none !important;
}

/* ── お問い合わせ種別：3カラムグリッド ────────────
   .sgt-ff-type > .ff_list_3col > .ff-el-form-check-group
   という構造に対して3カラムを適用
────────────────────────────────────────────────── */
.fluentform .sgt-ff-type .ff-el-form-check-group {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1px !important;
  background: #3D3D3D !important;
  border: 1px solid #3D3D3D !important;
  margin-bottom: 8px !important;
}

/* 各選択肢（セル） */
.fluentform .sgt-ff-type .ff-el-form-check {
  display: flex !important;
  background: #0A0A0A !important;
  min-height: 56px !important;
}

/* 選択肢ラベル：セル全体を埋める */
.fluentform .sgt-ff-type .ff-el-form-check-label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 16px 18px !important;
  background: #0A0A0A !important;
  color: #8A8A85 !important;
  font-size: 14px !important;
  font-family: 'Noto Sans JP', sans-serif !important;
  cursor: pointer !important;
  width: 100% !important;
  min-height: 56px !important;
  white-space: normal !important;
  word-break: keep-all !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}

.fluentform .sgt-ff-type .ff-el-form-check-label:hover {
  background: #161616 !important;
  color: #F5F5F0 !important;
}

/* 選択済みのセル */
.fluentform .sgt-ff-type .ff-el-form-check-input[type="radio"]:checked
  ~ .ff-el-form-check-label,
.fluentform .sgt-ff-type .ff-el-form-check input[type="radio"]:checked
  + label {
  background: #1e1e1e !important;
  color: #F5F5F0 !important;
  border-left: 2px solid #F5F5F0 !important;
  padding-left: 16px !important;
}

/* ── 免許ラジオ（横並び・枠線カード） ───────────── */
.fluentform .sgt-ff-license .ff-el-form-check-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  background: transparent !important;
  border: none !important;
}

.fluentform .sgt-ff-license .ff-el-form-check {
  flex: 1 1 auto !important;
  min-width: 200px !important;
}

.fluentform .sgt-ff-license .ff-el-form-check-label {
  border: 1px solid #3D3D3D !important;
  padding: 14px 20px !important;
  background: transparent !important;
  justify-content: flex-start !important;
  white-space: normal !important;
  min-height: unset !important;
  height: auto !important;
}

.fluentform .sgt-ff-license .ff-el-form-check-label:hover {
  border-color: #F5F5F0 !important;
  background: #161616 !important;
}

/* ── 個人情報同意チェックボックス ───────────────── */
.fluentform .sgt-ff-consent .ff-el-form-check-label {
  padding: 14px 18px !important;
  background: #161616 !important;
  border: 1px solid #3D3D3D !important;
  color: #8A8A85 !important;
  font-size: 13px !important;
}

.fluentform .sgt-ff-consent .ff-el-form-check-label a {
  color: #F5F5F0 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.fluentform .sgt-ff-consent .ff-el-form-check-label a:hover {
  color: #8A8A85 !important;
}

/* ── 送信ボタン ───────────────────────────────────── */
.fluentform .ff-btn-submit,
.fluentform button[type="submit"] {
  background: #F5F5F0 !important;
  color: #0A0A0A !important;
  border: 1px solid #F5F5F0 !important;
  border-radius: 0 !important;
  padding: 18px 48px !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(.16,1,.3,1) !important;
  box-shadow: none !important;
  min-width: 200px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fluentform .ff-btn-submit:hover,
.fluentform button[type="submit"]:hover {
  background: transparent !important;
  color: #F5F5F0 !important;
  transform: translateY(-3px) !important;
}

/* ── バリデーションエラー ─────────────────────────── */
.fluentform .ff-el-form-check-input.error,
.fluentform input.error,
.fluentform select.error,
.fluentform textarea.error {
  border-color: #cc4444 !important;
}

.fluentform .error.text-danger,
.fluentform .ff-el-is-error .ff-el-help-message {
  color: #cc4444 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12px !important;
  margin-top: 6px !important;
  letter-spacing: 0.05em !important;
}

/* ── 成功メッセージ ───────────────────────────────── */
.fluentform .ff-message-success {
  background: transparent !important;
  border: 1px solid #3D3D3D !important;
  border-radius: 0 !important;
  color: #F5F5F0 !important;
  padding: 20px 28px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13px !important;
  letter-spacing: 0.05em !important;
  box-shadow: none !important;
}

/* ── ローディング状態 ─────────────────────────────── */
.fluentform.ff-loading .ff-btn-submit {
  opacity: 0.6 !important;
  cursor: wait !important;
  transform: none !important;
}

/* ── フルワイドフィールド ─────────────────────────── */
.fluentform .sgt-ff-full .ff-el-input--label,
.fluentform .sgt-ff-full input,
.fluentform .sgt-ff-full textarea {
  width: 100% !important;
}

/* ── 名前フィールドの横並び調整 ──────────────────── */
.fluentform .ff-name-fields-wrap {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
}

/* ── ヘルプテキスト ───────────────────────────────── */
.fluentform .ff-el-help-message:not(.error) {
  color: #5a5a55 !important;
  font-size: 12px !important;
  margin-top: 6px !important;
}

/* ── フォームセクション区切り（条件分岐ブロック） ── */
.fluentform .ff-el-group.sgt-ff-date,
.fluentform .ff-el-group.sgt-ff-time,
.fluentform .ff-el-group.sgt-ff-passengers {
  /* 予約系フィールドに薄い上線 */
}

/* ── モバイル対応 ─────────────────────────────────── */
@media (max-width: 640px) {
  /* 種別ラジオ: 3カラム→2カラム */
  .fluentform .sgt-ff-type .ff-el-form-check-group {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .fluentform .ff-name-fields-wrap {
    grid-template-columns: 1fr !important;
  }

  .fluentform .sgt-ff-license .ff-el-form-check-group {
    flex-direction: column !important;
  }

  .fluentform .ff-btn-submit,
  .fluentform button[type="submit"] {
    width: 100% !important;
    padding: 18px 24px !important;
  }
}

@media (max-width: 400px) {
  /* 種別ラジオ: 2カラム→1カラム */
  .fluentform .sgt-ff-type .ff-el-form-check-group {
    grid-template-columns: 1fr !important;
  }
}
