/* SP Magic Login — Shopify-style layout */
body.woocommerce-account:not(.logged-in) {
    background-color: #F6F6F6 !important;
}
body.woocommerce-account:not(.logged-in) #masthead,
body.woocommerce-account:not(.logged-in) #colophon,
body.woocommerce-account:not(.logged-in) .elementor-element-7896f7c {
    display: none !important;
}
/* 让模块以视口为中心（放开 Elementor 外层容器的收窄） */
body.woocommerce-account:not(.logged-in) .elementor-element-ca9679f {
    max-width: 100% !important;
    width: 100% !important;
}
.sp-ml-page {
    max-width: 389px;
    margin: 0 auto;
    padding: 72px 20px 60px;
    font-family: 'Literata', Georgia, serif;
    color: #111111;
}
.sp-ml-brand-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 36px;
}
.sp-ml-brand {
    margin: 0;
    text-align: center;
    font-family: 'Literata', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
    color: #111111;
    letter-spacing: 0.2px;
}
.sp-ml-back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(calc(-50% + 5px));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #111111;
    opacity: 0.55;
    border-radius: 50%;
    transition: opacity .15s ease, background-color .15s ease;
}
.sp-ml-back:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}
.sp-magic-login {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 28px 28px 30px;
}
.sp-ml-step {
    display: flex;
    flex-direction: column;
}
.sp-ml-step[hidden] {
    display: none !important;
}
.sp-ml-title {
    margin: 0 0 6px !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    color: #111111 !important;
    font-family: 'Literata', Georgia, serif !important;
}
.sp-ml-sub {
    margin: 0 0 20px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 18.9px !important;
    color: rgba(0, 0, 0, 0.56) !important;
    font-family: 'Literata', Georgia, serif !important;
}
/* Google 按钮：容器撑满即可，iframe 由 Google 自己渲染宽度（不要覆盖，否则右边框被负 margin 裁掉） */
.sp-ml-google {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    overflow: visible !important;
}
/* GSI iframe：解除主题全局 iframe{max-width:100%} 压制（否则 389px 按钮被压成容器宽，未登录长文案右侧被裁、竖线消失） */
.sp-ml-google iframe {
    max-width: none !important;
}
.sp-ml-or {
    margin: 0 0 18px;
    text-align: center;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.56);
}
.sp-ml-field {
    position: relative;
    margin: 0 0 18px;
}
.sp-ml-input {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    font-family: 'Literata', Georgia, serif !important;
    font-size: 15px !important;
    color: #1F1B16 !important;
    background: #FFFFFF !important;
    border: 1px solid #D9D9D9 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.sp-ml-input::placeholder {
    color: rgba(0, 0, 0, 0.35);
    opacity: 1;
}
.sp-ml-input:focus {
    outline: none !important;
    border-color: #1F1B16 !important;
    box-shadow: none !important;
}
.sp-ml-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 14px;
    color: #111111;
    cursor: pointer;
}
.sp-ml-consent input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
}
.sp-ml-terms {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 16.2px;
    color: rgba(0, 0, 0, 0.56);
    text-align: center;
}
.sp-ml-terms a {
    color: #005BDF;
    text-decoration: none;
}
.sp-ml-terms a:hover {
    text-decoration: underline;
}
/* 主按钮：全宽，用 !important 抵抗主题/Elementor 的 button 覆盖 */
.sp-magic-login .sp-ml-btn,
.sp-magic-login button.sp-ml-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 20px !important;
    margin: 0 0 18px !important;
    box-sizing: border-box !important;
    background: #111111 !important;
    color: #FFFFFF !important;
    border: 1px solid #111111 !important;
    border-radius: 8px !important;
    font-family: 'Literata', Georgia, serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
}
.sp-magic-login .sp-ml-btn:hover {
    opacity: 0.85 !important;
    background: #111111 !important;
    color: #FFFFFF !important;
}
.sp-magic-login .sp-ml-btn:disabled {
    opacity: 0.5 !important;
    cursor: default !important;
}
/* 6-digit code */
.sp-ml-code-label {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 18.9px;
    color: rgba(0, 0, 0, 0.56);
    text-align: center;
}
.sp-ml-email-show {
    color: #111111;
}
.sp-ml-otp {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 0 0 4px;
}
.sp-ml-otp-box {
    width: 44px !important;
    height: 50px !important;
    max-width: 44px !important;
    flex: 0 0 44px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    font-family: 'Literata', Georgia, serif !important;
    font-size: 20px !important;
    color: #111111 !important;
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sp-ml-otp-box:focus {
    outline: none !important;
    border-color: #111111 !important;
    box-shadow: none !important;
}
.sp-ml-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
}
.sp-ml-link {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Literata', Georgia, serif;
    font-size: 13px;
    color: #005BDF;
    text-decoration: none;
    cursor: pointer;
}
.sp-ml-link:hover {
    text-decoration: underline;
}
.sp-ml-msg {
    min-height: 18px;
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 18px;
    color: rgba(0, 0, 0, 0.56);
}
.sp-ml-msg.is-error {
    color: #C0392B;
}
.sp-ml-privacy {
    margin: 24px 0 0;
    text-align: center;
    font-size: 14px;
}
.sp-ml-privacy a {
    color: #005BDF;
    text-decoration: none;
}
.sp-ml-privacy a:hover {
    text-decoration: underline;
}
