/**
 * GPS account screens (log in, create account, reset password).
 * Loaded on My Account for logged-out visitors only. Uses the tokens from
 * gps-forms.css. Everything hangs off #gps-auth so the Elementor My Account
 * widget and theme rules (many-class selectors) don't leak in.
 */

#gps-auth {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    max-width: 960px;
    margin: 0 auto;
    background: var(--gps-paper);
    border-radius: var(--gps-card-radius);
    box-shadow: var(--gps-card-shadow);
    overflow: hidden;
    font-family: var(--gps-font);
    color: var(--gps-ink);
    text-align: left;
}

#gps-auth *,
#gps-auth *::before,
#gps-auth *::after {
    box-sizing: border-box;
}

/* ---------- navy side panel ---------- */

#gps-auth .gps-auth__panel {
    background: linear-gradient(160deg, var(--gps-navy) 0%, var(--gps-navy-deep) 100%);
    color: #fff;
    padding: 40px 34px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#gps-auth .gps-auth__logo {
    width: 180px;
    height: auto;
    max-width: 100%;
}

#gps-auth .gps-auth__pitch {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

#gps-auth .gps-auth__pitch em {
    font-style: normal;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: var(--gps-gold);
}

#gps-auth .gps-auth__perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

#gps-auth .gps-auth__perks li {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 12px;
    align-items: start;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #dfe5f1;
}

#gps-auth .gps-auth__perks b {
    display: block;
    color: #fff;
    font-weight: 600;
}

#gps-auth .gps-auth__ico {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(221, 200, 157, 0.16);
    color: var(--gps-gold);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}

#gps-auth .gps-auth__pace {
    margin: auto 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    line-height: 1.5;
    color: #b9c3d8;
}

/* ---------- form side ---------- */

#gps-auth .gps-auth__main {
    align-self: center;
    padding: 36px 40px 40px;
    min-width: 0;
}

#gps-auth .gps-auth__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--gps-field);
    border: 1px solid var(--gps-line);
    border-radius: 10px;
    padding: 4px;
    margin: 0 0 26px;
}

#gps-auth .gps-auth__tabs a {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gps-muted);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

#gps-auth .gps-auth__tabs a:hover {
    color: var(--gps-navy);
}

#gps-auth .gps-auth__tabs a[aria-selected="true"] {
    background: var(--gps-paper);
    color: var(--gps-navy);
    box-shadow: 0 1px 3px rgba(18, 38, 74, 0.14);
}

#gps-auth .gps-auth__view[hidden],
#gps-auth [hidden] {
    display: none !important;
}

#gps-auth .gps-auth__title {
    margin: 0 0 6px;
    font-family: var(--gps-font);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gps-navy);
}

#gps-auth .gps-auth__sub {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--gps-muted);
}

#gps-auth .gps-auth__form {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

#gps-auth .gps-step,
#gps-auth .gps-auth__form {
    display: grid;
    gap: 18px;
}

#gps-auth .gps-reg .gps-step:not(.is-active) {
    display: none;
}

/* Inside a step the grid gap already separates title and subtitle */
#gps-auth .gps-step > .gps-auth__title {
    margin: 0;
}

#gps-auth .gps-step > .gps-auth__sub {
    margin: -12px 0 2px;
}

#gps-auth .gps-auth__foot {
    margin: 0;
    text-align: center;
    font-size: 14px;
    color: var(--gps-muted);
}

#gps-auth .gps-auth__between {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

/* ---------- steps ---------- */

#gps-auth .gps-steps {
    display: flex;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

#gps-auth .gps-steps li {
    flex: 1;
    display: grid;
    gap: 7px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gps-muted);
}

#gps-auth .gps-steps li::before {
    content: "";
    height: 4px;
    border-radius: 4px;
    background: var(--gps-line);
    transition: background-color .2s ease;
}

#gps-auth .gps-steps li.is-done::before,
#gps-auth .gps-steps li.is-current::before {
    background: var(--gps-blue);
}

#gps-auth .gps-steps li.is-current {
    color: var(--gps-navy);
}

/* ---------- fields ---------- */

#gps-auth .gps-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

#gps-auth .gps-field {
    display: grid;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

#gps-auth .gps-field > label,
#gps-auth .gps-field__label {
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gps-ink);
}

#gps-auth .gps-opt {
    font-weight: 500;
    color: var(--gps-muted);
}

#gps-auth input[type="text"],
#gps-auth input[type="email"],
#gps-auth input[type="password"],
#gps-auth input[type="tel"],
#gps-auth select {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 13px;
    font-family: var(--gps-font);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--gps-ink);
    background: var(--gps-field);
    border: 1.5px solid var(--gps-line);
    border-radius: var(--gps-radius);
    box-shadow: none;
    outline: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

#gps-auth select {
    appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6880' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

#gps-auth input::placeholder {
    color: #657187;
    opacity: 1;
}

#gps-auth input[type="text"]:focus,
#gps-auth input[type="email"]:focus,
#gps-auth input[type="password"]:focus,
#gps-auth input[type="tel"]:focus,
#gps-auth select:focus {
    border-color: var(--gps-blue);
    background-color: var(--gps-paper);
    box-shadow: var(--gps-focus);
}

#gps-auth .gps-field.is-invalid input,
#gps-auth .gps-field.is-invalid select {
    border-color: var(--gps-err);
    background-color: var(--gps-paper);
}

#gps-auth .gps-field__err {
    display: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gps-err);
}

#gps-auth .gps-field.is-invalid .gps-field__err {
    display: block;
}

#gps-auth .gps-field__hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--gps-muted);
}

/* password + show button */
#gps-auth .gps-pw {
    position: relative;
    display: block;
}

#gps-auth .gps-pw input {
    padding-right: 64px;
}

#gps-auth .gps-pw__toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    margin: 0;
    padding: 5px 8px;
    min-height: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    font-family: var(--gps-font);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--gps-blue);
    cursor: pointer;
}

#gps-auth .gps-pw__toggle:hover,
#gps-auth .gps-pw__toggle:focus {
    background: rgba(11, 82, 172, 0.08);
    color: var(--gps-blue);
}

#gps-auth .gps-meter {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: var(--gps-line);
    overflow: hidden;
}

#gps-auth .gps-meter > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gps-err);
    transition: width .2s ease, background-color .2s ease;
}

/* checkbox rows */
#gps-auth .gps-check {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--gps-ink);
    cursor: pointer;
}

#gps-auth .gps-auth__between .gps-check {
    grid-template-columns: 18px auto;
}

#gps-auth .gps-check input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--gps-navy);
    cursor: pointer;
}

#gps-auth .gps-check a {
    color: var(--gps-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- code boxes ---------- */

#gps-auth .gps-code {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    max-width: 380px;
}

#gps-auth .gps-code input {
    min-height: 56px;
    padding: 10px 0;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gps-navy);
}

#gps-auth .gps-field.is-invalid .gps-code input {
    border-color: var(--gps-err);
}

/* ---------- interest chips ---------- */

#gps-auth .gps-field--group legend {
    margin-bottom: 8px;
    float: none;
    width: auto;
}

#gps-auth .gps-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#gps-auth .gps-chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

#gps-auth .gps-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

#gps-auth .gps-chip span {
    display: inline-block;
    padding: 8px 13px;
    border: 1.5px solid var(--gps-line);
    border-radius: 999px;
    background: var(--gps-paper);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gps-ink);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

#gps-auth .gps-chip:hover span {
    border-color: var(--gps-blue);
}

#gps-auth .gps-chip input:checked + span {
    background: var(--gps-navy);
    border-color: var(--gps-navy);
    color: #fff;
}

#gps-auth .gps-chip input:focus-visible + span {
    outline: 3px solid rgba(11, 82, 172, 0.45);
    outline-offset: 2px;
}

/* ---------- buttons and links ---------- */

#gps-auth .gps-btn {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 14px 20px;
    border: 0;
    border-radius: var(--gps-radius);
    background: var(--gps-navy);
    box-shadow: none;
    font-family: var(--gps-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    opacity: 1;
    transition: background-color .15s ease;
}

#gps-auth .gps-btn:hover,
#gps-auth .gps-btn:focus {
    background: var(--gps-blue);
    color: #fff;
}

#gps-auth .gps-btn[disabled],
#gps-auth .gps-btn.is-busy {
    opacity: .6;
    cursor: progress;
}

#gps-auth .gps-link {
    display: inline;
    margin: 0;
    padding: 0;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-family: var(--gps-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gps-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-transform: none;
    cursor: pointer;
}

#gps-auth .gps-link:hover,
#gps-auth .gps-link:focus {
    background: none;
    color: var(--gps-navy);
}

#gps-auth .gps-link[disabled] {
    color: var(--gps-muted);
    text-decoration: none;
    cursor: default;
}

#gps-auth .gps-btn:focus-visible,
#gps-auth .gps-link:focus-visible,
#gps-auth .gps-auth__tabs a:focus-visible,
#gps-auth .gps-pw__toggle:focus-visible {
    outline: 3px solid rgba(11, 82, 172, 0.45);
    outline-offset: 2px;
}

/* ---------- alerts ---------- */

#gps-auth .gps-alert {
    padding: 12px 14px;
    border-radius: var(--gps-radius);
    background: var(--gps-err-tint);
    color: var(--gps-err);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

#gps-auth .gps-alert--ok {
    background: var(--gps-ok-tint);
    color: var(--gps-ok);
}

#gps-auth .gps-alert a,
#gps-auth .gps-alert button {
    color: inherit;
    font-weight: 700;
}

/* ---------- small screens ---------- */

@media (max-width: 820px) {
    #gps-auth {
        grid-template-columns: 1fr;
    }

    #gps-auth .gps-auth__panel {
        padding: 22px 20px;
        gap: 12px;
    }

    #gps-auth .gps-auth__pitch {
        font-size: 17px;
    }

    #gps-auth .gps-auth__perks,
    #gps-auth .gps-auth__pace {
        display: none;
    }

    #gps-auth .gps-auth__logo {
        width: 140px;
    }

    #gps-auth .gps-auth__main {
        padding: 24px 18px 28px;
    }
}

@media (max-width: 480px) {
    #gps-auth .gps-row2 {
        grid-template-columns: 1fr;
    }

    #gps-auth .gps-code {
        gap: 6px;
    }

    #gps-auth .gps-code input {
        min-height: 50px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #gps-auth *,
    #gps-auth *::before {
        transition: none !important;
    }
}

/* WooCommerce adds its own eye button to every password field; ours ("Show") stays */
#gps-auth .show-password-input {
    display: none !important;
}

/* Confirmation screen: title, message and link without a form around them */
#gps-auth .gps-auth__title + .gps-alert {
    margin-top: 14px;
}

#gps-auth .gps-alert + .gps-auth__foot {
    margin-top: 20px;
}


/* ---------- terms / privacy modal ---------- */

#gps-legal.gps-legal {
    width: min(760px, calc(100vw - 32px));
    max-height: min(84vh, 900px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--gps-card-radius);
    background: var(--gps-paper);
    color: var(--gps-ink);
    font-family: var(--gps-font);
    box-shadow: 0 30px 80px -20px rgba(12, 22, 48, 0.55);
    overflow: hidden;
}

#gps-legal.gps-legal[open] {
    display: flex;
    flex-direction: column;
}

#gps-legal.gps-legal::backdrop {
    background: rgba(12, 22, 48, 0.55);
}

#gps-legal .gps-legal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--gps-navy);
    color: #fff;
}

#gps-legal .gps-legal__title {
    margin: 0;
    font-family: var(--gps-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

#gps-legal .gps-legal__close {
    flex: none;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    color: #fff;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
}

#gps-legal .gps-legal__close:hover,
#gps-legal .gps-legal__close:focus {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

#gps-legal .gps-legal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 22px 28px 8px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--gps-ink);
    outline: none;
}

#gps-legal .gps-legal__body h3,
#gps-legal .gps-legal__body h4,
#gps-legal .gps-legal__body h5 {
    margin: 22px 0 8px;
    font-family: var(--gps-font);
    font-weight: 700;
    line-height: 1.35;
    color: var(--gps-navy);
}

#gps-legal .gps-legal__body h3 { font-size: 18px; }
#gps-legal .gps-legal__body h4 { font-size: 16px; }
#gps-legal .gps-legal__body h5 { font-size: 15px; }
#gps-legal .gps-legal__body > :first-child { margin-top: 0; }

#gps-legal .gps-legal__body p,
#gps-legal .gps-legal__body ul,
#gps-legal .gps-legal__body ol {
    margin: 0 0 12px;
}

#gps-legal .gps-legal__body ul,
#gps-legal .gps-legal__body ol {
    padding-left: 22px;
}

#gps-legal .gps-legal__body li {
    margin: 0 0 4px;
}

#gps-legal .gps-legal__body a,
#gps-legal .gps-link {
    color: var(--gps-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#gps-legal .gps-legal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid var(--gps-line);
    background: var(--gps-field);
    font-size: 14px;
}

#gps-legal .gps-btn--inline {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 11px 22px;
    border: 0;
    border-radius: var(--gps-radius);
    background: var(--gps-navy);
    box-shadow: none;
    font-family: var(--gps-font);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

#gps-legal .gps-btn--inline:hover,
#gps-legal .gps-btn--inline:focus {
    background: var(--gps-blue);
    color: #fff;
}

/* topics group error */
#gps-auth .gps-field--group.is-invalid .gps-chip span {
    border-color: var(--gps-err);
}

#gps-auth .gps-field--group .gps-field__err {
    margin-top: 8px;
}

@media (max-width: 480px) {
    #gps-legal .gps-legal__body {
        padding: 18px 18px 6px;
    }
}

#gps-legal .gps-legal__body {
    overscroll-behavior: contain;
}

#gps-legal .gps-legal__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

#gps-legal .gps-btn--inline:focus-visible {
    outline: 3px solid rgba(11, 82, 172, 0.45);
    outline-offset: 2px;
}
