/*
    create.css のスタイルをベースに修正したよ！
    form-text, form-textarea, input-and-error-wrapper, error-message のスタイルを統一したよん！
*/

.main-content {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

.register {
    align-items: center;
    align-self: center;
    color: var(--text-label);
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 800px;
    text-align: left;
}

.page-title {
    align-self: stretch;
    font-size: 32px;
    margin: 0;
    padding-bottom: 2.75rem;
}

.form-text {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 2rem; /* 各行の下の余白 */
    flex-wrap: wrap;
}

.form-text label {
    width: 15rem; /* ラベルの固定幅 */
    flex-shrink: 0;
    height: auto;
    padding-top: 0.7rem;
    color: var(--Text-Label, #222);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
}

.input-and-error-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.input-and-error-wrapper input {
    width: 100%;
    height: 44px;
    padding: 1rem;
    border: 1px solid var(--Gray-20, #DDD);
    border-radius: 0.25rem;
    background: var(--Gray-0, #FFF);
    font-size: 16px;
    box-sizing: border-box;
}

.optional-input-annotation {
    color: var(--Text-Sub2, #999);
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    margin-left: 1rem;
}

.input-restriction-annotation {
    color: var(--Text-Sub2, #999);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: "Noto Sans JP";
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 0.75rem;
    margin-top: 0.75rem;
}

.sub-title {
    color: var(--Text-Label, #222);
    text-align: left;
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.25rem;
    padding-top: 0.5rem;
    margin-bottom: 1rem;
}

.terms-of-use-frame {
    display: flex;
    padding: 1.25rem 1rem;
    align-items: flex-start;
    gap: 0.625rem;
    align-self: stretch;
    border-radius: 0.25rem;
    border: 1px solid var(--Gray-20, #DDD);
    background: var(--Gray-0, #FFF);
}

.terms-of-use {
    width: 47.75rem;
    max-width: 100%;
    color: var(--Text-Sub, #666);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: "Noto Sans JP";
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.05rem;
    margin: -0.3rem 0 0 0;
}

.link-to-privacy-policy {
    display: flex;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.link-to-privacy-policy a {
    color: #3390DC;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 0.875rem;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.form-checkbox {
    align-items: center;
    display: flex;
    font-size: 14px;
    margin-bottom: 2.5rem;
    text-align: left;
    flex-wrap: wrap; /* ラベルとエラーメッセージが折り返すように！ */
}

.form-checkbox label {
    cursor: pointer;
    color: var(--Text-Main, #333);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: "Noto Sans JP";
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 0.875rem;
    margin-left: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
    cursor: pointer;
    height: 1.5rem;
    width: 1.5rem;
}

.button-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    text-align: center;
}

.button-wrapper .button-primary,
.button-wrapper .button-secondary {
    width: 100%;
    max-width: 600px;
}

.error-message {
    color: #e3342f; /* 赤色！ */
    font-size: 0.85rem; /* 小さめの文字サイズ */
    margin-top: 0.25rem; /* テキストボックスとの隙間 */
    text-align: left; /* 左寄せ */
    width: 100%; /* 親 (input-and-error-wrapper) の幅いっぱいに広がる */
    display: block; /* spanだけど block にして、新しい行に表示！ */
    box-sizing: border-box; /* padding や border があっても幅にはみ出さないように */
}

.privacy-policy-agreement-error {
    margin-top: 0.5rem;
    margin-left: 2.25rem; /* チェックボックスの幅と余白を考慮して調整 */
}

hr {
    background-color: #EEEEEE;
    border-top: none;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media screen and (max-width: 900px) {
    .main-content {
        width: 100%;
        padding: 0 var(--padding-xl);
        box-sizing: border-box;
    }

    .input-and-error-wrapper input,
    .input-and-error-wrapper textarea {
        width: 100%;
    }

    .register {
        width: 100%;
        max-width: 100%;
    }

    .form-text {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .form-text label {
        width: 100%;
        padding-top: 0;
    }

    .input-and-error-wrapper {
        width: 100%;
    }

    .optional-input-annotation {
        margin-left: 0;
    }

    .terms-of-use-frame {
        flex-direction: column;
        gap: 0.75rem;
    }

    .terms-of-use {
        width: 100%;
    }

    .form-checkbox {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .form-checkbox input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }

    .form-checkbox label {
        margin-left: 0;
    }

    .link-to-privacy-policy {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .button-wrapper .button-primary,
    .button-wrapper .button-secondary {
        max-width: 100%;
    }

    .privacy-policy-agreement-error {
        margin-left: 0;
    }
}
