/*
 * auth-and-header-cta.css
 *
 * 認証画面（パスワード表示切替・補助テキスト/リンク/チェックボックス視認性）と
 * ヘッダー右上「無料登録」ボタン（案 B: ミディアムティール・PC/スマホ常時表示）のスタイル。
 */

/* ---------------------------------------------------------------------------
 * パスワード表示切替（全パスワード入力欄共通・site.js でプログレッシブ付与）
 * --------------------------------------------------------------------------- */
.u-password-field {
    position: relative;
    display: block;
}

.u-password-field__input {
    padding-right: 48px !important;
}

.u-password-field__input::-ms-reveal,
.u-password-field__input::-ms-clear {
    display: none;
}

.u-password-field.is-invalid ~ .invalid-feedback {
    display: block;
}

.u-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #666666;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.u-password-toggle:hover {
    color: #222222;
    background-color: rgba(0, 0, 0, 0.04);
}

.u-password-toggle:focus {
    outline: none;
}

.u-password-toggle:focus-visible {
    outline: 2px solid #74b8af;
    outline-offset: -2px;
    color: #222222;
}

.u-password-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.u-password-toggle svg[hidden] {
    display: none;
}

/* ---------------------------------------------------------------------------
 * 認証画面（.u-auth-card）の補助テキスト・リンク・チェックボックス視認性改善
 * --------------------------------------------------------------------------- */
#login-form .g-mb-35 > .row {
    align-items: center;
}

.u-auth-card .u-check {
    color: #495057 !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

#login-form .u-check {
    white-space: nowrap;
}

.u-auth-card .u-check .u-check-icon-checkbox-v6 i {
    border-color: #767676 !important;
}

.u-auth-card .u-check input[type="checkbox"]:checked + .u-check-icon-checkbox-v6 i {
    background-color: #1f6f68 !important;
    border-color: #1f6f68 !important;
    color: #ffffff !important;
}

#login-form .text-sm-right a,
.u-auth-card .u-check a,
.u-auth-card .u-auth-link {
    color: #1f6f68 !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
}

#login-form .text-sm-right a {
    white-space: nowrap;
}

#login-form .text-sm-right a:hover,
#login-form .text-sm-right a:focus-visible,
.u-auth-card .u-check a:hover,
.u-auth-card .u-check a:focus-visible,
.u-auth-card .u-auth-link:hover,
.u-auth-card .u-auth-link:focus-visible {
    color: #15524d !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (min-width: 576px) {
    #login-form .g-mb-35 > .row {
        flex-wrap: wrap;
        row-gap: 4px;
        min-height: 44.78px;
    }

    #login-form .g-mb-35 > .row > .col-sm {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    #login-form .g-mb-35 > .row > .col-sm:first-child {
        padding-right: 6px;
    }

    #login-form .g-mb-35 > .row > .col-sm:last-child {
        padding-left: 6px;
    }
}

.u-auth-card footer p {
    color: #495057 !important;
    font-size: 14.5px;
    line-height: 1.55;
}

.u-auth-card footer a {
    color: #1f6f68 !important;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
}

.u-auth-card footer a:hover,
.u-auth-card footer a:focus-visible {
    color: #15524d !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * ヘッダー右上「無料登録」ボタン（案 B: ミディアムティール・PC / スマホ常時表示）
 * --------------------------------------------------------------------------- */
header#js-header .navbar-nav {
    align-items: center;
}

.u-header-signup-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #348e85;
    border: 1px solid #348e85;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14.5px;
    padding: 9px 18px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none !important;
    text-shadow: 0 1px 1px rgba(10, 60, 55, 0.2);
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

html[lang="ar"] .u-header-signup-cta {
    letter-spacing: normal;
}

.u-header-signup-cta:hover,
.u-header-signup-cta:active {
    background-color: #28766e;
    border-color: #28766e;
    color: #ffffff !important;
}

.u-header-signup-cta:focus {
    outline: none;
    box-shadow: none;
}

.u-header-signup-cta:focus-visible {
    outline: 2px solid #1f6f68;
    outline-offset: 2px;
}

/* モバイル幅（991.98px 以下）: ロゴ行に固定配置し、メニュー展開中も縦位置を変えない */
.u-header-signup-cta--mobile {
    display: inline-block;
    position: absolute;
    right: 62px;
    top: 7px;
    z-index: 2;
    font-size: 13px;
    padding: 6px 12px;
    max-width: calc(100% - 210px);
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 992px) {
    .u-header-signup-cta--mobile {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    header#js-header .navbar-brand {
        max-width: calc(100% - 205px);
        overflow: hidden;
    }

    header#js-header .navbar-brand .h2 {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .u-header-signup-cta--mobile {
        right: 58px;
        top: 5px;
        max-width: calc(100% - 212px);
    }
}
