﻿/* wwwroot/css/Account.css - 完全版 */

/* bodyの設定をリセット（共通レイアウトの邪魔をしないようにする） */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    /* 中央寄せの設定を削除 */
}

body#contents2 {
    margin: 0 !important;
    padding: 0 !important;
}

header {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.flexBlock {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.flexBlock li img {
    margin-left: 10px; /* ここでお好みの「左端からの距離」を調整してください */
}

/* ログイン画面のメイン部分だけを中央に寄せるための新しいクラス */
.account-page-wrapper {
    display: flex;
    justify-content: center; /* 横方向の中央寄せ */
    align-items: center; /* 縦方向の中央寄せ */
    width: 100%; /* 親要素（container）の幅いっぱいに広げる */
    min-height: 80vh; /* 画面の高さの80%を確保して上下中央に見せる */
    padding: 40px 0;
    box-sizing: border-box;
}

.account-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px; /* 少し角を丸くしてモダンに */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* 影を柔らかく */
    width: 90%; /* スマホ対応 */
    max-width: 400px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd0d5; /* より柔らかいグレー */
    border-radius: 6px;
    box-sizing: border-box;
}



/* 横並びの時のマージン調整（もし必要なら） */
.form-group input {
    margin-top: 4px;
}

/* Account.css の末尾に追加 */
.large-center-text {
    font-size: 2.2rem;
    font-weight: bold;
    color: #333;
    text-align: center;
}

@media (max-width: 576px) {
    .large-center-text {
        font-size: 1.8rem; /* スマホでは少し小さくしてはみ出し防止 */
    }
}

/* パスワード入力欄の特別な配置 */
.password-wrapper {
    position: relative;
    width: 100%; /* 親要素の幅いっぱいに広げる */
}

.password-wrapper input {
    width: 100%;
    padding: 12px;
    padding-right: 42px; /* アイコンが重ならないよう、右側の余白を少し広めに確保 */
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 12px; /* 右端からの距離 */
    top: 50%; /* 親要素の高さの50%の位置に配置 */
    transform: translateY(-45%); /* アイコン自身の高さの半分だけ上にずらすことで、完全に中央にする */

    cursor: pointer;
    color: #888;
    z-index: 10;
    /* アイコン自体の大きさを安定させるための追加設定 */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* inputと同じ高さにする */
    line-height: 0;
}

/* ログイン状態を保持するチェックボックス */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    cursor: pointer;
    color: #666;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0; /* 余計なマージンをリセット */
    cursor: pointer;
}

.form-check-label {
    margin: 0;
    line-height: 1; /* テキストの高さを調整 */
    cursor: pointer;
}

/* ログインボタン */
/*button[type="submit"] {
    width: 100%;
    padding: 14px;
    background-color: #4db6ac;*/ /* ロゴのグリーンに近い色 */
    /*color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.2s;*/ /* ホバー時の効果 */
/*}

button[type="submit"]:hover {
    background-color: #3d968e;*/ /* ホバー時は少し暗く */
/*}*/

/* 修正後：type="submit" だけでなく .btn-portal クラスにも当てる */
button[type="submit"],
.btn-portal {
    width: 100%;
    padding: 14px;
    background-color: #4db6ac;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    display: block; /* ボタンをブロック要素にする */
    text-align: center; /* 文字を中央に */
    text-decoration: none; /* aタグの場合の下線を消す */
    transition: background-color 0.2s;
    box-sizing: border-box;
}

    /* ホバー時のスタイルも同様に */
    button[type="submit"]:hover,
    .btn-portal:hover {
        background-color: #3d968e;
        color: #ffffff;
        text-decoration: none;
    }

/* エラーメッセージ（赤い文字）のスタイル */
.text-danger {
    color: #dc3545; /* 警告の赤色 */
    font-size: 0.85rem;
    margin-top: 5px;
    display: block; /* 改行して表示 */
    text-align: left;
}

/* エラーがある時の入力欄の枠線を赤くする（オプション） */
.input-validation-error {
    border-color: #dc3545 !important;
}

/* リンク集 */
.account-links {
    margin-top: 30px; /* ログインボタンとの間隔 */
    text-align: center; /* 中央寄せ */
    border-top: 1px solid #eee; /* 境界線を薄く入れると区切りが明確になります（任意） */
    padding-top: 20px;
}

.account-links div {
    margin-bottom: 15px; /* 各リンクブロックの上下間隔 */
}

.account-links a {
    font-size: 0.9rem; /* 標準(1rem)より少し小さくして補助情報感を出す */
    color: #4db6ac; /* ボタン色と合わせるのがおすすめ */
    transition: opacity 0.2s;
}

.account-links a:hover {
    opacity: 0.7; /* ホバー時に少し薄くして「押せる」感を出す */
}

.account-links span {
    font-size: 0.85rem; /* 「アカウントをお持ちでないですか？」の文字サイズ */
    color: #666; /* 少し薄めの色で補足情報らしく */
}

.text-decoration-none {
    text-decoration: none;
}

.fw-bold {
    font-weight: bold;
}

/* ローディングスピナーの強制表示 */
.spinner {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top: 2px solid #ffffff !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 無効化時の見た目を強制する */
button[type="submit"]:disabled {
    background-color: #a0d8d3 !important; /* 薄い色 */
    cursor: not-allowed !important;
    opacity: 0.8 !important;
}

/* レレスポンシブ対応（スマホ調整） */
@media (max-width: 576px) {
    .account-container {
        padding: 30px 20px;
    }
}
