@charset "UTF-8";

/* ==========================================================================
   フォーム用スタイル (form.css)
   ========================================================================== */

/* --------------------------------------
   1. ステップバー (Step Bar)
-------------------------------------- */
.stepBar {
  display: flex;
  max-width: 100%;
  position: relative;
  margin: 30px auto 40px;
  text-align: center;
  padding: 0;
}

.stepBar li {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-sub, #64748b);
  list-style: none;
  position: relative;
  width: 33.333%;
}

.stepBar li:after {
  background: var(--border-color, #cbd5e1);
  content: "";
  width: calc(100% - 48px);
  height: 3px;
  position: absolute;
  left: calc(-50% + 24px);
  top: 22px;
  z-index: 1;
}

.stepBar li:first-child:after {
  display: none;
}

.stepBar li span {
  background: var(--bg-light, #f8fafc);
  color: var(--text-sub, #64748b);
  border: 2px solid var(--border-color, #cbd5e1);
  display: inline-block;
  height: 48px;
  width: 48px;
  line-height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* 訪問済みステップ */
.stepBar .visited:after {
  background: var(--accent-green, #223B80);
}

.stepBar .visited span {
  background: #ffffff;
  color: var(--accent-green, #223B80);
  border: 2px solid var(--accent-green, #223B80);
}

/* 現在のステップ */
.stepBar .active {
  color: var(--accent-green, #223B80);
}

.stepBar .active span {
  background: var(--accent-green, #223B80);
  color: #ffffff;
  border: 2px solid var(--accent-green, #223B80);
}

@media (max-width: 480px) {
  .stepBar li {
    font-size: 0.8rem;
  }
  .stepBar li span {
    width: 38px;
    height: 38px;
    line-height: 34px;
    font-size: 0.95rem;
  }
  .stepBar li:after {
    top: 18px;
    width: calc(100% - 38px);
    left: calc(-50% + 19px);
  }
}


/* --------------------------------------
   2. フォームコントロール & 入力要素
-------------------------------------- */
.subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-sub, #64748b);
  margin-bottom: 20px;
}

.form-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color, #cbd5e1);
}

.form-group:last-child {
  border-bottom: none;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

/* 必須・任意バッジ */
.required {
  background-color: #e11d48;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}

.optional {
  background-color: #64748b;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}

.help-text {
  font-size: 0.8rem;
  color: var(--text-sub, #64748b);
  margin-top: 6px;
}

/* インプット・テキストエリア共通 */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main, #1e293b);
  background-color: #ffffff;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-green, #223B80);
  box-shadow: 0 0 0 3px rgba(32, 152, 87, 0.15);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* チェックボックスグループ */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 8px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.925rem;
  color: var(--text-main, #1e293b);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green, #223B80);
  cursor: pointer;
}

/* 個人情報保護方針ボックス */
.privacy-box {
  background-color: var(--bg-light, #f8fafc);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 6px;
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.link_privacy {
  color: var(--accent-green, #223B80);
  font-weight: 700;
  text-decoration: underline;
}

.link_privacy:hover {
  color: var(--accent-green-hover, #187743);
}


/* --------------------------------------
   3. エラー表示 (Validation Error)
-------------------------------------- */
.error-text {
  color: #e11d48;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.error-text::before {
  content: "⚠";
}

.error-input,
input.error-input,
textarea.error-input {
  border-color: #f43f5e !important;
  background-color: #fff1f2 !important;
}


/* --------------------------------------
   4. ボタン関連 (Buttons & Actions)
-------------------------------------- */
.btn-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 40px auto 0;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 44px;
  background-color: var(--accent-green, #223B80);
  color: #ffffff;
  border: 2px solid var(--accent-green, #223B80);
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 220px;
}

.btn-submit:hover {
  background-color: var(--accent-green-hover, #187743);
  border-color: var(--accent-green-hover, #187743);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background-color: #ffffff;
  color: var(--text-main, #1e293b);
  border: 2px solid var(--border-color, #cbd5e1);
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
}

.btn-back:hover {
  background-color: var(--bg-light, #f8fafc);
  border-color: var(--text-sub, #64748b);
}

@media (max-width: 767px) {
  .btn-wrapper {
    flex-direction: column-reverse;
  }
  .btn-submit,
  .btn-back {
    width: 100%;
  }
}


/* --------------------------------------
   5. 確認テーブル (Confirm Table)
-------------------------------------- */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 8px;
  overflow: hidden;
}

.confirm-table th,
.confirm-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #cbd5e1);
  font-size: 0.925rem;
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
}

.confirm-table tr:last-child th,
.confirm-table tr:last-child td {
  border-bottom: none;
}

.confirm-table th {
  width: 240px;
  background-color: var(--bg-light, #f8fafc);
  color: var(--text-main, #1e293b);
  font-weight: 700;
  border-right: 1px solid var(--border-color, #cbd5e1);
}

.confirm-table td {
  color: var(--text-main, #1e293b);
}

@media (max-width: 768px) {
  .confirm-table th,
  .confirm-table td {
    display: block;
    width: 100%;
  }
  .confirm-table th {
    background-color: var(--bg-light, #f8fafc);
    border-right: none;
    border-bottom: none;
    padding-bottom: 8px;
  }
  .confirm-table td {
    padding-top: 0;
  }
}


/* --------------------------------------
   6. 完了ページ (Thanks Page)
-------------------------------------- */
.complete-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
}

.complete-icon__circle {
  stroke: var(--accent-green, #223B80);
  stroke-width: 4;
  fill: #eaf5ef;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: circleDraw 0.6s ease forwards;
}

.complete-icon__check {
  stroke: var(--accent-green, #223B80);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkDraw 0.4s ease 0.5s forwards;
}

@keyframes checkDraw {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

@keyframes circleDraw {
  from { stroke-dashoffset: 300; }
  to   { stroke-dashoffset: 0; }
}