/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/
/* ============================================
   1. JFB ボタン共通（登録する / 次へ）
   ============================================ */
.jet-form-builder .jet-form-builder__action-button,
.jet-form-builder button[type="submit"],
.jet-form-builder .jet-form-builder__next-page {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 7.5px 10px;
  border: none;
  border-radius: 3px;
  background-color: #333333;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

/* 戻るボタン（色だけ変更） */
.jet-form-builder .jet-form-builder__prev-page {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 7.5px 10px;
  border: none;
  border-radius: 3px;
  background-color: #888888;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

/* ============================================
   2. 2ボタン横並び（戻る+登録する / 戻る+次へ）
      → 均等幅・同じ高さ
   ============================================ */
.jet-form-builder .jet-form-builder__submit-wrap.has-prev,
.jet-form-builder .jet-form-builder__next-page-wrap {
  display: flex;
  align-items: stretch;   /* 高さを揃える */
  gap: 8px;
}

.jet-form-builder .jet-form-builder__submit-wrap.has-prev > button,
.jet-form-builder .jet-form-builder__next-page-wrap > button {
  flex: 1 1 0;
  width: auto;
}

/* ============================================
   3. チェックボックスの枠線（fieldset 既定の枠）を消す
   ============================================ */
.jet-form-builder-row.field-type-checkbox-field,
.jet-form-builder-row.field-type-radio-field {
  border: 0;
  padding: 0;
  margin: 0 0 10px;
  min-width: 0;
}

/* ============================================
   4. Progress のライン統一（!important で確実に）
   ============================================ */
.jet-form-builder-progress-pages {
  display: flex !important;
  align-items: flex-start !important;
  padding-bottom: 26px;            /* 絶対配置ラベルの逃げ場 */
}

.jet-form-builder-progress-pages__item--wrapper {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 0 !important;
}
.jet-form-builder-progress-pages__item--wrapper:last-child {
  flex: 0 0 auto !important;       /* 最後はライン無し */
}

.jet-form-builder-progress-pages__item {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

/* ラベルは絶対配置＝幅を取らない（ラインを食わない） */
.jet-form-builder-progress-pages__item--label {
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  white-space: nowrap !important;
  margin-top: 6px !important;
}

/* ライン本体 */
.jet-form-builder-progress-pages__separator {
  flex: 1 1 0 !important;
  height: 2px !important;
  min-width: 16px !important;
  margin: 16px 8px 0 !important;   /* 16px = 丸の半径。ズレたら調整 */
  background-color: #cccccc !important;
}

/* 通過済みのライン色（アクセントに合わせて調整可） */
.jet-form-builder-progress-pages__item--wrapper.passed-page
  .jet-form-builder-progress-pages__separator {
  background-color: #3bc1a0 !important;
}

/* ============================================
   5. フォーム幅を全ページ統一（既存・維持）
   ============================================ */
#brxe-tdkmfb .brxe-jet-form-builder-form,
#brxe-tdkmfb .jet-fb-form-block,
#brxe-tdkmfb form.jet-form-builder,
#brxe-tdkmfb .jet-form-builder-page {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#brxe-tdkmfb form.jet-form-builder {
  align-items: stretch !important;
}
/* ============================================
   6. フィールド間隔の統一（②の詰まり・ボタン上の隙間）
   ============================================ */
/* page1/3：ページ直下フィールド */
.jet-form-builder .jet-form-builder-page > .jet-form-builder-row {
  margin-bottom: 14px;
}

/* page2：WPブロック（グループ・カラム枠）に縦間隔 */
.jet-form-builder .wp-block-group {
  margin-bottom: 14px;
}
.jet-form-builder .wp-block-columns {
  margin-bottom: 14px;
  gap: 14px;                 /* 姓/名 など横の隙間 */
}
.jet-form-builder .wp-block-group__inner-container > .jet-form-builder-row {
  margin-bottom: 14px;       /* 住所の丁番地など枠内の単独行 */
}

/* ボタンの上に余白（②でボタンが密着する対策） */
.jet-form-builder .jet-form-builder__next-page-wrap,
.jet-form-builder .jet-form-builder__submit-wrap {
  margin-top: 18px;
}