/* static/css/06_pages/auth/login.css */
/*──────────────────────────────────────────────────────────────
  ログイン画面専用のスタイル
  Figmaデザインに基づいた実装
──────────────────────────────────────────────────────────────*/

/* 0. 画面外の余白にも背景色を設定 */
html {
  background: var(--login-bg-gradient);
  min-height: 100vh;
}

body {
  background: var(--login-bg-gradient);
  min-height: 100vh;
}

/* 1. ログイン画面の基本レイアウト */
.login-screen {
  width: var(--login-screen-width);
  height: var(--login-screen-height);
  background: var(--login-bg-gradient);
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--color-text-white);
  font-family: 'Hiragino Kaku Gothic Pro', 'Helvetica Neue', Arial, sans-serif;
}

/* 2. ステータスバー */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--status-bar-padding);
  height: var(--status-bar-height);
  background: transparent;
}

.status-left .time {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-black);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cellular-signal,
.wifi-signal,
.battery {
  width: 18px;
  height: 12px;
  background: var(--color-text-black);
  border-radius: 2px;
}

/* 3. ロゴセクション */
.logo-section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  margin-top: 60px;
}

.logo {
  width: var(--logo-width);
  height: var(--logo-height);
  object-fit: contain;
}

/* 4. フォームセクション */
.form-section {
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
  flex: 1;
  justify-content: center;
}

.form-section form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* 5. 入力フィールド */
.input-group {
  position: relative;
  border: 1px solid var(--color-border-white);
  border-radius: var(--input-border-radius);
  padding: var(--input-padding);
  background: transparent;
  display: flex;
  align-items: center;
  min-height: var(--input-min-height);
}

.input-group input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-white);
  font-size: var(--font-size-base);
  font-weight: 300;
  line-height: 1em;
  font-family: 'Hiragino Kaku Gothic Pro', 'Helvetica Neue', Arial, sans-serif;
}

.input-group input::placeholder {
  color: var(--color-text-white);
  opacity: 1;
}

/* パスワードフィールドの目のアイコン */
.password-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.password-group input {
  flex: 1;
}

.toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-password svg {
  width: 24px;
  height: 24px;
}

.eye-icon,
.eye-slash-icon {
  width: 24px;
  height: 24px;
}

/* 6. エラーメッセージ */
.error-message {
  color: var(--color-text-error);
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 300;
  line-height: 1.2;
  font-family: 'Hiragino Kaku Gothic Pro', 'Helvetica Neue', Arial, sans-serif;
  margin-bottom: 16px;
  padding: 0 16px;
}

.error-message ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.error-message li {
  margin: 0;
  padding: 0;
}

/* 7. パスワードを忘れた場合のリンク */
.forgot-password {
  align-self: center;
  margin-top: 8px;
  margin-bottom: 24px;
  text-align: center;
  width: 100%;
}

.forgot-password a {
  color: var(--color-text-white);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 300;
  line-height: 1.2;
  font-family: 'Hiragino Kaku Gothic Pro', 'Helvetica Neue', Arial, sans-serif;
}

/* 8. ログインボタン */
.login-btn {
  width: 100%;
  padding: var(--btn-padding);
  border: 1px solid var(--color-border-white);
  border-radius: var(--btn-border-radius);
  background: transparent;
  color: var(--color-text-white);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Hiragino Kaku Gothic Pro', 'Helvetica Neue', Arial, sans-serif;
  min-height: var(--btn-min-height);
  margin-bottom: 24px;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 9. ホームインジケーター */
.home-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--home-indicator-width);
  height: var(--home-indicator-height);
  background: var(--color-text-black);
  border-radius: 100px;
}

/* 10. レスポンシブ対応 */
@media (max-width: 393px) {
  .login-screen {
    width: 100%;
    max-width: var(--login-screen-width);
  }
  
  .form-section {
    padding: 0 16px;
  }
}

/* 11. アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
  .login-btn {
    transition: none;
  }
}

/* 12. フォーカス状態 */
.input-group input:focus {
  outline: none;
}

.login-btn:focus {
  outline: 2px solid var(--color-text-white);
  outline-offset: 2px;
}

/* 13. エラー状態 */
.input-group.error {
  border-color: var(--color-text-error);
}

.input-group.error input {
  color: var(--color-text-error);
}

/* 14. 成功状態 */
.input-group.success {
  border-color: var(--color-text-pink);
}

.input-group.success input {
  color: var(--color-text-white);
}
