/* wwwroot/css/auth.css
   Black and red theme. To change the red, edit --a-brand and --a-brand-dark below
   (and the two rgba(212, 22, 28, ...) focus colours further down). */

.auth-wrap {
    --a-brand: #d4161c; /* match your search button / cart badge red */
    --a-brand-dark: #a80f14;
    --a-ink: #111111;
    --a-muted: #6b6b6b;
    --a-soft: #f5f5f5;
    --a-line: #e4e1da;
    --a-error: #c62828;
    font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--a-ink);
    background: var(--a-soft);
    padding: clamp(1.5rem, 4vw, 4rem) 1rem;
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) 5fr;
    max-width: 1040px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
}

/* ---------- Brand panel ---------- */
.auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.75rem, 3vw, 2.75rem);
    background: #111;
    color: #fff;
    box-shadow: inset 0 4px 0 var(--a-brand);
}

.auth-eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .8rem;
    color: var(--a-brand);
    margin: 0 0 1rem;
}

.auth-aside-title {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 .75rem;
}

.auth-aside-text {
    color: #cfcfcf;
    margin: 0;
}

.auth-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .9rem;
}

    .auth-perks li {
        display: flex;
        align-items: center;
        gap: .75rem;
        color: #ececec;
    }

    .auth-perks i {
        color: var(--a-brand);
        font-size: 1.25rem;
    }

/* ---------- Form panel ---------- */
.auth-main {
    padding: clamp(1.5rem, 3.5vw, 3rem);
}

.auth-head h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.auth-head p {
    color: var(--a-muted);
    margin: 0 0 1.75rem;
}

.auth-head a, .auth-hint a {
    color: var(--a-brand-dark);
    font-weight: 700;
}

.auth-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1.75rem;
    min-width: 0;
}

.auth-legend {
    float: none;
    width: auto;
    padding: 0;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--a-muted);
    margin-bottom: .85rem;
}

/* ---------- Account type toggle ---------- */
.type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.type-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--a-line);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

    .type-option:hover {
        border-color: var(--a-brand);
    }

.type-input:checked + .type-option {
    border-color: var(--a-brand);
    background: #fdf0f0;
    color: var(--a-brand-dark);
}

.type-input:focus-visible + .type-option {
    outline: 3px solid rgba(212, 22, 28, .35);
    outline-offset: 2px;
}

/* ---------- Inputs ---------- */
.auth-wrap .form-control {
    border: 1.5px solid var(--a-line);
    border-radius: 10px;
    box-shadow: none;
}

    .auth-wrap .form-control:focus {
        border-color: var(--a-brand);
        box-shadow: 0 0 0 .2rem rgba(212, 22, 28, .18);
    }

.auth-wrap .form-floating > label {
    color: var(--a-muted);
}

.field-error {
    display: block;
    color: var(--a-error);
    font-size: .85rem;
    margin-top: .3rem;
    min-height: 0;
}

    .field-error:empty {
        display: none;
    }

.auth-wrap .input-validation-error {
    border-color: var(--a-error);
}

.has-toggle {
    position: relative;
}

    .has-toggle .form-control {
        padding-right: 3rem;
    }

.pw-toggle {
    position: absolute;
    top: 50%;
    right: .5rem;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: none;
    color: var(--a-muted);
    font-size: 1.15rem;
    border-radius: 8px;
    z-index: 5;
}

    .pw-toggle:hover {
        color: var(--a-ink);
        background: var(--a-soft);
    }

.auth-hint {
    font-size: .85rem;
    color: var(--a-muted);
    margin: .75rem 0 0;
}

.auth-alert {
    color: var(--a-error);
    margin-bottom: 1rem;
}

    .auth-alert ul {
        margin: 0;
        padding-left: 1.1rem;
    }

    .auth-alert:empty {
        display: none;
    }

/* ---------- Submit ---------- */
.auth-wrap .btn-brand {
    background: var(--a-brand);
    border: 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
    border-radius: 10px;
}

    .auth-wrap .btn-brand:hover, .auth-wrap .btn-brand:focus-visible {
        background: var(--a-brand-dark);
        color: #fff;
    }

.auth-submit {
    width: 100%;
    padding: .95rem 1.5rem;
}

.auth-fine {
    text-align: center;
    color: var(--a-muted);
    font-size: .85rem;
    margin: 1rem 0 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .auth-perks {
        display: none;
    }
    /* keep the form near the top on phones */
}

@media (max-width: 480px) {
    .type-toggle {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-wrap * {
        transition: none !important;
    }
}


/* =====================================================================
   Login page additions
   ===================================================================== */
.auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 1.25rem 0 1.5rem;
}

    .auth-row .form-check {
        margin: 0;
    }

.auth-wrap .form-check-input {
    border: 1.5px solid var(--a-line);
}

    .auth-wrap .form-check-input:checked {
        background-color: var(--a-brand);
        border-color: var(--a-brand);
    }

    .auth-wrap .form-check-input:focus {
        border-color: var(--a-brand);
        box-shadow: 0 0 0 .2rem rgba(212, 22, 28, .18);
    }

.auth-link {
    color: var(--a-brand-dark);
    font-weight: 700;
    text-decoration: none;
}

    .auth-link:hover, .auth-link:focus-visible {
        color: var(--a-brand);
        text-decoration: underline;
    }

/* "New here?" block inside the dark panel */
.auth-aside-cta {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

    .auth-aside-cta p {
        margin: 0 0 .75rem;
        color: #cfcfcf;
    }

.auth-aside-btn {
    width: 100%;
    padding: .8rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    border: 1.5px solid #fff;
    color: #fff;
}

    .auth-aside-btn:hover, .auth-aside-btn:focus-visible {
        background: var(--a-brand);
        border-color: var(--a-brand);
        color: #fff;
    }

/* shown only on phones, where the dark panel's perks and button are tucked away */
.auth-fine-mobile {
    display: none;
}

@media (max-width: 860px) {
    .auth-aside-cta {
        display: none;
    }

    .auth-fine-mobile {
        display: block;
    }
}


/* =====================================================================
   Status pages (Register confirmation, and reusable for Forgot password etc.)
   ===================================================================== */
.auth-card-single {
    display: block;
    max-width: 560px;
    padding: clamp(1.75rem, 4vw, 3rem);
    text-align: center;
    border-top: 4px solid var(--a-brand);
}

.status-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.25rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fdf0f0;
    color: var(--a-brand);
    font-size: 2.1rem;
}

.status-title {
    font-size: clamp(1.7rem, 4vw, 2.1rem);
    font-weight: 700;
    margin: 0 0 .6rem;
}

.status-text {
    color: var(--a-muted);
    font-size: 1.05rem;
    margin: 0 auto 1.5rem;
    max-width: 42ch;
}

    .status-text strong {
        color: var(--a-ink);
        word-break: break-all;
    }

.status-tips {
    list-style: none;
    margin: 0 auto 1.75rem;
    padding: 1rem 1.25rem;
    display: grid;
    gap: .6rem;
    text-align: left;
    background: var(--a-soft);
    border-radius: 10px;
    max-width: 420px;
}

    .status-tips li {
        display: flex;
        align-items: center;
        gap: .6rem;
        font-size: .95rem;
    }

    .status-tips i {
        color: var(--a-brand);
        font-size: 1.1rem;
        flex: none;
    }

.status-note {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    text-align: left;
    margin-top: 1.5rem;
    padding: .9rem 1rem;
    background: var(--a-soft);
    border-left: 4px solid var(--a-ink);
    border-radius: 8px;
    font-size: .9rem;
    color: var(--a-muted);
}

    .status-note i {
        font-size: 1.2rem;
        color: var(--a-ink);
        margin-top: .1rem;
    }

    .status-note p {
        margin: 0;
    }

    .status-note a {
        color: var(--a-brand-dark);
        font-weight: 700;
    }

.auth-card-single .auth-submit {
    display: block;
    text-decoration: none;
}


/* =====================================================================
   Failure variant + action buttons for status pages
   ===================================================================== */
.status-icon-error {
    background: #111;
    color: #fff;
}

.auth-card-single.is-error {
    border-top-color: #111;
}

.status-actions {
    display: grid;
    gap: .75rem;
    margin-top: .5rem;
}

.auth-submit-alt {
    display: block;
    width: 100%;
    padding: .95rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    border: 1.5px solid var(--a-ink);
    color: var(--a-ink);
    text-decoration: none;
}

    .auth-submit-alt:hover, .auth-submit-alt:focus-visible {
        background: var(--a-ink);
        color: #fff;
    }

/* in the failure card the note sits above the buttons */
.is-error .status-note {
    margin: 0 0 1.5rem;
    border-left-color: var(--a-brand);
}

    .is-error .status-note i {
        color: var(--a-brand);
    }


/* =====================================================================
   Forms inside the single-column status card (Forgot / Reset password)
   ===================================================================== */
.status-form {
    text-align: left;
    max-width: 420px;
    margin: 0 auto;
}

    .status-form .field-error {
        margin-top: .4rem;
    }

.status-submit {
    margin-top: 1.25rem;
}

.auth-card-single .auth-fine i {
    margin-right: .25rem;
    color: var(--a-muted);
}
