/* ────────────────────────────────────────────────────────────
   Auth forms (login / register) — clean stepped-style layout.
   Loaded by user/auth/login.blade.php & register.blade.php.
   Visual only; form actions/ids/handlers are unchanged.
   ──────────────────────────────────────────────────────────── */

.account-wrapper .right { padding: 0 !important; width: 100% !important; }
.inner-hero { display: none !important; }

/* ── Order Summary layout grid ──────────────────────────────────────────
   Mobile (default): single column, ordered choice → summary → trust.
   Desktop ≥992: guest → [choice + trust] left | summary right;
                 logged-in (.authx-grid--authed) → summary + trust stacked.
   ──────────────────────────────────────────────────────────────────────── */
/* Sticky footer (desktop): on short auth pages the wrapper didn't fill the viewport,
   leaving a white strip (body bg) below the footer. Scoped via :has(.authx-section)
   so only login/register/order-summary are affected — the auth section grows to push
   the footer to the bottom. */
@media (min-width: 992px) {
    .main-wrapper:has(.authx-section) {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    .main-wrapper:has(.authx-section) .authx-section {
        flex: 1 0 auto;
    }
    /* Login/Register (single column, no cart): center the form vertically inside the
       now-full-height section. Scoped to .auth-col-form so order-summary (long cart,
       top-aligned) is untouched. No extra 100vh — the height comes from the sticky footer. */
    .authx-section:has(.auth-col-form) {
        align-items: center !important;
    }
}

/* Order Summary: section is the positioning context for the header band */
.authx-section { position: relative; }
.authx-headfill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #000718;
    z-index: 0;
}

.authx-grid { display: flex; flex-direction: column; align-items: center; gap: 40px; margin-top: 20px; }
.authx-grid__left { display: contents; }                 /* children flow into the grid on mobile */
.authx-grid > *, .authx-grid__left > * { width: 100%; max-width: 500px; }
.authx-grid .account-wrapper { order: 1; }
.authx-grid__summary { order: 2; }
.authx-grid .authx-card { order: 3; }

@media (min-width: 992px) {
    .authx-grid { flex-direction: row; align-items: flex-start; justify-content: center; gap: 40px; }
    .authx-grid__left { display: flex; flex-direction: column; gap: 40px; width: 500px; }
    .authx-grid__left > * { max-width: none; }
    .authx-grid__summary { width: 500px; }
    .authx-grid .account-wrapper,
    .authx-grid__summary,
    .authx-grid .authx-card { order: 0; }                 /* desktop = DOM order */

    .authx-grid--authed { flex-direction: column; align-items: center; }
    .authx-grid--authed > * { width: 500px; }
}

/* Uniform card radius across all blocks (choice, summary, trust) */
.authx-grid .account-wrapper,
.authx-grid .order-cart,
.authx-grid .authx-card { border-radius: 16px !important; }

/* Trust block placed in its own white parent card (trust block itself untouched) */
.authx-card {
    background: #fff;
    border: 1px solid #eef0f6;
    box-shadow: 0 12px 44px rgba(16, 24, 64, .14);
    overflow: hidden;
}
.authx-card .trust-block { margin: 0 !important; }   /* drop standalone top gap; styling untouched */

.authx { width: 100%; text-align: center; }

.authx__title {
    font-size: 32px;
    font-weight: 800;
    color: #1c1c28;
    margin: 8px 0 6px;
    line-height: 1.15;
}
.authx__sub { font-size: 14px; color: #5b6172; margin-bottom: 22px; }
.authx__switch { color: #0083f2; font-weight: 700; text-decoration: none; }
.authx__switch:hover { text-decoration: underline; }

/* ── Social buttons grid (2-up) ── */
.authx-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 4px;
}
.authx-social > a {
    position: relative;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;        /* icon + text centered in the button */
    gap: 10px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}
/* same width for every provider */
.authx-social > a svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0 !important;
}
@media (max-width: 480px) {
    .authx-social { grid-template-columns: 1fr; }
}

/* ── Divider with centered label ── */
.authx__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #1c1c28;
    font-weight: 600;
    font-size: 14px;
}
.authx__divider::before,
.authx__divider::after { content: ""; flex: 1; height: 1px; background: #d7dbe7; }

/* ── Fields ── */
.authx__field { margin-bottom: 18px; text-align: left; }
.authx__label { display: block; font-size: 13px; font-weight: 600; color: #6b7280; margin-bottom: 6px; }
.authx__label .req { color: #f04e37; }
.authx__input {
    width: 100%;
    height: 48px;
    border: 1px solid #d7dbe7;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 15px;
    color: #1c1c28;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.authx__input:focus {
    outline: none;
    border-color: #2d1b9e;
    box-shadow: 0 0 0 3px rgba(45, 27, 158, .12);
}

/* password field + eye toggle */
.authx__pwd { position: relative; }
.authx__pwd .authx__input { padding-right: 44px; }
.authx__eye {
    position: absolute;
    top: 0;
    right: 8px;
    height: 48px;
    display: flex;
    align-items: center;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #8a90a2;
    padding: 0 6px;
    cursor: pointer;
}

/* ── Buttons ── */
.authx__btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.authx__btn--primary { background: #0083f2; color: #fff; }
.authx__btn--primary:hover { background: #0073d6; }
.authx__btn:disabled,
.authx__btn[disabled] { background: #e9ecf1; color: #9aa0b0; cursor: not-allowed; }

/* ── Terms / links ── */
.authx__terms { font-size: 12.5px; color: #6b7280; margin: 2px 0 16px; text-align: left; }
.authx__terms a { color: #0083f2; text-decoration: none; }
.authx__terms a:hover { text-decoration: underline; }
.authx__check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.5; }
.authx__check input { margin: 3px 0 0; flex: 0 0 auto; aspect-ratio: 1 / 1; }

/* ── Password requirements popup (secure_password) ── */
.hover-input-popup { position: relative; }
.hover-input-popup:hover .input-popup { opacity: 1; visibility: visible; }
.input-popup {
    position: absolute;
    bottom: 118%;
    left: 50%;
    width: 280px;
    background-color: #1a1a1a;
    color: #fff;
    padding: 16px 18px;
    border-radius: 6px;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
    z-index: 5;
    text-align: left;
}
.input-popup::after {
    position: absolute;
    content: '';
    bottom: -18px;
    left: 50%;
    margin-left: -5px;
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent #1a1a1a transparent;
    transform: rotate(180deg);
}
.input-popup p { padding-left: 22px; position: relative; margin: 4px 0; font-size: 13px; }
.input-popup p::before {
    position: absolute;
    content: '';
    font-family: 'Line Awesome Free';
    font-weight: 900;
    left: 0;
    top: 3px;
    line-height: 1;
    font-size: 16px;
}
.input-popup p.error { text-decoration: line-through; }
.input-popup p.error::before { content: "\f057"; color: #ea5455; }
.input-popup p.success::before { content: "\f058"; color: #28c76f; }

/* ── Stepped flow (email → Continue → password → Submit) ── */
.authx__step2 { display: none; }
.is-step2 .authx__step2 { display: block; }
.is-step2 .authx__continue { display: none; }
.authx__step2 .authx__btn { margin-top: 4px; }

/* ── Order Summary: "Sign up or log in" choice card (forms open in a popup) ── */
.authx__title--sm { font-size: 22px; text-align: center; margin: 0 0 20px; }
.authx-choice { display: flex; gap: 12px; }
.authx-choice__btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #e1e5ee;
    background: #fff;
    color: #2a2f45;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.authx-choice__btn:hover {
    border-color: #0083f2;
    color: #0083f2;
    background: #f5faff;
    box-shadow: 0 4px 14px rgba(0, 131, 242, .12);
}
.authx-choice__btn--primary {
    background: #0083f2;
    border-color: #0083f2;
    color: #fff;
}
.authx-choice__btn--primary:hover {
    background: #0073d6;
    border-color: #0073d6;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 131, 242, .28);
}
.authx-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #f3c2c2;
    background: #fdf2f2;
    border-radius: 10px;
    color: #d23b3b;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}
.authx-alert[hidden] { display: none; }
.authx-alert i { font-size: 17px; flex: 0 0 auto; }

.authx-choice__note {
    margin: 20px auto 0;
    max-width: 92%;
    font-size: 12px;
    line-height: 1.65;
    color: #9aa0b0;
    text-align: center;
}

#authxRoot .authx-choice__btn { color: #1c1c28 !important; }
#authxRoot .authx-choice__btn:hover { color: #0083f2 !important; }
#authxRoot .authx-choice__btn--primary,
#authxRoot .authx-choice__btn--primary:hover { color: #fff !important; }

.authx__links { margin-top: 18px; text-align: center; }
.authx__link { display: inline-block; color: #8a90a2; font-weight: 600; text-decoration: none; font-size: 14px; }
.authx__link:hover { color: #0083f2; text-decoration: underline; }

/* ────────────────────────────────────────────────────────────
   Color overrides via #authxRoot — the theme forces light tones
   (.btn-outline--light{color:#eef4ff}, autofill lavender, etc.),
   so we win specificity through the id + !important.
   ──────────────────────────────────────────────────────────── */
#authxRoot .authx-social > a {
    color: #1c1c28 !important;
    border-color: #d7dbe7 !important;
    background: #fff !important;
}
#authxRoot .authx-social > a:hover {
    color: #1c1c28 !important;
    background: #f6f7fb !important;
    border-color: #c8cee0 !important;
}

#authxRoot .authx__input {
    background: #fff !important;
    color: #1c1c28 !important;
    border-color: #d7dbe7 !important;
}
#authxRoot .authx__input:focus {
    border-color: #2d1b9e !important;
}
/* kill autofill lavender background */
#authxRoot .authx__input:-webkit-autofill,
#authxRoot .authx__input:-webkit-autofill:hover,
#authxRoot .authx__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #1c1c28 !important;
    caret-color: #1c1c28;
}

#authxRoot .authx__btn--primary { background: #0083f2 !important; color: #fff !important; }
#authxRoot .authx__btn--primary:hover { background: #0073d6 !important; }
/* disabled must win over the primary id-override above (higher specificity via :disabled) */
#authxRoot .authx__btn:disabled,
#authxRoot .authx__btn[disabled] {
    background: #e9ecf1 !important;
    color: #9aa0b0 !important;
    cursor: not-allowed;
}

#authxRoot .authx__switch { color: #0083f2 !important; }
#authxRoot .authx__link { color: #8a90a2 !important; }
#authxRoot .authx__link:hover { color: #0083f2 !important; }
#authxRoot .authx__terms a { color: #0083f2 !important; }
