/**
 * Radineer LP - フォームバリデーション用CSS
 * LPの既存デザインに合わせたスタイル
 *
 * 注意: リセットCSS（html.lp-2510 div）より詳細度を高くするため、
 * すべてのセレクタに .lp-2510 プレフィックスを付与しています
 */

/* ===================================
   エラーメッセージ表示（入力欄の直下）
   =================================== */
.lp-2510 .lp-2510-registration__error {
  display: none;
  font-size: 11px;
  line-height: 1;
}

.lp-2510 .lp-2510-registration__error .error-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-2510 .lp-2510-registration__error .error-text {
  color: #C53030;
  font-weight: 500;
}

/* エラー時の入力欄スタイル */
.lp-2510 .lp-2510-registration__form-field input.error {
  border-color: #E53E3E !important;
  background-color: #FFF5F5;
}

/* ===================================
   パスワード条件リストのチェックマーク（✅ブレット方式）
   =================================== */
/* 既存の緑色ブレット（li::before）を非表示 */
.lp-2510 .lp-2510-registration__password-conditions > li::before {
  content: none !important;
  display: none !important;
}

.lp-2510 .lp-2510-registration__password-conditions li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 0 !important;  /* 既存のpadding-inlineを上書き */
  transition: opacity 0.3s ease;
}

.lp-2510 .condition-icon {
  font-size: 12px;
  min-width: 14px;
  display: inline-block;
  text-align: left;
  transition: opacity 0.3s ease;
}

/* 条件未達成時は非表示（空文字） */
.lp-2510 .condition-icon:empty {
  opacity: 0;
}

/* ===================================
   レスポンシブ対応
   =================================== */
@media (max-width: 767px) {
  .lp-2510 .lp-2510-registration__error {
    font-size: 13px;
    padding: 6px 10px;
  }

  .lp-2510 .condition-icon {
    font-size: 14px;
  }
}

/* ===================================
   アニメーション
   =================================== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.lp-2510 .lp-2510-registration__form-field input.error {
  animation: shake 0.3s ease;
}

/* ===================================
   フォーカス時の強調表示
   =================================== */
.lp-2510 .lp-2510-registration__form-field input:focus {
  transition: all 0.2s ease;
}

/* 正常入力時の視覚的フィードバック（オプション） */
.lp-2510 .lp-2510-registration__form-field input:valid:not(:placeholder-shown) {
  border-color: #38A169;
}

/* ===================================
   パスワード表示・非表示トグルボタン
   =================================== */
.lp-2510 .lp-2510-registration__password-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.lp-2510 .lp-2510-registration__password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  transition: color 0.2s ease;
  z-index: 1;
}

.lp-2510 .lp-2510-registration__password-toggle:hover {
  color: #2D3748;
}

.lp-2510 .lp-2510-registration__password-toggle:focus {
  outline: 2px solid #4299E1;
  outline-offset: 2px;
  border-radius: 4px;
}

.lp-2510 .lp-2510-registration__password-toggle i {
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

/* パスワードフィールドの右側にpaddingを追加してボタンと重ならないようにする */
.lp-2510 .lp-2510-registration__password-wrapper input[type="password"],
.lp-2510 .lp-2510-registration__password-wrapper input[type="text"] {
  padding-right: 45px !important;
}

@media (max-width: 767px) {
  .lp-2510 .lp-2510-registration__password-toggle {
    right: 10px;
    padding: 6px;
  }

  .lp-2510 .lp-2510-registration__password-toggle i {
    font-size: 16px;
  }
}
