/*
   ShopAccount authentication surfaces.
   Reference-driven login/register layout with code-native controls.
*/

body.marketplace-surface .auth-marketplace {
    --auth-accent: #ff3347;
    --auth-accent-hover: #ea1f37;
    --auth-text: #171922;
    --auth-muted: #737b8c;
    --auth-line: #dfe3ea;
    position: relative;
    isolation: isolate;
    min-height: 640px;
    overflow: hidden;
    background-color: #050505;
    background-image: url("../images/shopaccount-auth-vault.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

body.marketplace-surface .auth-register-page {
    min-height: 760px;
}

body.marketplace-surface .auth-marketplace-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 450px);
    align-items: center;
    gap: clamp(44px, 7vw, 96px);
    width: min(calc(100% - 48px), 1180px);
    min-height: inherit;
    padding-block: 44px;
}

body.marketplace-surface .auth-register-page .auth-marketplace-inner {
    grid-template-columns: minmax(0, 1fr) minmax(450px, 500px);
    padding-block: 34px;
}

body.marketplace-surface .auth-marketplace-copy {
    min-width: 0;
    max-width: 660px;
    color: #fff;
}

body.marketplace-surface .auth-eyebrow {
    width: fit-content;
    margin: 0 0 22px;
    border: 1px solid rgb(255 51 71 / 72%);
    border-radius: 6px;
    background: rgb(255 51 71 / 8%);
    padding: 7px 14px;
    color: #ff4d5e;
    font-size: 10px;
    font-weight: 820;
    letter-spacing: .08em;
}

body.marketplace-surface .auth-marketplace-copy h1 {
    max-width: 660px;
    margin: 0;
    color: #fff;
    font-size: clamp(40px, 4.2vw, 58px);
    font-weight: 840;
    line-height: 1.08;
    letter-spacing: -.045em;
}

body.marketplace-surface .auth-marketplace-copy h1 span {
    display: inline;
}

body.marketplace-surface .auth-marketplace-copy h1 em {
    color: var(--auth-accent);
    font-style: normal;
    white-space: nowrap;
}

body.marketplace-surface .auth-lead {
    max-width: 610px;
    margin: 22px 0 30px;
    color: #c5c9d2;
    font-size: 15px;
    line-height: 1.75;
}

body.marketplace-surface .auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: 680px;
    border-top: 1px solid rgb(255 255 255 / 15%);
}

body.marketplace-surface .auth-benefits > span {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 18px 14px 0 0;
}

body.marketplace-surface .auth-benefits > span + span {
    padding-left: 14px;
    border-left: 1px solid rgb(255 255 255 / 13%);
}

body.marketplace-surface .auth-benefits i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgb(255 51 71 / 74%);
    border-radius: 8px;
    background: rgb(255 51 71 / 8%);
    color: #ff5363;
    font-style: normal;
}

body.marketplace-surface .auth-benefits i .ui-icon {
    width: 18px;
    height: 18px;
}

body.marketplace-surface .auth-benefits b,
body.marketplace-surface .auth-benefits small {
    display: block;
}

body.marketplace-surface .auth-benefits b {
    color: #fff;
    font-size: 12px;
    font-weight: 780;
}

body.marketplace-surface .auth-benefits small {
    margin-top: 5px;
    color: #aeb4c1;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.55;
}

body.marketplace-surface .auth-card {
    width: 100%;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgb(0 0 0 / 42%);
    padding: 30px;
    color: var(--auth-text);
}

body.marketplace-surface .auth-register-card {
    padding: 26px 28px;
}

body.marketplace-surface .auth-card-header {
    margin-bottom: 22px;
}

body.marketplace-surface .auth-card-header h2 {
    margin: 0;
    color: var(--auth-text);
    font-size: 25px;
    font-weight: 820;
    line-height: 1.2;
}

body.marketplace-surface .auth-card-header p {
    margin: 7px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
}

body.marketplace-surface .auth-control {
    display: grid;
    gap: 7px;
    margin-top: 15px;
    color: #343842;
    font-size: 12px;
    font-weight: 740;
}

body.marketplace-surface .auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.marketplace-surface .auth-label-row > a {
    color: var(--auth-accent);
    font-size: 11px;
    font-weight: 760;
}

body.marketplace-surface .auth-field {
    min-height: 46px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: #fff;
    padding: 0 12px;
    transition: border-color 170ms ease, box-shadow 170ms ease;
}

body.marketplace-surface .auth-password-field {
    grid-template-columns: 20px minmax(0, 1fr) 34px;
    padding-right: 5px;
}

body.marketplace-surface .auth-field:focus-within {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgb(255 51 71 / 12%);
}

body.marketplace-surface .auth-field > .ui-icon {
    width: 17px;
    height: 17px;
    color: #9aa1ad;
}

body.marketplace-surface .auth-field input:not([type="checkbox"]) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--auth-text);
    font-size: 13px !important;
    font-weight: 500 !important;
    outline: 0;
}

body.marketplace-surface .auth-field input::placeholder {
    color: #a2a8b4;
}

body.marketplace-surface .auth-password-toggle {
    width: 34px;
    height: 34px;
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9aa1ad;
    padding: 0;
    cursor: pointer;
}

body.marketplace-surface .auth-password-toggle:hover,
body.marketplace-surface .auth-password-toggle:focus-visible {
    background: #f2f4f7;
    color: var(--auth-accent);
    transform: none;
}

body.marketplace-surface .auth-password-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

body.marketplace-surface .auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0;
}

body.marketplace-surface .auth-options label,
body.marketplace-surface .auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: #606775;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

body.marketplace-surface .auth-options input,
body.marketplace-surface .auth-terms input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 1px;
    accent-color: var(--auth-accent);
}

body.marketplace-surface .auth-security-note {
    min-height: 56px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    border: 1px solid #dfe8e3;
    border-radius: 8px;
    background: #f7fbf9;
    padding: 10px 12px;
}

body.marketplace-surface .auth-security-note > .ui-icon {
    width: 21px;
    height: 21px;
    color: #21965f;
}

body.marketplace-surface .auth-security-note b,
body.marketplace-surface .auth-security-note small {
    display: block;
}

body.marketplace-surface .auth-security-note b {
    color: #303941;
    font-size: 11px;
}

body.marketplace-surface .auth-security-note small {
    margin-top: 3px;
    color: #77818c;
    font-size: 9px;
    line-height: 1.45;
}

body.marketplace-surface .auth-submit {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--auth-accent);
    border-radius: 8px;
    background: var(--auth-accent);
    box-shadow: 0 10px 24px rgb(255 51 71 / 22%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

body.marketplace-surface .auth-submit:hover {
    border-color: var(--auth-accent-hover);
    background: var(--auth-accent-hover);
    box-shadow: 0 12px 27px rgb(255 51 71 / 28%);
}

body.marketplace-surface .auth-submit .ui-icon {
    width: 16px;
    height: 16px;
}

body.marketplace-surface .auth-login-card .auth-submit .ui-icon {
    transform: rotate(180deg);
}

body.marketplace-surface .auth-switch {
    margin: 17px 0 0;
    color: #757d8a;
    font-size: 11px;
    text-align: center;
}

body.marketplace-surface .auth-switch a,
body.marketplace-surface .auth-legal a,
body.marketplace-surface .auth-terms a {
    color: var(--auth-accent);
    font-weight: 760;
}

body.marketplace-surface .auth-legal {
    margin: 14px 0 0;
    color: #9299a5;
    font-size: 9px;
    line-height: 1.55;
    text-align: center;
}

body.marketplace-surface .auth-name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.marketplace-surface .auth-helper {
    color: #89909c;
    font-size: 9px;
    font-weight: 500;
}

body.marketplace-surface .auth-terms {
    margin-top: 13px;
}

body.marketplace-surface .auth-field-error,
body.marketplace-surface .auth-validation-summary {
    color: #d72a42;
    font-size: 10px;
    font-weight: 600;
}

body.marketplace-surface .auth-field-error:empty,
body.marketplace-surface .auth-validation-summary:empty,
body.marketplace-surface .auth-terms-error:empty {
    display: none;
}

body.marketplace-surface .auth-validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

body.marketplace-surface .auth-notice {
    margin: 0 0 13px;
    padding: 10px 12px;
    font-size: 11px;
}

html[data-color-scheme="dark"] body.marketplace-surface .auth-card,
html[data-color-scheme="dark"] body.marketplace-surface .auth-field {
    background: #fff;
    color: var(--auth-text);
}

@media (max-width: 980px) {
    body.marketplace-surface .auth-marketplace,
    body.marketplace-surface .auth-register-page {
        min-height: auto;
    }

    body.marketplace-surface .auth-marketplace-inner,
    body.marketplace-surface .auth-register-page .auth-marketplace-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
        width: min(calc(100% - 32px), 680px);
        padding-block: 44px 58px;
    }

    body.marketplace-surface .auth-card {
        order: 1;
    }

    body.marketplace-surface .auth-marketplace-copy {
        order: 2;
        max-width: 100%;
    }

    body.marketplace-surface .auth-marketplace-copy h1 {
        max-width: 620px;
        font-size: clamp(38px, 7vw, 52px);
    }

    body.marketplace-surface .auth-card {
        max-width: 520px;
        margin-inline: auto;
    }
}

@media (max-width: 600px) {
    body.marketplace-surface:has(.auth-marketplace) .market-support-fab {
        display: none;
    }

    body.marketplace-surface .auth-marketplace-inner,
    body.marketplace-surface .auth-register-page .auth-marketplace-inner {
        width: min(calc(100% - 24px), 520px);
        gap: 28px;
        padding-block: 32px 52px;
    }

    body.marketplace-surface .auth-eyebrow {
        margin-bottom: 17px;
    }

    body.marketplace-surface .auth-marketplace-copy h1 {
        font-size: clamp(34px, 10.3vw, 43px);
        line-height: 1.07;
    }

    body.marketplace-surface .auth-marketplace-copy h1 em {
        white-space: normal;
    }

    body.marketplace-surface .auth-lead {
        margin: 18px 0 24px;
        font-size: 13px;
    }

    body.marketplace-surface .auth-benefits {
        grid-template-columns: 1fr;
    }

    body.marketplace-surface .auth-benefits > span,
    body.marketplace-surface .auth-benefits > span + span {
        padding: 14px 0 0;
        border-left: 0;
    }

    body.marketplace-surface .auth-card,
    body.marketplace-surface .auth-register-card {
        border-radius: 14px;
        padding: 22px 18px;
    }

    body.marketplace-surface .auth-name-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    body.marketplace-surface .auth-card-header h2 {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.marketplace-surface .auth-field,
    body.marketplace-surface .auth-submit,
    body.marketplace-surface .auth-password-toggle {
        transition-duration: .01ms !important;
    }
}
