/* お問い合わせ（無料相談）ページ専用スタイル（Figma node 325:1977 紺 / 325:2198 赤 / SP 476:2673・476:3296） */

/* ---------- テーマ（ご相談の種別で紺⇔赤を切り替え） ---------- */
body {
  --ct-theme: #17325f;
  /* 商業施設・スーパー向け＝ブランド紺 */
  --ct-shadow: rgba(23, 50, 95, .5);
}

body[data-type="maker"] {
  --ct-theme: #cc242b;
  /* メーカー・イベント事業者向け＝赤 */
}

/* ---------- ページ全体 ---------- */
.ct-main {
  padding: 80px 0;
  background: #fff;
}

/* ---------- トップへ戻る ---------- */
.ct-back {
  height: 28px;
}

.ct-back__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-sub);
  line-height: 1;
}

.ct-back__link:hover {
  opacity: .7;
}

.ct-back__icon {
  width: 20px;
  height: 20px;
}

/* ---------- 見出しとカードのラッパー ---------- */
.ct-body {
  width: 752px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- ページ見出し ---------- */
.ct-head {
  text-align: center;
}

.ct-head__label {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 3px;
  color: #cc242b;
  line-height: 1;
}

.ct-head__title {
  margin-top: 16px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 40px;
  line-height: 1.4;
  color: var(--color-navy-dark);
}

.ct-head__lead {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text-sub);
}

/* ---------- フォームカード ---------- */
.ct-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 32px 56px -32px var(--ct-shadow);
  overflow: hidden;
}

.ct-card>.ct-typeswitch {
  margin-bottom: 0;
}

/* ---------- 共通ラベル ---------- */
.ct-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.5;
}

.ct-label--lg {
  font-size: 12.5px;
  line-height: 1.2;
}

/* ---------- ご相談の種別トグル ---------- */
.ct-typeswitch__btns {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.ct-type-btn {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-sub);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.ct-type-btn[aria-pressed="true"] {
  background: var(--ct-theme);
  border-color: var(--ct-theme);
  color: #fff;
}

.ct-type-btn:hover {
  opacity: .9;
}

.ct-type-btn__text {
  white-space: nowrap;
}

.ct-sp-br {
  display: none;
}

.ct-type-btn__icon {
  display: none;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.ct-type-btn[aria-pressed="true"] .ct-type-btn__icon--on {
  display: block;
}

.ct-type-btn[aria-pressed="false"] .ct-type-btn__icon--off {
  display: block;
}

/* ---------- フォーム本体（CF7互換） ---------- */
.ct-form,
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}

.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* 基本情報入力欄 */
.ct-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ct-fields__row {
  display: flex;
  gap: 16px;
}

.ct-field {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ct-input {
  width: 100%;
  height: 48px;
  padding: 0 17px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
}

.ct-input::placeholder,
.ct-textarea::placeholder {
  color: #757575;
}

.ct-input:focus-visible,
.ct-textarea:focus-visible {
  outline: none;
  border-color: var(--ct-theme);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ct-theme) 15%, transparent);
}

/* 自由記述 */
.ct-textarea {
  width: 100%;
  height: 121px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  resize: vertical;
}

/* ---------- チェックボックス・ラジオのグループ ---------- */
[hidden],
[data-topics][hidden],
.ct-chips[hidden] {
  display: none !important;
}

/* ご相談内容の種別切り替え（商業施設向け / メーカー向け） */
body[data-type="facility"] [data-topics="maker"],
body:not([data-type="maker"]) [data-topics="maker"] {
  display: none !important;
}

body[data-type="maker"] [data-topics="facility"] {
  display: none !important;
}

.ct-group {
  border: 0;
}

.ct-group>.ct-label {
  margin-bottom: 12px;
}

.ct-cols {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ct-cols>.ct-group {
  flex: 1 0 0;
  min-width: 0;
}

.ct-group--timing>.ct-label {
  margin-bottom: 11px;
}

/* チップ型チェックボックス（CF7対応） */
.ct-chips:not([hidden]),
.ct-chips:not([hidden]) .wpcf7-checkbox,
.ct-chips--area .wpcf7-checkbox {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.ct-chip,
.ct-chips .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px 0 8px;
  background: #f6f8fb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--color-text);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.ct-chip:hover,
.ct-chips .wpcf7-list-item label:hover {
  border-color: var(--ct-theme);
}

/* ラジオボタン（CF7対応） */
.ct-radios,
.ct-radios .wpcf7-radio {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.ct-radio,
.ct-radios .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

/* CF7リスト要素のリセット */
.wpcf7-list-item {
  margin: 0 !important;
}

/* アイコン（背景画像）制御 */
.ct-chip input[type="checkbox"],
.ct-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  cursor: pointer;
}

.ct-chip input[type="checkbox"] {
  background-image: url("../img/contact/checkbox-unchecked.svg");
}

.ct-chip input[type="checkbox"]:checked {
  background-image: url("../img/contact/checkbox-checked-navy.svg");
}

.ct-radio input[type="radio"] {
  background-image: url("../img/contact/radio-unchecked.svg");
}

.ct-radio input[type="radio"]:checked {
  background-image: url("../img/contact/radio-checked-navy.svg");
}

.ct-chip input:focus-visible,
.ct-radio input:focus-visible {
  outline: 2px solid var(--ct-theme);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 送信ボタン ---------- */
.ct-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ct-submit__btn,
input[type="submit"].ct-submit__btn,
.wpcf7-submit {
  width: 100%;
  height: 55px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ct-theme);
  border: none !important;
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -16px var(--ct-shadow);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  outline: none !important;
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
}

.ct-submit__btn:hover,
input[type="submit"].ct-submit__btn:hover {
  opacity: .9;
}

.ct-submit__icon {
  width: 24px;
  height: 24px;
}

.ct-submit__note {
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.17;
  text-align: center;
}

/* ---------- SP（レスポンシブ） ---------- */
@media (max-width: 768px) {

  .ct-main {
    padding: 60px 0;
  }

  .ct-body {
    width: 100%;
    gap: 32px;
    margin-top: 40px;
  }

  .ct-head {
    text-align: left;
  }

  .ct-head__title {
    font-size: 32px;
  }

  .ct-head__lead {
    font-size: 14px;
  }

  .ct-card {
    padding: 20px;
  }

  .ct-typeswitch__btns {
    gap: 8px;
  }

  .ct-type-btn {
    padding: 0 8px;
    font-size: 14px;
  }

  .ct-type-btn__text {
    white-space: normal;
    line-height: 1.43;
    text-align: center;
  }

  .ct-sp-br {
    display: inline;
  }

  .ct-form,
  .wpcf7-form {
    gap: 24px;
    margin-top: 24px;
  }

  .ct-fields__row {
    flex-direction: column;
    gap: 16px;
  }

  .ct-fields__row>.ct-field {
    flex: none;
    width: 100%;
  }

  .ct-cols {
    flex-direction: column;
    gap: 24px;
  }

  .ct-cols>.ct-group {
    flex: none;
    width: 100%;
  }

  .ct-chips:not([hidden]),
  .ct-chips:not([hidden]) .wpcf7-checkbox,
  .ct-chips--area .wpcf7-checkbox {
    gap: 8px !important;
  }

  .ct-radios,
  .ct-radios .wpcf7-radio {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 20px);
    grid-auto-flow: column;
    column-gap: 8px;
    row-gap: 4px;
  }

  .ct-radio {
    gap: 4px;
  }

  .ct-group--area>.ct-label {
    margin-bottom: 12px;
  }

  .ct-chip input[type="checkbox"],
  .ct-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    background-size: 20px 20px;
  }

  .ct-submit {
    align-items: flex-start;
  }

  .ct-submit__note {
    text-align: left;
  }

}
