@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

.password-reset-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: #f5f3f2;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
}
.password-reset-header {
    display: flex;
    align-items: center;
    height: 96px;
    padding: 0 clamp(24px, 5.5vw, 52px);
    box-sizing: border-box;
    background: #fff;
}

.password-reset-header img {
    display: block;
    width: 125px;
    height: auto;
}

.password-reset-main {
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    flex: 1 0 auto;
    min-height: 0;
    padding: 104px 16px;
}

.password-reset-main.password-reset-request-main {
    align-items: flex-start;
    padding: 104px 16px 48px;
}

.password-reset-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    height: 662px;
    padding: 40px;
    border-radius: 8px;
    background: #fff;
}

.password-reset-card:has(.password-reset-error:not(.hidden)),
.password-reset-card:has(.password-reset-field-error:not([hidden])),
.password-reset-card:has(.password-reset-captcha) {
    height: auto;
    min-height: 662px;
}

.password-reset-card.password-reset-request-card {
    max-width: 480px;
    height: auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: none;
}

.password-reset-complete-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 480px;
    max-width: 100%;
    min-height: 202px;
    padding: 40px;
    gap: 40px;
    border-radius: 8px;
    background: #fff;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
}

.password-reset-complete-card h1,
.password-reset-complete-card p,
.password-reset-complete-card a {
    margin: 0;
}

.password-reset-complete-card h1 {
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0;
    text-align: center;
}

.password-reset-complete-card p {
    align-self: stretch;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
}

.password-reset-complete-card a {
    color: #4da31f;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
}

.password-reset-complete-card a:hover {
    text-decoration: underline;
}

.password-reset-complete-card a:focus-visible {
    outline: none;
}

.password-reset-request-form h1 {
    margin: 0 0 40px;
    color: #333333;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.password-reset-request-copy {
    margin: 0 0 40px;
    color: #333333;
    font-size: 16px;
    line-height: 24px;
}

.password-reset-request-field label {
    display: block;
    margin: 0 0 8px;
    color: #333333;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.password-reset-request-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    background: #fff;
    color: #333333;
    font: inherit;
    font-size: 16px;
    line-height: 24px;
}

.password-reset-request-input:focus {
    border-color: #4da31f;
    outline: none;
}

.password-reset-request-input.has-error {
    border-color: #C7233B;
}

.password-reset-request-input.has-error:focus {
    border-color: #C7233B;
    outline: none;
}

.password-reset-request-field-error {
    margin: 8px 0 0;
    color: #C7233B;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
}

.password-reset-request-field-error[hidden] {
    display: none;
}

.password-reset-request-captcha {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.password-reset-request-captcha[hidden] {
    display: none;
}

.password-reset-request-form .password-reset-request-captcha {
    margin-top: 24px;
}

.password-reset-request-form .password-reset-request-captcha:has(> div:empty) {
    display: none;
}

.password-reset-request-form .password-reset-request-submit {
    height: 48px;
    min-height: 48px;
    margin-top: 24px;
    background: #4da31f;
    font-size: 18px;
    line-height: 28px;
}

.password-reset-request-submit:hover:not(:disabled) {
    background: #438f1b;
}

.password-reset-request-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.password-reset-form h1 {
    margin: 0 0 40px;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0;
    text-align: center;
}

.password-reset-intro {
    margin: 0 0 40px;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
}

.password-reset-intro:has(+ .password-reset-error:not(.hidden)) {
    margin-bottom: 24px;
}

.password-reset-error {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 24px;
    padding: 10px 12px;
    border: 1px solid #c7233b;
    border-radius: 4px;
    background: #f9e7e9;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
}

.password-reset-error.hidden {
    display: none;
}

.password-reset-error svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: #c7233b;
}

.password-reset-error span {
    min-width: 0;
}

.password-reset-field + .password-reset-field {
    margin-top: 22px;
}

.password-reset-field label {
    display: block;
    margin: 0 0 8px;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
}

.password-reset-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d4d4d4;
    border-radius: 5px;
    background: #fff;
    color: #333333;
    font: inherit;
    font-size: 16px;
    line-height: 24px;
}

.password-reset-input:focus {
    border-color: #4da31f;
    outline: none;
}

.password-reset-input.has-error {
    border-color: #c7233b;
}

.password-reset-input.has-error:focus {
    border-color: #c7233b;
    outline: none;
}

.password-reset-password-input {
    padding-right: 48px;
    border-color: #d6d6d6;
    border-radius: 4px;
    outline: none;
    transition: border-color 120ms ease;
}

.password-reset-input.password-reset-password-input--masked {
    overflow: hidden;
    color: transparent;
    caret-color: transparent;
    -webkit-text-fill-color: transparent;
}

.password-reset-password-mask {
    position: absolute;
    top: 0;
    right: 48px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    overflow: hidden;
    pointer-events: none;
}

.password-reset-password-mask[hidden] {
    display: none;
}

.password-reset-password-mask__dot {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333333;
}

.password-reset-password-mask__caret {
    position: absolute;
    top: 10px;
    left: max(1px, calc(var(--caret-index) * 20px - 2px));
    width: 1px;
    height: 20px;
    background: #333333;
    animation: password-reset-password-mask-caret-blink 1s step-end infinite;
}

@keyframes password-reset-password-mask-caret-blink {
    50% {
        opacity: 0;
    }
}

.password-reset-password-input:focus {
    border-color: #4da31f;
    outline: none;
}

.password-reset-password-input.has-error,
.password-reset-password-input.has-error:focus {
    border-color: #c7233b;
}

.password-reset-visibility {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 48px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b9b9b9;
    cursor: pointer;
}

.password-reset-visibility:hover {
    color: #555;
}

.password-reset-visibility:focus {
    outline: none;
}

.password-reset-submit:focus,
.password-reset-resend:focus,
.password-reset-back-link:focus {
    outline: none;
}

.password-reset-eye-icon {
    display: block;
    width: 16px;
    height: auto;
}

.password-reset-eye-icon--hidden {
    display: none;
}

.password-reset-field-error {
    margin: 8px 0 0;
    color: #c7233b;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
}

.password-reset-field-error[hidden] {
    display: none;
}

.password-reset-submit,
.password-reset-resend {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
    cursor: pointer;
}

.password-reset-submit {
    margin-top: 24px;
    background: #4da31f;
}

.password-reset-submit:hover {
    background: #438f1b;
}

.password-reset-resend {
    margin-top: 16px;
    border: 1px solid #4da31f;
    background: #fff;
    color: #4da31f;
}

.password-reset-resend:hover:not(:disabled) {
    background: #f1f8ed;
}

.password-reset-resend:disabled {
    border-color: #bbbbbb;
    background: #bbbbbb;
    color: #ffffff;
    cursor: not-allowed;
}

.password-reset-back-link {
    display: block;
    margin-top: 24px;
    color: #4da31f;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    height: auto;
}

.password-reset-back-link:hover {
    text-decoration: underline;
}

.password-reset-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 767px) {
    .password-reset-header {
        height: 76px;
        padding: 0 20px;
    }

    .password-reset-header img {
        width: 112px;
    }

    .password-reset-main {
        align-items: flex-start;
        padding: 24px 16px 32px;
    }

    .password-reset-main.password-reset-request-main {
        padding: 40px 16px 32px;
    }

    .password-reset-main.password-reset-complete-main {
        align-items: center;
        padding: 24px 16px;
    }

    .password-reset-card {
        padding: 24px;
        border-radius: 8px;
    }

    .password-reset-complete-card {
        width: 327px;
        min-height: 151px;
        padding: 24px;
        gap: 24px;
    }

    .password-reset-complete-card h1 {
        font-size: 20px;
        line-height: 28px;
    }

    .password-reset-complete-card p {
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-complete-card a {
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-card:not(.password-reset-request-card) {
        width: 327px;
        max-width: 100%;
        height: 597px;
    }

    .password-reset-card:not(.password-reset-request-card):has(.password-reset-error:not(.hidden)),
    .password-reset-card:not(.password-reset-request-card):has(.password-reset-field-error:not([hidden])),
    .password-reset-card:not(.password-reset-request-card):has(.password-reset-captcha) {
        height: auto;
        min-height: 597px;
    }

    .password-reset-form h1 {
        margin-bottom: 24px;
        font-size: 20px;
        line-height: 28px;
    }

    .password-reset-card.password-reset-request-card {
        padding: 30px 24px 32px;
    }

    .password-reset-request-form h1 {
        margin-bottom: 24px;
        font-family: "Noto Sans JP", sans-serif;
        font-size: 20px;
        font-style: normal;
        font-weight: 700;
        line-height: 28px;
        letter-spacing: 0;
        text-align: center;
    }

    .password-reset-request-copy {
        margin-bottom: 24px;
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-request-field label {
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-input,
    .password-reset-request-input {
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-request-field-error {
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-request-form .password-reset-request-submit {
        min-height: 48px;
        font-size: 16px;
        line-height: 24px;
    }

    .password-reset-intro {
        margin-bottom: 24px;
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-error,
    .password-reset-field-error {
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-error {
        padding: 16px;
    }

    .password-reset-field + .password-reset-field {
        margin-top: 20px;
    }

    .password-reset-field label {
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 20px;
    }

    .password-reset-submit,
    .password-reset-resend {
        height: 48px;
        font-size: 16px;
        line-height: 24px;
    }

    .password-reset-submit {
        margin-top: 24px;
    }

    .password-reset-resend {
        margin-top: 16px;
    }

    .password-reset-back-link {
        font-size: 14px;
        line-height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .password-reset-password-mask__caret {
        animation: none;
    }
}

@media (max-width: 360px) {
    .password-reset-card.password-reset-request-card {
        padding-right: 20px;
        padding-left: 20px;
    }

    .password-reset-request-captcha .g-recaptcha {
        transform: scale(.88);
        transform-origin: top center;
        margin-bottom: -9px;
    }
}
