/* ==========================================================================
   共通コンポーネントスタイル (BEM)
   Block: page-layout, brand-logo, info-box, password-field,
          form-helper, form-error, btn-submit, nav-links, site-footer
   ========================================================================== */

/* ------------------------------------
   Colors
   ------------------------------------ */
:root {
  --color-primary: #407cf8;
  --color-primary-hover: #3060d0;
  --color-brand-green: #2e8b57;
  --color-brand-blue: #1a4c8a;
  --color-border-accent: #4a7abf;
  --color-error: #e53935;
  --color-muted: #888;
  --color-white: #fff;
}

/* ------------------------------------
   Block: page-layout
   モバイル向け単カラムページレイアウト
   ------------------------------------ */
.page-layout {
  background-color: var(--color-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-layout__body {
  max-width: 480px;
  flex: 1;
}

/* ------------------------------------
   Block: brand-logo
   「はたLuck」ブランドロゴ
   ------------------------------------ */
.brand-logo {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
  position: static;
  display: flex;
  align-items: center;
  height: 48px;
  margin: 16px 0;
  text-align: left;
}

.brand-logo__text {
  font-size: 1.75rem;
  font-weight: bold;
  font-style: italic;
}

.brand-logo__text--green {
  color: var(--color-brand-green);
}

.brand-logo__text--blue {
  color: var(--color-brand-blue);
}

/* ------------------------------------
   Block: info-box
   枠付き情報パネル
   ------------------------------------ */
.info-box {
  border: 2px solid var(--color-border-accent);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.info-box__title {
  font-weight: bold;
  font-size: 0.95rem;
}

.info-box__list {
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ------------------------------------
   Block: password-field
   パスワード入力（表示トグル付き）
   ------------------------------------ */
.password-field {
  position: relative;
}

.password-field__input {
  padding-right: 40px;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--color-muted);
}

.password-field__toggle:hover {
  color: #555;
}

.password-field__icon--show {
  display: none;
}

.password-field--visible .password-field__icon--hide {
  display: none;
}

.password-field--visible .password-field__icon--show {
  display: inline;
}

/* ------------------------------------
   Block: code-input
   認証コード入力（1文字ずつ分割入力）
   ------------------------------------ */
.code-input {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.code-input__field {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: bold;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  outline: none;
}

.code-input__field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(64, 124, 248, 0.2);
}

/* ------------------------------------
   Block: form-helper
   フォーム補助テキスト
   ------------------------------------ */
.form-helper {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

/* ------------------------------------
   Block: form-error
   フォームエラーテキスト
   ------------------------------------ */
.form-error {
  font-size: 0.85rem;
  color: var(--color-error);
  margin-bottom: 1rem;
}

/* ------------------------------------
   Block: form-alert
   フォーム送信後のエラーレスポンス表示
   ------------------------------------ */
.form-alert {
  font-size: 0.85rem;
  color: var(--color-error);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ------------------------------------
   Block: btn-submit
   プライマリアクションボタン
   ------------------------------------ */
.btn-submit {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  width: 100%;
  padding: 0.5rem;
}

.btn-submit:hover,
.btn-submit:active {
  background-color: var(--color-primary-hover);
  color: var(--color-white);
}

.btn-submit:disabled,
.btn-submit--disabled {
  background-color: #d0d0d0;
  color: var(--color-muted);
  cursor: not-allowed;
}

.btn-submit--outline {
  background-color: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-submit--outline:hover,
.btn-submit--outline:active {
  background-color: #eef3ff;
  color: var(--color-primary);
}

/* ------------------------------------
   Block: btn-group
   ボタン横並びレイアウト
   ------------------------------------ */
.btn-group {
  display: flex;
  gap: 0.75rem;
}

.btn-group .btn-submit {
  flex: 1;
}

/* ------------------------------------
   Block: nav-links
   中央揃えナビゲーションリンク
   ------------------------------------ */
.nav-links {
  text-align: center;
  margin-top: 1rem;
}

.nav-links__item {
  display: block;
  margin-bottom: 0.625rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
}

.nav-links__item:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.nav-links__item--disabled {
  color: var(--color-muted);
  pointer-events: none;
  cursor: default;
}

.nav-links__external-icon {
  font-size: 1rem;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* ------------------------------------
   Block: content-section
   見出し＋説明リスト＋アクションボタンのセクション
   ------------------------------------ */
.content-section {
  margin-bottom: 1.5rem;
}

.content-section__heading {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.content-section__list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #333;
}

.content-section__list-item {
  margin-bottom: 0.25rem;
}

.content-section__action {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}

.content-section__action:hover,
.content-section__action:active {
  background-color: var(--color-primary-hover);
  color: var(--color-white);
}

.content-section__action--danger {
  background-color: #dc3545;
}

.content-section__action--danger:hover,
.content-section__action--danger:active {
  background-color: #b02a37;
  color: var(--color-white);
}

/* ------------------------------------
   Block: scrollable-box
   スクロール可能なコンテンツ領域（規約など）
   ------------------------------------ */
.scrollable-box {
  margin-bottom: 1.5rem;
}

.scrollable-box__heading {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.scrollable-box__content {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--color-border-accent);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #333;
}

/* ------------------------------------
   Block: status-message
   完了・エラー等のステータス表示（アイコン＋メッセージ）
   ------------------------------------ */
.status-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.status-message__text {
  font-size: 1.15rem;
  font-weight: bold;
  text-align: center;
}

.status-message__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin-bottom: 1.5rem;
}

.status-message__icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-message__icon-circle--success {
  background-color: #6dd400;
}

.status-message__icon-circle--error {
  background-color: var(--color-error);
}

/* ------------------------------------
   Block: completion-page
   完了ページレイアウト（タイトル・アイコン・ボタン等を等間隔に配置）
   ------------------------------------ */
.completion-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 200px);
}

.completion-page__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-evenly;
}

.completion-page__icon {
  display: flex;
  justify-content: center;
}

/* ------------------------------------
   Block: site-footer
   サイトフッター（著作権表示）
   ------------------------------------ */
.site-footer {
  text-align: center;
  padding: 1rem 0;
  color: var(--color-muted);
  font-size: 0.8rem;
}