/* ============================================
   フォーム速度改善用CSS - アポコミLP
   最終更新：2026-05-13 00:30

   処理中UI / エラーUI / インラインThanks / マイクロコピー
   既存の 26_0510_14_フォーム_css.css に追記するか、
   別ファイルとして読み込む
   ============================================ */

/* ----------------------------------------
   マイクロコピー（送信ボタン周り）
   ---------------------------------------- */
.apocomi-form__value-copy {
  text-align: center;
  font-size: 14px;
  color: #374151;
  margin-bottom: 12px;
  line-height: 1.6;
  font-weight: 500;
}

.apocomi-form__expect-copy {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* ----------------------------------------
   送信ボタン：処理中UI
   ---------------------------------------- */
.apocomi-form__button.is-submitting {
  cursor: not-allowed;
  opacity: 0.85;
  position: relative;
}

.apocomi-form__button.is-complete {
  background-color: #22c55e;
  border-color: #22c55e;
}

.apocomi-btn__spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.apocomi-spinner-icon {
  animation: apocomi-spin 0.8s linear infinite;
}

@keyframes apocomi-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.apocomi-btn__status-text {
  font-size: 15px;
}

/* ----------------------------------------
   AJAXエラー表示
   ---------------------------------------- */
.apocomi-ajax-errors {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.apocomi-ajax-errors__title {
  color: #dc2626;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 8px 0;
}

.apocomi-ajax-errors__list {
  color: #991b1b;
  font-size: 14px;
  margin: 0 0 12px 0;
  padding-left: 20px;
}

.apocomi-ajax-errors__list li {
  margin-bottom: 4px;
}

.apocomi-ajax-errors__retry {
  display: inline-block;
  padding: 8px 24px;
  background-color: #dc2626;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.apocomi-ajax-errors__retry:hover {
  background-color: #b91c1c;
}

/* ----------------------------------------
   インラインThanksメッセージ
   ---------------------------------------- */
.apocomi-inline-thanks {
  text-align: center;
  padding: 60px 20px;
  animation: apocomi-fadeIn 0.5s ease;
}

@keyframes apocomi-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.apocomi-inline-thanks__icon {
  margin-bottom: 24px;
}

.apocomi-inline-thanks__icon svg {
  display: inline-block;
}

/* チェックマークの描画アニメーション */
.apocomi-checkmark-path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: apocomi-checkmark 0.6s ease 0.2s forwards;
}

@keyframes apocomi-checkmark {
  to {
    stroke-dashoffset: 0;
  }
}

.apocomi-inline-thanks__title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  line-height: 1.5;
}

.apocomi-inline-thanks__body {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 16px;
}

.apocomi-inline-thanks__note {
  color: #9ca3af;
  line-height: 1.6;
}

.apocomi-inline-thanks__note small {
  font-size: 13px;
}

/* ----------------------------------------
   SP対応
   ---------------------------------------- */
@media (max-width: 767px) {
  .apocomi-form__value-copy {
    font-size: 13px;
  }

  .apocomi-inline-thanks {
    padding: 40px 16px;
  }

  .apocomi-inline-thanks__title {
    font-size: 19px;
  }

  .apocomi-inline-thanks__body {
    font-size: 14px;
  }
}
