/*
ENTAG ACCOUNT の画面。
見た目（色・丸み・ヘッダー・フッター・カード・ボタン・お知らせ）は、ENTAG 共通（FRAME の entag_common/1.0/_css/entag_base.css・entag_service.css）。
ここには、ACCOUNT 固有の配置だけを書く。色は変数（--ec-*）で。
*/

#account-site {

    /* 中央のカード（1画面に1枚） */
    > main > .account-card {
        width: min(100% - 32px, 440px);
        margin: 40px auto;

        h1 {
            font-size: 1.3em;
            font-weight: 500;
            letter-spacing: 0.08em;
            text-align: center;
        }
    }

    /* FRAME の p は両端揃え。カードの中は左揃えにする（:where で優先度を下げ、下の中央揃え・右揃えが効くようにする） */
    :where(.account-card) :where(p) {
        text-align: left;
    }

    /* 入力欄は項目名の下に、幅いっぱい */
    .et-form {
        dl > div {
            flex-direction: column;
            align-items: stretch;
            gap: 6px;

            > dt {
                width: 100%;
                padding: 0;
                font-size: 0.9em;
            }
        }

        dl > div:not(:first-of-type) {
            margin-top: 16px;
        }

        dd :is(input:not([type="checkbox"], [type="radio"]), .et-form-button-wrap) {
            width: 100%;
            max-width: none;
            min-width: 0;
        }

        /* パスワードの表示切り替えが付いた欄（entag.js が .et-form-button-wrap で包む）。FRAME は幅を半分にするので戻す */
        dd .et-form-button-wrap {
            flex: 1 1 100%;
        }

        dd .et-form-button-wrap input {
            width: 0;
            flex: 1;
        }
    }

    /* ボタン（.buttons > button、または .button）。カードの中では幅いっぱいに縦に並べる */
    .buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }

    .buttons > button,
    .button {
        width: 100%;

        svg {
            width: 18px;
            height: 18px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
    }

    /* Googleのボタン：色と文字は、Googleのブランドガイドライン（Light）。線だけは、パスキーのボタン（button-secondary）に合わせる */
    a.button-google {
        background: var(--account-google-bg);
        color: var(--account-google-text);
        border-color: var(--ec-line-strong);

        &:hover {
            background: var(--account-google-bg-hover);
            border-color: var(--ec-pink);
            color: var(--account-google-text);
        }

        img {
            width: 20px;
            height: 20px;
        }
    }

    .account-or {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 24px;
        font-size: 0.85em;
        color: var(--ec-text-faint);

        &::before,
        &::after {
            content: "";
            flex: 1;
            border-top: 1px solid var(--ec-line);
        }

        + .buttons {
            margin-top: 16px;
        }
    }

    .account-sub-link {
        margin-top: 12px;
        font-size: 0.85em;
        text-align: right;
    }

    /* カードの下のリンク（新規登録・戻るなど） */
    .account-links {
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--ec-line);
        font-size: 0.9em;
        text-align: center;

        li + li {
            margin-top: 6px;
        }
    }

    .account-sub-link a,
    .account-links a {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    /* ログインしている人（丸いアイコンと名前） */
    .account-profile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-top: 24px;
        text-align: center;
        overflow-wrap: anywhere;

        img {
            width: 80px;
            height: 80px;
            margin-bottom: 8px;
            border: 1px solid var(--ec-line);
            border-radius: 50%;
            object-fit: cover;
        }

        strong {
            max-width: 100%;
            font-size: 1.1em;
            line-height: 1.5;
        }

        span {
            max-width: 100%;
            font-size: 0.85em;
            line-height: 1.5;
            color: var(--ec-text-sub);
        }
    }

    /* 項目の表示（登録済みのカード） */
    .account-info {
        margin-top: 20px;
        padding: 14px 16px;
        border: 1px solid var(--ec-line);
        border-radius: var(--ec-radius-field);
        text-align: center;

        strong {
            display: block;
            font-size: 1.15em;
        }

        span {
            font-size: 0.85em;
            color: var(--ec-text-sub);
        }
    }

    .account-card > .ec-note {
        margin-top: 16px;
    }
}
