/* 修复登录界面密码字段显示问题 */

/* 确保有show-password类的表单显示密码字段 */
.signin-form.show-password .password {
    height: auto !important;
    position: relative;
}

.signin-form.show-password .password .form-textbox {
    height: auto !important;
}

.signin-form.show-password .password .form-textbox-input {
    height: auto !important;
    min-height: 47px;
}

/* 修复fed-auth类导致的密码字段隐藏问题 */
.signin-form.fed-auth.show-password .password {
    height: auto !important;
}

.signin-form.fed-auth.show-password .password .form-textbox {
    height: auto !important;
}

/* 确保密码输入框正常显示 */
.signin-form.show-password.password-entered .password {
    height: auto !important;
    opacity: 1;
    visibility: visible;
}

.signin-form.show-password.password-entered .password .form-textbox-input {
    height: auto !important;
    min-height: 47px;
    opacity: 1;
    visibility: visible;
}

/* 修复输入框标签位置和大小统一 */
.form-textbox-label {
    position: absolute;
    top: 18px;
    left: 18px;
    transition: all 0.2s ease;
    pointer-events: none;
    color: #86868b;
    font-size: 17px;
    font-weight: 400;
}

/* 输入框有内容或获得焦点时的标签样式 */
.form-textbox-input:focus ~ .form-textbox-label,
.form-textbox-input:not(:placeholder-shown) ~ .form-textbox-label,
.form-textbox-input.form-textbox-entered ~ .form-textbox-label {
    top: 6px;
    font-size: 12px;
    color: #86868b;
}

/* 确保账号和密码标签样式一致 */
.account-name .form-textbox-label,
.password .form-textbox-label {
    position: absolute;
    top: 18px;
    left: 18px;
    transition: all 0.2s ease;
    pointer-events: none;
    color: #86868b;
    font-size: 17px;
    font-weight: 400;
}

.account-name .form-textbox-input:focus ~ .form-textbox-label,
.account-name .form-textbox-input:not(:placeholder-shown) ~ .form-textbox-label,
.account-name .form-textbox-input.form-textbox-entered ~ .form-textbox-label,
.password .form-textbox-input:focus ~ .form-textbox-label,
.password .form-textbox-input:not(:placeholder-shown) ~ .form-textbox-label,
.password .form-textbox-input.form-textbox-entered ~ .form-textbox-label {
    top: 6px;
    font-size: 12px;
    color: #86868b;
}

/* 修复记住我选项样式 */
.si-remember-password {
    margin-top: 12px;
    margin-bottom: 20px;
}

.form-checkbox {
    position: relative;
    margin-bottom: 0 !important;
}

.form-checkbox .form-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #1d1d1f;
    cursor: pointer;
    padding-left: 26px;
    line-height: 1.4;
}

.form-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 16px;
    height: 16px;
    top: 2px;
    left: 0;
}

.form-checkbox-indicator {
    position: absolute;
    top: 2px;
    left: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #86868b;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.form-checkbox-input:checked ~ .form-label .form-checkbox-indicator {
    background-color: #0071e3;
    border-color: #0071e3;
}

.form-checkbox-input:checked ~ .form-label .form-checkbox-indicator:after {
    content: "✓";
    position: absolute;
    top: -1px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 强制显示登录按钮 - 最简单直接的方法 */

/* 强制显示按钮容器 */
.signin-v2__buttons-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 60px !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    position: static !important;
    overflow: visible !important;
}

/* 强制显示按钮包装器 */
.signin-v2__buttons-wrapper__button-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 50px !important;
    width: 100% !important;
    position: static !important;
}

/* 强制显示按钮内部div */
.signin-v2__buttons-wrapper__button-wrapper > div {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 50px !important;
    width: 85% !important;
    position: static !important;
}

/* 强制显示登录按钮本身 */
#sign-in,
.signin-v2__buttons-wrapper__button-wrapper__button {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 85% !important;
    height: 47px !important;
    min-height: 47px !important;
    max-height: none !important;
    background-color: #0071e3 !important;
    background: #0071e3 !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    padding: 12px 16px !important;
    text-align: center !important;
    line-height: normal !important;
    position: static !important;
    margin: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    transform: none !important;
    clip: none !important;
    clip-path: none !important;
}

/* 按钮hover效果 */
#sign-in:hover,
.signin-v2__buttons-wrapper__button-wrapper__button:hover {
    background-color: #0056b3 !important;
    background: #0056b3 !important;
}

/* 按钮文本 */
#sign-in span,
.signin-v2__buttons-wrapper__button-wrapper__button__text {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
    font-size: 17px !important;
    position: static !important;
}

/* 确保父容器不限制按钮显示 */
.signin-form,
.signin-content,
.signin-content-area {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
}

/* 修复标题居中问题 */
.si-container-title {
    text-align: center !important;
    margin: 0 auto !important;
    display: block !important;
}

.si-container-description {
    text-align: center !important;
    margin: 8px auto 24px auto !important;
    display: block !important;
}

/* 修复Apple账户标题和描述的居中 */
.signin h1,
.signin .si-container-title {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 8px auto !important;
}

.signin p,
.signin .si-container-description {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 24px auto !important;
}