/* CGOO Login Page 1.0.7 - logged-out My Account redesign.
   Matches the login design: My account title, social buttons, email login,
   teal Log in button, create-account link. Login form fields and behaviour
   are untouched; this is presentation only.
   1.0.7: exact edge alignment with the buttons row (fixes 1.0.6, which
   left the form 9px/14px off and the divider full width). The form block
   and divider now use an explicit 804px width (not just max-width) with
   auto margins, border-box and zero horizontal padding, and the form-row
   <p> wrappers lose their side padding so the inputs are the full 804px
   like the buttons row. Desktop only; mobile stays full width. */

/* Narrow centred column for the login page (both themes). Phase-2 P2:
   scoped to phones (max-width 760px) so the breakpoint is explicit;
   desktop uses the 804px rule below instead. */
@media (max-width: 760px) {
    body.woocommerce-account .woocommerce {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Hide the default Login / Register headings; the design uses its own title. */
body.woocommerce-account #customer_login h2 {
    display: none;
}

/* The two-column login/register layout becomes a single column. */
body.woocommerce-account #customer_login {
    display: block;
}
body.woocommerce-account #customer_login .u-column1,
body.woocommerce-account #customer_login .u-column2 {
    width: 100%;
    float: none;
    max-width: 100%;
}

/* Register column is hidden until "Create an account" is tapped. */
body.woocommerce-account #customer_login .u-column2.cgoo-login-hidden {
    display: none;
}

/* Page title: My account, centred. */
body.woocommerce-account main h1 {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
}

/* Subtitle injected by JS. */
.cgoo-login-sub {
    font-size: 15px;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 20px;
    text-align: left;
}
html.cgoo-dark .cgoo-login-sub {
    color: #94a3b8;
}

/* Social buttons (Nextend): full width, dark, rounded, white text.
   ONE ROW: the three buttons sit side by side, equal width, even 12px
   gaps. Labels are shortened to the provider name by JS (Facebook / Google
   / X) so they fit a third-width button. Icon + short text, centred. */
body.woocommerce-account .nsl-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 4px;
    height: auto !important;
    min-height: 0 !important;
}
body.woocommerce-account .nsl-container .nsl-container-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    align-content: flex-start !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    min-height: 0 !important;
}
body.woocommerce-account .nsl-container .nsl-container-buttons > a {
    display: block !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}
body.woocommerce-account .nsl-container .nsl-button {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 12px !important;
    padding: 12px 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    justify-content: center !important;
    gap: 8px !important;
    border: 1px solid #334155 !important;
    white-space: nowrap !important;
}
html.cgoo-dark body.woocommerce-account .nsl-container .nsl-button {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}
html:not(.cgoo-dark) body.woocommerce-account .nsl-container .nsl-button {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}
/* Round icon chip inside each social button (smaller in the one-row layout
   so the short label has room). */
body.woocommerce-account .nsl-container .nsl-button .nsl-button-svg-container {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
}
/* Short label (Facebook / Google / X): never wrap or push the button wide. */
body.woocommerce-account .nsl-container .nsl-button .nsl-button-label-container {
    color: inherit !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
}
body.woocommerce-account .nsl-container .nsl-button-facebook .nsl-button-svg-container {
    background: #1877f2 !important;
}
/* X logo is a white path; on a white circle it is invisible, so paint it black. */
body.woocommerce-account .nsl-container .nsl-button-twitter .nsl-button-svg-container svg path {
    fill: #000000 !important;
}
body.woocommerce-account .nsl-container .nsl-button .nsl-button-svg-container svg {
    width: 22px !important;
    height: 22px !important;
}

/* Mobile (<=760px): social buttons stack vertically, full width, tight
   12px gaps (no spreading), icon on the left like 1.0.2. The one-row
   layout is desktop only. */
@media (max-width: 760px) {
    body.woocommerce-account .nsl-container .nsl-container-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
    }
    body.woocommerce-account .nsl-container .nsl-container-buttons > a {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body.woocommerce-account .nsl-container .nsl-button {
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    body.woocommerce-account .nsl-container .nsl-button .nsl-button-svg-container {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }
}

/* Desktop (min-width 761px): the block below the social buttons uses an
   EXPLICIT 804px width (not just max-width) with auto margins, border-box
   and zero horizontal padding, so its left/right edges land exactly on
   the buttons row edges (803px). The `html` prefix beats the competing
   snippet rule that forces .woocommerce to width/max-width 100%. The
   divider gets the same explicit 804px width (1.0.6 only set max-width,
   which left its line full page width). The form-row <p> wrappers lose
   their side padding (WooCommerce gives them 3px each side, which made
   the inputs 6px narrower than the buttons row). Mobile stays full
   width (it already matches the stacked buttons). */
@media (min-width: 761px) {
    html body.woocommerce-account .woocommerce,
    html body.woocommerce-account #customer_login,
    html body.woocommerce-account #customer_login .u-column1 {
        width: 804px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    html body.woocommerce-account .cgoo-login-divider {
        width: 804px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }
    html body.woocommerce-account .woocommerce-form-login p.form-row {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Divider: or log in with email. */
.cgoo-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #64748b;
    font-size: 14px;
    white-space: nowrap;
}
html.cgoo-dark .cgoo-login-divider {
    color: #94a3b8;
}
.cgoo-login-divider::before,
.cgoo-login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
html.cgoo-dark .cgoo-login-divider::before,
html.cgoo-dark .cgoo-login-divider::after {
    background: #334155;
}

/* Login form: remove the card look, inputs become the design fields. */
body.woocommerce-account .woocommerce-form-login {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Hide only the email/password field labels (placeholders carry the text).
   Do NOT hide the Remember me label. */
body.woocommerce-account .woocommerce-form-login label[for="username"],
body.woocommerce-account .woocommerce-form-login label[for="password"] {
    display: none !important;
}
body.woocommerce-account .woocommerce-form-login .input-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    padding: 13px 16px !important;
    font-size: 16px !important;
    margin-bottom: 12px !important;
}
html.cgoo-dark body.woocommerce-account .woocommerce-form-login .input-text {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #f1f5f9 !important;
}
html:not(.cgoo-dark) body.woocommerce-account .woocommerce-form-login .input-text {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
body.woocommerce-account .woocommerce-form-login .input-text::placeholder {
    color: #94a3b8 !important;
}

/* Log in button: teal, full width, dark bold text. */
body.woocommerce-account .woocommerce-form-login__submit {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #14b8a6 !important;
    color: #042f2e !important;
    border: 0 !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    margin: 4px 0 14px !important;
    float: none !important;
}
body.woocommerce-account .woocommerce-form-login__submit:hover {
    background: #0d9488 !important;
}

/* Remember me + Forgot password row (built by JS). */
.cgoo-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    margin: 0 0 16px;
}
body.woocommerce-account .woocommerce-form-login .cgoo-login-meta label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-weight: 400 !important;
    margin: 0 !important;
    color: #64748b;
    cursor: pointer;
}
html.cgoo-dark .cgoo-login-meta label {
    color: #94a3b8;
}
.cgoo-login-meta input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #14b8a6;
    margin: 0;
}
.cgoo-login-meta a {
    color: #14b8a6 !important;
    font-weight: 600;
    text-decoration: none !important;
}

/* Create an account link + note (built by JS). */
.cgoo-login-create {
    text-align: center;
    font-size: 15px;
    color: #64748b;
    margin: 0 0 6px;
}
html.cgoo-dark .cgoo-login-create {
    color: #94a3b8;
}
.cgoo-login-create a {
    color: #14b8a6 !important;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}
.cgoo-login-note {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}
html:not(.cgoo-dark) .cgoo-login-note {
    color: #64748b;
}
