/* ================================
   WooCommerce My Account 页面布局优化
================================ */

.woocommerce-account .u-column1,
.woocommerce-account .col-1 {
    max-width: 100%;
    margin: 0 auto;
    float: none !important;
    width: 100% !important;
}

/* 登录表单容器美化 */
.woocommerce-form-login {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* 页面标题居中 */
.woocommerce-account h2:first-of-type {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

/* ================================
   登录/注册切换标签
================================ */
.aliyun-sms-auth-wrapper {
    margin-bottom: 25px;
}

.aliyun-sms-auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.aliyun-sms-tab {
    flex: 1;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.aliyun-sms-tab:hover {
    color: #374151;
    background: #f3f4f6;
}

.aliyun-sms-tab.active {
    color: #7c3aed;
    background: #fff;
    border-bottom-color: #7c3aed;
}

.aliyun-sms-auth-notice {
    padding: 14px 18px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 0 10px 10px 0;
    color: #0369a1;
    font-size: 14px;
    line-height: 1.5;
}

/* ================================
   表单输入框统一样式
================================ */
.woocommerce-form-login .woocommerce-Input,
.aliyun-sms-auth-form .woocommerce-Input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.woocommerce-form-login .woocommerce-Input:focus,
.aliyun-sms-auth-form .woocommerce-Input:focus {
    border-color: #7c3aed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    outline: none;
}

.woocommerce-form-login label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.woocommerce-form-login .form-row {
    margin-bottom: 20px;
}

/* ================================
   验证码输入行
================================ */
.aliyun-sms-code-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.aliyun-sms-code-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.aliyun-sms-code-wrapper input {
    flex: 1;
    min-width: 0;
}

/* ================================
   发送验证码按钮
================================ */
.aliyun-sms-send-btn {
    flex-shrink: 0;
    min-width: 130px;
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.aliyun-sms-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.aliyun-sms-send-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.aliyun-sms-send-btn.countdown {
    background: #6b7280 !important;
}

/* ================================
   短信登录/注册表单
================================ */
.aliyun-sms-auth-form {
    padding-top: 5px;
}

.aliyun-sms-auth-form .form-row {
    margin-bottom: 20px;
}

.aliyun-sms-auth-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
}

.aliyun-sms-auth-message .success {
    color: #059669;
    font-size: 14px;
    font-weight: 500;
}

.aliyun-sms-auth-message .error {
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
}

.aliyun-sms-auth-submit {
    width: 100%;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.aliyun-sms-auth-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.aliyun-sms-auth-submit:disabled {
    background: #9ca3af !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ================================
   密码登录表单按钮美化
================================ */
.woocommerce-form-login button[type="submit"] {
    width: 100%;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.woocommerce-form-login button[type="submit"]:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(55, 65, 81, 0.3);
}

/* 记住我和忘记密码样式 */
.woocommerce-form-login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.woocommerce-form-login .woocommerce-LostPassword {
    text-align: center;
    margin-top: 20px;
}

.woocommerce-form-login .woocommerce-LostPassword a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-form-login .woocommerce-LostPassword a:hover {
    text-decoration: underline;
}

/* ================================
   响应式设计
================================ */
@media (max-width: 560px) {
    .woocommerce-form-login {
        padding: 25px 20px;
        margin: 0 15px;
        border-radius: 12px;
    }

    .aliyun-sms-code-wrapper {
        flex-direction: column;
    }

    .aliyun-sms-send-btn {
        min-width: 100%;
        margin-top: 10px;
    }

    .aliyun-sms-auth-tabs {
        flex-direction: row;
    }

    .aliyun-sms-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ================================
   加载动画
================================ */
.aliyun-sms-send-btn.loading {
    position: relative;
    color: transparent !important;
}

.aliyun-sms-send-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   验证码输入框样式
================================ */
input#sms_auth_code {
    letter-spacing: 6px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    padding: 14px 16px;
}

/* ================================
   手机号输入框样式
================================ */
input#sms_auth_phone {
    font-size: 16px;
    letter-spacing: 1px;
}

