/* Logged-out My Account: one 400px column with Google, Log in / Create account tabs, and the WooCommerce forms. */

body.redaccs-auth-view {
    --ra-ink: #111827;
    --ra-ink-hover: #1f2937;
    --ra-text: #222222;
    --ra-muted: #5c5757;
    --ra-line: #e6e2e1;
    --ra-field: #8f8a8a;
    --ra-field-hover: #6f6a6a;
    --ra-brand: #e8622a;
    --ra-link: #c2410c;
    --ra-link-hover: #9a3412;
    --ra-error-ink: #8a2c0d;
    --ra-error-bg: #fdf3ef;
    --ra-error-line: #efc2b0;
    --ra-radius: 6px;
    --ra-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.redaccs-auth-view .entry-content .woocommerce {
    width: min(100%, 400px);
    margin: 56px auto 88px;
    color: var(--ra-text);
}

body.redaccs-auth-view .entry-content .woocommerce ::selection {
    background: #fbd9c8;
    color: var(--ra-ink);
}

/* Shared focus ring for every control in the view. */
body.redaccs-auth-view .entry-content .woocommerce a:focus-visible,
body.redaccs-auth-view .entry-content .woocommerce button:focus-visible,
body.redaccs-auth-view .entry-content .woocommerce input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--ra-ink);
    outline-offset: 2px;
}

/* Intro */

body.redaccs-auth-view .redaccs-auth-intro {
    margin: 0 0 28px;
}

body.redaccs-auth-view .redaccs-auth-intro__title {
    margin: 0 0 8px;
    color: var(--ra-ink);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

body.redaccs-auth-view .redaccs-auth-intro__lead {
    margin: 0;
    color: var(--ra-muted);
    font-size: 15px;
    line-height: 1.5;
    text-wrap: pretty;
}

/* Google sign-in. The placeholder holds the button's space until Google's iframe paints over it. */

body.redaccs-auth-view .redaccs-auth-google {
    position: relative;
    min-height: 40px;
}

body.redaccs-auth-view .redaccs-auth-google__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: opacity 160ms ease-out;
}

body.redaccs-auth-view .redaccs-auth-google.is-loaded .redaccs-auth-google__placeholder {
    opacity: 0;
}

body.redaccs-auth-view .redaccs-auth-google__button {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 40px;
}

body.redaccs-auth-view .redaccs-auth-google-status {
    margin: 0;
    color: var(--ra-muted);
    font-size: 14px;
    line-height: 1.45;
}

body.redaccs-auth-view .redaccs-auth-google-status:not(:empty) {
    margin-top: 10px;
}

body.redaccs-auth-view .redaccs-auth-google-status.is-error {
    color: var(--ra-error-ink);
}

body.redaccs-auth-view .redaccs-auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
    color: var(--ra-muted);
    font-size: 13px;
    line-height: 1;
}

body.redaccs-auth-view .redaccs-auth-or::before,
body.redaccs-auth-view .redaccs-auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ra-line);
}

body.redaccs-auth-view .redaccs-auth-google[hidden],
body.redaccs-auth-view .redaccs-auth-or[hidden],
body.woocommerce-no-js.redaccs-auth-view .redaccs-auth-google,
body.woocommerce-no-js.redaccs-auth-view .redaccs-auth-or {
    display: none !important;
}

/* Notices sit in the column, right above the form they belong to. */

body.redaccs-auth-view .woocommerce-notices-wrapper:not(:empty) {
    margin: 0 0 16px;
}

body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-error,
body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-message,
body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-info {
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: #f7f5f4;
    color: var(--ra-text);
    font-size: 14px;
    line-height: 1.5;
    list-style: none;
}

body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-error {
    border-color: var(--ra-error-line);
    background: var(--ra-error-bg);
    color: var(--ra-error-ink);
}

body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-error::before,
body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-message::before,
body.redaccs-auth-view .woocommerce-notices-wrapper .woocommerce-info::before {
    content: none;
}

body.redaccs-auth-view .woocommerce-notices-wrapper li {
    margin: 0;
}

body.redaccs-auth-view .woocommerce-notices-wrapper a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Tabs: text row on a hairline, brand underline marks the active one. */

body.redaccs-auth-view .redaccs-auth-tabs {
    display: flex;
    gap: 28px;
    margin: 0 0 24px;
    border-bottom: 1px solid var(--ra-line);
}

body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab,
body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab:hover,
body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab:focus {
    position: relative;
    min-height: 44px;
    margin: 0 0 -1px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--ra-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: color 160ms ease-out;
}

body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab:hover,
body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab.is-active {
    color: var(--ra-ink);
}

body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--ra-brand);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 220ms var(--ra-ease);
}

body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab.is-active::after {
    transform: scaleX(1);
}

body.woocommerce-no-js.redaccs-auth-view .redaccs-auth-tabs {
    display: none;
}

/* Panels */

body.redaccs-auth-view.woocommerce-account #customer_login {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 0;
    border-radius: 0;
    background: none;
}

body.redaccs-auth-view.woocommerce-account #customer_login::before,
body.redaccs-auth-view.woocommerce-account #customer_login::after {
    display: none;
    content: none;
}

body.redaccs-auth-view.woocommerce-account #customer_login .u-column1,
body.redaccs-auth-view.woocommerce-account #customer_login .u-column2 {
    display: block;
    flex: none;
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.redaccs-auth-view.woocommerce-account #customer_login .u-column1[hidden],
body.redaccs-auth-view.woocommerce-account #customer_login .u-column2[hidden],
body.woocommerce-js.redaccs-auth-initial-login #customer_login:not(.redaccs-auth-tabs-ready) .u-column2,
body.woocommerce-js.redaccs-auth-initial-register #customer_login:not(.redaccs-auth-tabs-ready) .u-column1 {
    display: none !important;
}

/* The tabs name each panel; WooCommerce's H2s stay for screen readers only. */
body.woocommerce-js.redaccs-auth-view.woocommerce-account #customer_login h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Forms: no card, fields sit on the page. */

body.redaccs-auth-view.woocommerce-account #customer_login form.login,
body.redaccs-auth-view.woocommerce-account #customer_login form.register {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

body.redaccs-auth-view.woocommerce-account #customer_login .form-row {
    margin: 0 0 16px;
    padding: 0;
}

body.redaccs-auth-view.woocommerce-account #customer_login label {
    display: block;
    margin: 0 0 6px;
    color: var(--ra-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Every field is required, so the asterisks add noise; the screen-reader "Required" text stays. */
body.redaccs-auth-view.woocommerce-account #customer_login label .required {
    display: none;
}

body.redaccs-auth-view.woocommerce-account #customer_login input.input-text {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--ra-field);
    border-radius: var(--ra-radius);
    background: #ffffff;
    box-shadow: none;
    color: var(--ra-text);
    font-size: 16px;
    line-height: 1.4;
    caret-color: var(--ra-ink);
    transition: border-color 120ms ease-out;
}

body.redaccs-auth-view.woocommerce-account #customer_login input.input-text:hover {
    border-color: var(--ra-field-hover);
}

body.redaccs-auth-view.woocommerce-account #customer_login input.input-text:focus {
    border-color: var(--ra-ink);
    outline: 1px solid var(--ra-ink);
    outline-offset: 0;
    box-shadow: none;
}

body.redaccs-auth-view.woocommerce-account #customer_login .password-input {
    position: relative;
    display: block;
}

body.redaccs-auth-view.woocommerce-account #customer_login .password-input input.input-text {
    padding-right: 48px;
}

body.redaccs-auth-view.woocommerce-account #customer_login .show-password-input {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--ra-radius);
    background: none;
    opacity: 0.72;
    transform: none;
    cursor: pointer;
    transition: opacity 120ms ease-out;
}

body.redaccs-auth-view.woocommerce-account #customer_login .show-password-input:hover {
    opacity: 1;
}

body.redaccs-auth-view.woocommerce-account #customer_login .show-password-input:focus-visible {
    opacity: 1;
    outline-offset: -4px;
}

body.redaccs-auth-view.woocommerce-account #customer_login .woocommerce-form-login__rememberme {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: -4px 0 12px;
    font-weight: 500;
    cursor: pointer;
}

body.redaccs-auth-view.woocommerce-account #customer_login .woocommerce-form-login__rememberme input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ra-ink);
}

body.redaccs-auth-view.woocommerce-account #customer_login .button {
    position: relative;
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: var(--ra-radius);
    background: var(--ra-ink);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 44px;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    transition: background-color 140ms ease-out, transform 140ms var(--ra-ease);
}

body.redaccs-auth-view.woocommerce-account #customer_login .button:hover,
body.redaccs-auth-view.woocommerce-account #customer_login .button:focus {
    background: var(--ra-ink-hover);
    color: #ffffff;
}

body.redaccs-auth-view.woocommerce-account #customer_login .button:active {
    transform: translateY(1px);
}

/* Submitting: keep the label, add a spinner, block double submits. */
body.redaccs-auth-view.woocommerce-account #customer_login .button.is-busy {
    cursor: progress;
    padding-right: 44px;
}

body.redaccs-auth-view.woocommerce-account #customer_login .button.is-busy::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: redaccs-auth-spin 700ms linear infinite;
}

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

body.redaccs-auth-view.woocommerce-account #customer_login .lost_password {
    margin: 12px 0 0;
    font-size: 14px;
}

/* Stand-alone link: pad it to a 24px+ target. */
body.redaccs-auth-view.woocommerce-account #customer_login .lost_password a {
    display: inline-block;
    padding: 4px 0;
}

body.redaccs-auth-view.woocommerce-account #customer_login .woocommerce-privacy-policy-text p {
    margin: 0 0 16px;
    color: var(--ra-muted);
    font-size: 13px;
    line-height: 1.5;
}

body.redaccs-auth-view .entry-content .woocommerce #customer_login a,
body.redaccs-auth-view .redaccs-auth-help a {
    color: var(--ra-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body.redaccs-auth-view .entry-content .woocommerce #customer_login a:hover,
body.redaccs-auth-view .redaccs-auth-help a:hover {
    color: var(--ra-link-hover);
}

body.redaccs-auth-view .redaccs-auth-help {
    margin: 32px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--ra-line);
    color: var(--ra-muted);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    body.redaccs-auth-view .entry-content .woocommerce {
        margin: 28px auto 56px;
    }

    body.redaccs-auth-view .redaccs-auth-intro {
        margin-bottom: 24px;
    }

    body.redaccs-auth-view .redaccs-auth-intro__title {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.redaccs-auth-view .redaccs-auth-tabs .redaccs-auth-tab::after,
    body.redaccs-auth-view.woocommerce-account #customer_login .button {
        transition: none;
    }

    body.redaccs-auth-view.woocommerce-account #customer_login .button.is-busy::after {
        animation-duration: 1.6s;
    }
}
