/* =========================================================
   PCStore My Account — Authentication Layout
   ========================================================= */

body.woocommerce-account:not(.logged-in) .site-main {
    background: #fff;
}

body.woocommerce-account:not(.logged-in)
.site-main > .site-container {
    max-width: none;
    padding: 0;
}

body.woocommerce-account:not(.logged-in)
.site-main article {
    margin: 0;
}

.pcstore-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 620px;
    width: 100%;
}

.pcstore-auth__form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 64px 32px;
    background: #fff;
}

.pcstore-auth__form-inner {
    width: 100%;
    max-width: 420px;
}

.pcstore-auth__form-inner .entry-content {
    margin: 0;
}

.pcstore-auth__brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 64px 48px;
    color: #fff;
    background: var(--color-primary, #e31e24);
    isolation: isolate;
}

.pcstore-auth__brand-panel::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 25px,
        rgb(255 255 255 / 8%) 25px,
        rgb(255 255 255 / 8%) 26px
    );
    pointer-events: none;
}

.pcstore-auth__brand-content {
    position: relative;
    width: 100%;
    max-width: 440px;
}

.pcstore-auth__brand-name {
    display: block;
    margin-bottom: 28px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.pcstore-auth__brand-content h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    line-height: 1.2;
}

.pcstore-auth__brand-content p {
    max-width: 360px;
    margin: 0;
    color: rgb(255 255 255 / 90%);
    font-size: 16px;
    line-height: 1.7;
}

.pcstore-auth .woocommerce {
    width: 100%;
}

.pcstore-auth .woocommerce form {
    max-width: 100%;
}

.pcstore-auth .woocommerce input.input-text {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #171717;
    font: inherit;
}

.pcstore-auth .woocommerce input.input-text:focus-visible {
    outline: none;
    border-color: #555;
    box-shadow: none;
}

.pcstore-auth .woocommerce button.button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: var(--color-primary, #e31e24);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pcstore-auth .woocommerce button.button:hover {
    background: var(--color-primary-hover, #c9191f);
    color: #fff;
}


/* Authentication form switching */

.pcstore-auth__switch {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding: 4px;
    border-radius: 8px;
    background: #f3f4f6;
}

.pcstore-auth__switch-button {
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #555;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pcstore-auth__switch-button.is-active {
    background: #fff;
    color: #171717;
    box-shadow: 0 1px 4px rgb(0 0 0 / 8%);
}

.pcstore-auth__switch-button:focus-visible {
    outline: 2px solid var(--color-primary, #e31e24);
    outline-offset: 2px;
}

.pcstore-auth #customer_login {
    display: block;
    width: 100%;
}

.pcstore-auth #customer_login > .u-column1,
.pcstore-auth #customer_login > .u-column2 {
    float: none;
    clear: both;
    width: 100%;
    max-width: none;
    margin: 0;
}

.pcstore-auth #customer_login > .u-column2 {
    display: none;
}

.pcstore-auth[data-auth-view="register"]
#customer_login > .u-column1 {
    display: none;
}

.pcstore-auth[data-auth-view="register"]
#customer_login > .u-column2 {
    display: block;
}

.pcstore-auth #customer_login h2 {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.pcstore-auth #customer_login form {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
}

.pcstore-auth #customer_login .form-row {
    float: none;
    width: 100%;
    margin: 0 0 20px;
    padding: 0;
}

.pcstore-auth #customer_login .form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.pcstore-auth #customer_login input.input-text {
    min-height: 48px;
}

.pcstore-auth #customer_login button.button {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 14px 0 0;
}

.pcstore-auth #customer_login
.woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcstore-auth #customer_login
.woocommerce-form-login__rememberme input {
    margin: 0;
}

.pcstore-auth #customer_login
.woocommerce-form-login__rememberme span {
    font-size: 14px;
}

.pcstore-auth #customer_login .lost_password {
    margin-top: 18px;
    text-align: center;
}

.pcstore-auth #customer_login .lost_password a {
    color: var(--color-primary, #e31e24);
    text-decoration: none;
}

.pcstore-auth #customer_login .lost_password a:hover {
    text-decoration: underline;
}

.pcstore-auth #customer_login
.woocommerce-form-register > p:not(.form-row) {
    margin: 0 0 18px;
    color: #666;
    font-size: 14px;
    line-height: 1.65;
}

/* Progressive enhancement: keep both forms usable without JS. */

.pcstore-auth:not(.pcstore-auth--ready)
#customer_login > .u-column2 {
    display: block;
}

.pcstore-auth:not(.pcstore-auth--ready)
#customer_login > .u-column1 {
    margin-bottom: 36px;
}

.pcstore-auth:not(.pcstore-auth--ready)
.pcstore-auth__switch {
    display: none;
}

@media (max-width: 767px) {
    .pcstore-auth {
        display: block;
        min-height: 0;
    }

    .pcstore-auth__form-panel {
        min-height: 480px;
        padding: 40px 20px 56px;
    }

    .pcstore-auth__brand-panel {
        display: none;
    }
}


/* PCStore authentication viewport alignment — Step 316I */

.pcstore-auth {
    min-height: calc(
        100vh - var(--pcstore-auth-header-height, 218px)
    );
    min-height: calc(
        100dvh - var(--pcstore-auth-header-height, 218px)
    );
}

.pcstore-auth__brand-content {
    transform: translateX(-120px);
}

@media (max-width: 1199px) {
    .pcstore-auth__brand-content {
        transform: translateX(-55px);
    }
}

@media (max-width: 767px) {
    .pcstore-auth {
        min-height: calc(
            100dvh - var(--pcstore-auth-header-height, 0px)
        );
    }

    .pcstore-auth__form-panel {
        min-height: calc(
            100dvh - var(--pcstore-auth-header-height, 0px)
        );
    }

    .pcstore-auth__brand-content {
        transform: none;
    }
}


/* PCStore authentication refinement — Step 316K */

/* Keep the branding comfortably inside the red panel. */
.pcstore-auth__brand-content {
    max-width: 440px;
}

/* Password recovery forms use the same clean account layout. */
.pcstore-auth .woocommerce-ResetPassword {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.pcstore-auth .woocommerce-ResetPassword > p:first-child {
    margin: 0 0 26px;
    color: var(--color-text-muted, #666);
    font-size: 15px;
    line-height: 1.7;
}

.pcstore-auth .woocommerce-ResetPassword .form-row {
    float: none;
    clear: both;
    width: 100%;
    margin: 0 0 20px;
    padding: 0;
}

.pcstore-auth .woocommerce-ResetPassword label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 500;
}

.pcstore-auth .woocommerce-ResetPassword input.input-text {
    min-height: 48px;
}

.pcstore-auth .woocommerce-ResetPassword button.button {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 12px 0 0;
}

.pcstore-auth__recovery-title {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.pcstore-auth__back {
    display: block;
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
}

.pcstore-auth__back a {
    color: var(--color-primary, #e31e24);
    text-decoration: none;
}

.pcstore-auth__back a:hover {
    text-decoration: underline;
}

.pcstore-auth--recovery .pcstore-auth__switch {
    display: none;
}

@media (max-width: 991px) {
    .pcstore-auth__brand-content {
        transform: none;
    }
}

/* PCStore authentication secondary text — Step 316L */

/* Consistent dark text across authentication forms. */
.pcstore-auth__form-panel {
    color: var(--color-text, #171717);
}

.pcstore-auth .woocommerce-form-register > p,
.pcstore-auth .woocommerce-ResetPassword > p,
.pcstore-auth .woocommerce-privacy-policy-text,
.pcstore-auth .woocommerce-privacy-policy-text p {
    color: var(--color-text, #171717);
}

/* Secondary links use the same dark text as PCStore. */
.pcstore-auth #customer_login .lost_password a,
.pcstore-auth__back a,
.pcstore-auth .woocommerce-form-register a,
.pcstore-auth .woocommerce-privacy-policy-text a {
    color: var(--color-text, #171717);
    text-decoration: none;
}

.pcstore-auth #customer_login .lost_password a:hover,
.pcstore-auth__back a:hover,
.pcstore-auth .woocommerce-form-register a:hover,
.pcstore-auth .woocommerce-privacy-policy-text a:hover {
    color: var(--color-text, #171717);
    text-decoration: underline;
}

.pcstore-auth #customer_login .lost_password a:focus-visible,
.pcstore-auth__back a:focus-visible,
.pcstore-auth .woocommerce-form-register a:focus-visible,
.pcstore-auth .woocommerce-privacy-policy-text a:focus-visible {
    outline: 2px solid var(--color-primary, #e31e24);
    outline-offset: 3px;
}

/* PCStore password recovery finalization — Step 317B.2 */

.pcstore-auth--recovery .pcstore-auth__switch {
    display: none;
}

.pcstore-auth .woocommerce-ResetPassword
.woocommerce-form-row--last {
    float: none;
    width: 100%;
}

.pcstore-auth .woocommerce-ResetPassword
input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}

.pcstore-auth .woocommerce-ResetPassword
button[type="submit"] {
    width: 100%;
}
