/* ===================================
   フォーム専用CSS（contact.css）
   プレフィックス: cf-
   =================================== */

#main {
  position: static;
}

/* --- スパム対策: ハニーポット（人間には見えないダミー欄） --- */
.cf-hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
}

/* --- ページタイトル --- */
.cf-page-title {
  background: #e4f4ff;
  color: #0ea2e7;
  text-align: center;
  letter-spacing: 0.1em;
  padding: 90px 20px 80px;
  font-size: 30px;
}

/* --- タブUI --- */
.cf-tab-area {
  background-color: #e4f4ff;
}
.cf-tab-inner {
  background-color: #fff;
  max-width: 936px;
  margin: 0 auto;
  padding: 25px;
}
.cf-tab-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cf-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  background: #61bbfa;
  color: #fff;
  /* border: 1px solid #0ea2e7; */
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.cf-tab-btn:hover {
  background: #d0ecfa;
}

.cf-tab-btn::before {
  content: '>';
}

.cf-tab-btn.is-active::before {
  display: none;
}

.cf-tab-btn.is-active {
  background: #0ea2e7;
  color: #fff;
  border-color: #0ea2e7;
}

.cf-tab-content {
  display: none;
}

.cf-tab-content.is-active {
  display: block;
}

/* --- フォームレイアウト --- */
.cf-form-area {
  background-color: #e4f4ff;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.cf-tab-area,
.cf-tab-area *,
.cf-tab-area *:before,
.cf-tab-area *:after,
.cf-form-area,
.cf-form-area *,
.cf-form-area *:before,
.cf-form-area *:after,
.cf-privacy-area,
.cf-privacy-area *,
.cf-privacy-area *:before,
.cf-privacy-area *:after {
  box-sizing: border-box;
}

.cf-section {
  margin-bottom: 10px;
}

.cf-section-title {
  font-size: 18px;
  font-weight: bold;
  color: #001e58;
  padding: 12px 0;
  margin-bottom: 10px;
  border-bottom: 2px solid #0068b9;
}

.cf-row {
  display: flex;
  align-items: flex-start;
  padding: 16px 0;
  /* border-bottom: 1px solid #ddd; */
}

.cf-label {
  width: 43%;
  min-width: 300px;
  font-size: 14px;
  color: #333;
  padding-top: 8px;
  line-height: 1.6;
}

.cf-input-area {
  flex: 1;
}

/* --- 必須バッジ --- */
.cf-required {
  display: inline-block;
  background: #0092d6;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: normal;
}

/* --- フォーム要素 --- */
.cf-text,
.cf-textarea,
.cf-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: none;
  border-radius: 4px !important;
  box-sizing: border-box;
  font-family: inherit;
  background: #ededed;
}

.cf-text:focus,
.cf-textarea:focus,
.cf-select:focus {
  outline: none;
  border-color: #0068b9;
  box-shadow: 0 0 0 2px rgba(0, 104, 185, 0.15);
}

.cf-textarea {
  min-height: 120px;
  resize: vertical;
}

.cf-text-short {
  width: 200px;
}

.cf-text-medium {
  width: 300px;
}

/* --- ラジオ・チェックボックスグループ --- */
.cf-radio-group,
.cf-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px 20px;
  padding: 8px 0;
}

.cf-radio-group label,
.cf-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

/* --- カスタムラジオボタン --- */
.cf-radio-group input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ededed;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.cf-radio-group input[type="radio"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #099ce0;
  opacity: 0;
  transition: opacity 0.15s;
}

.cf-radio-group input[type="radio"]:checked {
}

.cf-radio-group input[type="radio"]:checked::after {
  opacity: 1;
}

/* --- カスタムチェックボックス --- */
.cf-checkbox-group input[type="checkbox"],
.cf-table-input input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #ededed;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.cf-checkbox-group input[type="checkbox"]::after,
.cf-table-input input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 12px;
  height: 7px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.cf-checkbox-group input[type="checkbox"]:checked,
.cf-table-input input[type="checkbox"]:checked {
  background-color: #0092d6;
}

.cf-checkbox-group input[type="checkbox"]:checked::after,
.cf-table-input input[type="checkbox"]:checked::after {
  opacity: 1;
}

/* --- テーブル形式入力（フォームB パレット仕様用） --- */
.cf-table-input {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cf-table-input[data-table-name=b_palette_size] {
  margin-bottom: 100px;
}

.cf-table-input .cf-text {
  min-width: 0;
}

.cf-table-input th,
.cf-table-input td {
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

.cf-table-input th {
  font-weight: normal;
  color: #001e58;
  font-size: 13px;
  white-space: nowrap;
}

.cf-table-input .cf-table-row-num {
  width: 40px;
  font-weight: normal;
  color: #666;
}

.cf-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- フィールド補足テキスト --- */
.cf-field-note {
  font-size: 13px;
  color: #666;
  margin: 5px 0 8px;
  line-height: 1.6;
}

.cf-field-note.color-b {
  color: #0092d6;
  text-indent: 6em;
}

/* --- テーブル補足テキスト --- */
.cf-table-note {
  font-size: 13px;
  color: #333;
  margin: 30px 0;
  line-height: 1.6;
}

/* --- 条件分岐表示 --- */
.cf-conditional {
  display: none;
  margin-top: 12px;
  background: #f9fbfd;
  border-radius: 4px;
}

.cf-conditional.is-visible {
  display: block;
}

.cf-conditional-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cf-conditional-row:last-child {
  margin-bottom: 0;
}

.cf-conditional-label {
  font-size: 13px;
  font-weight: bold;
  color: #555;
  min-width: 80px;
}

.cf-conditional-input {
  flex: 1;
}

.cf-conditional-input .cf-text {
  width: 100%;
}

/* --- その他テキスト入力（チェックボックスの「その他」連動） --- */
.cf-other-text {
  display: none;
  margin-top: 8px;
}

.cf-other-text.is-visible {
  display: block;
}

/* --- バリデーションエラー --- */
.cf-error .cf-text,
.cf-error .cf-textarea,
.cf-error .cf-select {
  border-color: #e74c3c;
  background: #fef5f5;
}

.cf-error .cf-radio-group,
.cf-error .cf-checkbox-group {
  background: #fef5f5;
  border-radius: 4px;
  padding: 8px;
}

.cf-error-msg {
  display: none;
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
}

.cf-error .cf-error-msg {
  display: block;
}

/* --- 説明テキスト --- */
.cf-description {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 40px;
  padding: 0;
}

/* --- 送信ボタン・フッター --- */
.cf-submit-area {
  text-align: center;
  padding-top: 40px;
}

.cf-caution-text {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 24px;
  text-align: left;
}

.cf-submit-btn {
  display: inline-block;
  background: #0ea2e7;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  padding: 16px 60px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.05em;
  min-width: 185px;
}

.cf-submit-btn:hover {
  background: #005a9e;
}

.cf-submit-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.cf-privacy-text {
  font-size: 12px;
  color: #888;
  margin-top: 16px;
  line-height: 1.6;
}

.cf-privacy-text a {
  color: #0068b9;
  text-decoration: underline;
}

/* --- 送信完了表示 --- */
.cf-result {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}

.cf-result.is-visible {
  display: block;
}

.cf-result-success h2 {
  font-size: 22px;
  color: #001e58;
  margin-bottom: 20px;
}

.cf-result-success p {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 10px;
}

.cf-result-back {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 40px;
  background: #0068b9;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.2s;
}

.cf-result-back:hover {
  background: #005a9e;
}

/* --- 小見出し補助 --- */
.cf-sub-label {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  font-weight: normal;
}

/* --- インラインヒント --- */
.cf-hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* --- フォーム内タイトル --- */
.cf-form-title {
  font-size: 22px;
  color: #0ea2e7;
  text-align: center;
  margin-bottom: 70px;
  font-weight: bold;
}

/* --- チェックボックス横並び --- */
.cf-checkbox-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

/* --- セクションタイトル（枠線ラベル風） --- */
.cf-section-title-box {
  display: inline-block;
  font-size: 15px;
  color: #0ea2e7;
  border: 1px solid #0ea2e7;
  padding: 6px 16px;
  margin-bottom: 25px;
  text-align: left;
}

/* --- 住所3段構成 --- */
.cf-address-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-address-label {
  font-size: 13px;
  color: #555;
  min-width: 70px;
  white-space: nowrap;
}

.cf-address-row .cf-text {
  flex: 1;
}

/* --- 郵便番号2分割入力 --- */
.cf-zip-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cf-zip-group .cf-text {
  width: 80px;
}

.cf-zip-sep {
  font-size: 16px;
  color: #555;
}

/* --- 注意文（リンク付き） --- */
.cf-caution-link {
  text-align: center;
  font-size: 13px;
  color: #269bd9;
  margin-bottom: 24px;
}

/* --- 個人情報保護セクション --- */
.cf-privacy-area {
  background: #e4f4ff;
  padding-bottom: 85px;
}

.cf-privacy-section {
  max-width: 936px;
  margin: 0 auto;
  background-color: #fff;
  text-align: left;
  padding: 0 118px 85px;
}

.cf-privacy-section-title {
  font-size: 18px;
  font-weight: bold;
  color: #269bd9;
  margin-bottom: 20px;
  border-top: 1px solid #0ea2e7;
  padding-top: 25px;
}

.cf-privacy-section-text {
  font-size: 13px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 24px;
  text-align: left;
}

.cf-privacy-detail-btn {
  display: inline-block;
  font-size: 13px;
  color: #269bd9;
  border: 1px solid #269bd9;
  padding: 8px 24px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.cf-privacy-detail-btn:hover {
  background: #269bd9;
  color: #fff;
  opacity: 1;
}

.cf-privacy-detail-area {
  text-align: right;
}

/* --- フォームカード（白背景ボックス） --- */
.cf-form-card {
  max-width: 936px;
  margin: 0 auto;
  background: #fff;
  /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.06); */
  border-radius: 4px;
  padding: 85px 118px 115px;
}

/* --- ラベル縦積みレイアウト --- */
.cf-row-vertical {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
}

.cf-row-vertical .cf-label {
  width: 100%;
  min-width: auto;
  padding-top: 0;
  margin-bottom: 8px;
}


/* ===================================
   レスポンシブ: PC（1020px以上）
   =================================== */
@media screen and (min-width: 1020px) {
  .cf-sp {
    display: none;
  }
  .cf-pc {
    display: block;
  }

  .cf-tab-nav {
    max-width: 936px;
  }
}


/* ===================================
   レスポンシブ: タブレット（768px〜1019px）
   =================================== */
@media only screen and (min-width: 768px) and (max-width: 1019px) {
  .cf-sp {
    display: none;
  }
  .cf-pc {
    display: block;
  }

  .cf-page-title {
    padding: 80px 20px;
    font-size: 24px;
  }

  .cf-form-area {
    max-width: 100%;
  }

  .cf-tab-btn {
    font-size: 12px;
  }

  .cf-label {
    width: 30%;
  }

  .cf-form-card {
    padding: 65px 40px 100px;
  }

  .cf-privacy-section {
    padding: 0 40px 60px;
  }

  .cf-table-input th,
  .cf-table-input td {
    padding: 8px 5px;
  }
}


/* ===================================
   レスポンシブ: スマートフォン（767px以下）
   =================================== */
@media screen and (max-width: 767px) {
  .cf-sp {
    display: block;
  }
  .cf-pc {
    display: none;
  }
  .cf-page-title {
    margin-top: 68px;
    padding: 16% 5%;
    font-size: 20px;
  }

  .cf-tab-inner {
    padding: 10% 8%;
  }

  .cf-tab-nav {
    flex-direction: column;
    gap: 5px;
  }

  .cf-tab-btn {
    font-size: 13px;
    padding: 18px 10px;
  }

  .cf-form-area {
  }

  .cf-section-title {
    font-size: 16px;
  }

  .cf-row {
    flex-direction: column;
    padding: 14px 0;
  }

  .cf-label {
    width: 100%;
    min-width: auto;
    padding-top: 0;
    margin-bottom: 8px;
  }

  .cf-input-area {
    width: 100%;
  }

  .cf-address-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cf-text-short,
  .cf-text-medium {
    width: 100%;
  }

  .cf-radio-group,
  .cf-checkbox-group {
    flex-direction: column;
    gap: 8px;
  }

  .cf-checkbox-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cf-form-title {
    font-size: 18px;
    margin-bottom: 20%;
  }

  .cf-conditional-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .cf-conditional-label {
    min-width: auto;
  }

  .cf-conditional-input {
    width: 100%;
  }

  .cf-submit-area {
    padding-bottom: 0;
  }

  .cf-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  /* テーブル横スクロール対応 */
  .cf-table-scroll {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .cf-table-input {
    min-width: auto;
    table-layout: fixed;
  }

  .cf-table-input .cf-table-row-num {
    width: 14px;
  }

  /* 郵便番号SP対応 */
  .cf-zip-group .cf-text {
    width: 70px;
  }

  /* 住所ラベルSP対応 */
  .cf-address-label {
    min-width: auto;
  }

  /* フォームカードSP対応 */
  .cf-form-card {
    padding: 10% 8% 14%;
    box-shadow: none;
    border-radius: 0;
  }

  /* 個人情報セクションSP対応 */
  .cf-privacy-area {
    padding-bottom: 15%;
  }

  .cf-privacy-section {
    padding: 0 8% 12%;
  }

  .cf-privacy-section-title {
    padding-top: 5%;
    margin-bottom: 5%;
  }

  .cf-privacy-detail-area {
    /* text-align: center; */
  }

  .cf-table-input th,
  .cf-table-input td {
    padding: 4px;
  }
  .cf-table-input th {
    font-size: 10px;
  }
  .cf-table-input[data-table-name=b_palette_size] th:nth-of-type(2),
  .cf-table-input[data-table-name=b_palette_size] th:nth-of-type(3),
  .cf-table-input[data-table-name=b_palette_size] th:nth-of-type(4) {
    width: 20%;
  }

  .cf-field-note.color-b {
    text-indent: 0;
  }
}
