body.c7-redesign #loginModal .modal-dialog {
    max-width: 920px;
    width: calc(100% - 24px);
}

body.c7-redesign #loginModal.modal,
body.c7-redesign #loginModal.modal.fade,
body.c7-redesign #loginModal.modal.show {
    z-index: 1300;
    opacity: 1;
    transition: none;
}

/* The backdrop below sits at 1290 (above the redesign header/drawers), so every Bootstrap
   modal must sit above it too. Without this, modals that weren't listed individually
   (e.g. the withdrawal "Bank Detail" / Interac modals) opened UNDER the dark backdrop:
   the screen went dark and the form couldn't be used. Named modals keep their own
   higher z-index (#loginModal 1300, crypto/card verification 1400). */
body.c7-redesign .modal {
    z-index: 1300;
}

body.c7-redesign.modal-open .modal-backdrop {
    z-index: 1290;
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    transition: none;
}

body.c7-redesign #loginModal .auth-modal-content,
body.c7-redesign #loginModal .modal-body,
body.c7-redesign #loginModal .auth-modal-main {
    background-color: #141011;
    opacity: 1;
}

body.c7-redesign #loginModal .auth-modal-content {
    color: var(--c7-text);
    border: 1px solid var(--c7-line);
    border-radius: var(--c7-r-panel);
    overflow: hidden;
    position: relative;
}

body.c7-redesign #loginModal .auth-modal-x {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
}

body.c7-redesign #loginModal .auth-modal-columns {
    display: grid;
    grid-template-columns: 1fr;
}

body.c7-redesign #loginModal .auth-modal-side {
    display: none;
    position: relative;
    min-height: 100%;
    padding: 28px 22px;
    background:
        radial-gradient(ellipse 80% 70% at 80% 20%, rgba(213, 43, 30, .45), transparent 60%),
        #2a0907;
}

body.c7-redesign #loginModal .auth-promo-title {
    color: var(--c7-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.c7-redesign #loginModal .auth-promo-hero-text {
    font-family: var(--c7-font-display);
    font-weight: 800;
    font-stretch: 112%;
    font-size: 34px;
    line-height: 0.95;
    margin: 8px 0;
}

body.c7-redesign #loginModal .auth-side-art-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 300px;
    width: 100%;
    margin: 4px 0 0;
}

body.c7-redesign #loginModal .auth-side-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: contain;
    object-position: 50% 100%;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

body.c7-redesign #loginModal .auth-side-badges {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

body.c7-redesign #loginModal .auth-side-badge {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--c7-text-2);
    font-size: 13px;
    font-weight: 700;
}

body.c7-redesign #loginModal .auth-side-legal {
    margin: 12px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--c7-text-muted);
}

body.c7-redesign #loginModal .auth-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 48px 14px 0;
    padding: 8px 14px 8px 8px;
    border-radius: 12px;
    background: linear-gradient(90deg, #3a0a07, #1c0605);
    border: 1px solid rgba(213, 43, 30, 0.5);
}

body.c7-redesign #loginModal .auth-compact img {
    width: 44px;
    height: 48px;
    object-fit: cover;
    object-position: 50% 12%;
    border-radius: 8px;
    flex-shrink: 0;
}

body.c7-redesign #loginModal .auth-compact__kicker {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff7a6e;
}

body.c7-redesign #loginModal .auth-compact strong {
    display: block;
    font-family: var(--c7-font-display);
    font-weight: 900;
    font-stretch: 112%;
    font-size: 19px;
    line-height: 1.05;
}

body.c7-redesign #loginModal .auth-modal-main {
    padding: 22px 16px 18px;
}

body.c7-redesign #loginModal .auth-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

body.c7-redesign #loginModal .auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 300px;
    gap: 0;
    padding: 4px;
    border-radius: var(--c7-r-pill);
    background: #0b0809;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
}

body.c7-redesign #loginModal .auth-tab {
    min-height: 44px;
    border: 0;
    border-radius: var(--c7-r-pill);
    background: transparent;
    color: var(--c7-text-2);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

body.c7-redesign #loginModal .auth-tab.active {
    background: var(--c7-primary);
    color: #fff;
}

body.c7-redesign #loginModal .auth-pane-title {
    font-family: var(--c7-font-display);
    font-size: 28px;
    font-weight: 900;
    font-stretch: 112%;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 6px 0 12px;
}

body.c7-redesign #loginModal .auth-field {
    margin-bottom: 10px;
}

body.c7-redesign #loginModal .auth-field > label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.c7-redesign #loginModal .field-wrap,
body.c7-redesign #loginModal .phone-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #171314;
}

body.c7-redesign #loginModal .auth-ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #ff4a3d;
}

body.c7-redesign #loginModal .auth-ico .c7-icon {
    width: 16px;
    height: 16px;
}

body.c7-redesign #loginModal .field-wrap input,
body.c7-redesign #loginModal .field-wrap select,
body.c7-redesign #loginModal .phone-number {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    padding: 0;
}

body.c7-redesign #loginModal .field-wrap select {
    appearance: none;
    cursor: pointer;
    padding-right: 28px;
    /* Native option list follows the dark theme (Chrome/Android/iOS). Without it the list was
       white and the options inherited white text, so only the highlighted one was readable. */
    color-scheme: dark;
}

body.c7-redesign #loginModal .field-wrap select option {
    background: #1b1718;
    color: #fff;
}

/* Dropdown arrow (appearance:none removed the native one, so the fields didn't look tappable). */
body.c7-redesign #loginModal .field-wrap:has(select) {
    position: relative;
}

body.c7-redesign #loginModal .field-wrap:has(select)::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #a39a9e;
    border-bottom: 2px solid #a39a9e;
    transform: rotate(45deg);
    pointer-events: none;
}

/* Browser autofill painted fields light blue with dark text on the dark form. */
body.c7-redesign #loginModal input:-webkit-autofill,
body.c7-redesign #loginModal input:-webkit-autofill:hover,
body.c7-redesign #loginModal input:-webkit-autofill:focus,
body.c7-redesign #loginModal select:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #141011 inset;
    box-shadow: 0 0 0 1000px #141011 inset;
    transition: background-color 9999s ease-out 0s;
}

body.c7-redesign #loginModal .field-wrap:has(.toggle-password) input {
    padding-right: 36px;
}

body.c7-redesign #loginModal .field-wrap:has(.is-invalid),
body.c7-redesign #loginModal .phone-wrap:has(.is-invalid) {
    border-color: #ef4444;
}

body.c7-redesign #loginModal .phone-number {
    padding: 0 12px;
}

body.c7-redesign #loginModal .field-wrap input::placeholder,
body.c7-redesign #loginModal .phone-number::placeholder {
    color: #8f8589;
}

body.c7-redesign #loginModal .toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--c7-text-muted);
    cursor: pointer;
}

body.c7-redesign #loginModal .is-invalid {
    border-color: #ef4444 !important;
}

body.c7-redesign #loginModal .auth-field-error,
body.c7-redesign #loginModal .auth-alert {
    color: #ffb4ae;
    background: rgba(213, 43, 30, 0.15);
    border-radius: 8px;
    padding: 6px 8px;
    margin-top: 4px;
    font-size: 13px;
}

body.c7-redesign #loginModal .phone-wrap {
    padding-left: 0;
    gap: 0;
}

body.c7-redesign #loginModal .phone-code-box {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

body.c7-redesign #loginModal .phone-code {
    width: 64px;
    border: 0;
    background: transparent;
    color: #fff;
}

body.c7-redesign #loginModal .auth-check-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--c7-text-2);
}

body.c7-redesign #loginModal .auth-check-item input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex: 0 0 auto;
}

body.c7-redesign #loginModal .btn-auth-submit {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: var(--c7-r-sm);
    background: var(--c7-primary);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    margin-top: 8px;
}

body.c7-redesign #loginModal .btn-auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.c7-redesign #loginModal .btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    box-sizing: border-box;
    border-radius: 999px;
    border: 1px solid #DADCE0;
    background: #FFFFFF;
    color: #1F1F1F;
    text-decoration: none;
    font-family: var(--c7-font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    /* Links inherit transition:all 0.5s, which animates the focus ring in from the browser default. */
    transition: none;
}

body.c7-redesign #loginModal .btn-google:hover {
    background: #F8F9FA;
    border-color: #DADCE0;
    color: #1F1F1F;
}

body.c7-redesign #loginModal .btn-google:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    background: #F8F9FA;
    color: #1F1F1F;
}

body.c7-redesign #loginModal .btn-google__mark {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: block;
}

body.c7-redesign #loginModal .auth-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--c7-text-faint);
    font-size: 12px;
    margin: 12px 0;
}

body.c7-redesign #loginModal .auth-divider::before,
body.c7-redesign #loginModal .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--c7-line);
}

body.c7-redesign #loginModal .c7-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

body.c7-redesign #loginModal .c7-steps i {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--c7-line);
}

body.c7-redesign #loginModal .c7-steps i.is-on {
    background: var(--c7-primary);
}

body.c7-redesign #loginModal .c7-reg-step[hidden] {
    display: none !important;
}

/* Step 2 header: "‹ Back" link on the left, "Step 2 of 2" on the right (Back used to be a
   separate ghost button under Continue). */
body.c7-redesign #loginModal .c7-reg-steprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

body.c7-redesign #loginModal .c7-reg-steprow p {
    margin: 0;
}

/* On phones the close button stays pinned while the form scrolls; keep "Step 2 of 2" clear of it. */
@media (max-width: 640px) {
    body.c7-redesign #loginModal .c7-reg-steprow { padding-right: 48px; }
}

body.c7-redesign #loginModal .c7-reg-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    margin-left: -6px;
    padding: 4px 10px 4px 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #d6cfd1;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

body.c7-redesign #loginModal .c7-reg-back .c7-icon {
    width: 18px;
    height: 18px;
}

body.c7-redesign #loginModal .c7-reg-back:hover,
body.c7-redesign #loginModal .c7-reg-back:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

body.c7-redesign #loginModal .auth-row {
    display: grid;
    gap: 8px;
}

@media (min-width: 700px) {
    body.c7-redesign #loginModal .auth-row--2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 899.98px) {
    body.c7-redesign #loginModal.modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 100dvh;
        max-height: 100dvh;
        box-sizing: border-box;
        overflow: hidden;
        padding:
            max(12px, env(safe-area-inset-top, 0px))
            max(12px, env(safe-area-inset-right, 0px))
            max(12px, env(safe-area-inset-bottom, 0px))
            max(12px, env(safe-area-inset-left, 0px));
    }

    body.c7-redesign #loginModal .modal-dialog {
    margin: auto;
    width: 100%;
    max-width: min(100%, calc(100vw - 24px));
    min-width: 0;
    min-height: 0;
        height: auto;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        transform: none;
    }

    body.c7-redesign #loginModal .auth-modal-content {
        border-radius: 20px;
        width: 100%;
        max-height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background-color: #141011;
        opacity: 1;
    }

    body.c7-redesign #loginModal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        overscroll-behavior: contain;
    }

    body.c7-redesign #loginModal .auth-modal-side,
    body.c7-redesign #loginModal .auth-side-art-wrap {
        display: none !important;
    }
}

@media (min-width: 900px) {
    body.c7-redesign #loginModal .modal-dialog {
        max-width: 940px;
    }

    body.c7-redesign #loginModal .auth-modal-columns {
        grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
        min-height: min(760px, calc(100dvh - 48px));
    }

    body.c7-redesign #loginModal .auth-modal-side {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: hidden;
    }

    body.c7-redesign #loginModal .auth-side-art-wrap {
        flex: 1 1 auto;
        min-height: 340px;
        margin: 8px -22px 0;
    }

    body.c7-redesign #loginModal .auth-modal-main {
        padding: 28px 24px;
    }

    body.c7-redesign #loginModal .auth-compact {
        display: none;
    }

    body.c7-redesign #loginModal .auth-modal-content {
        max-height: calc(100dvh - 32px);
        overflow: auto;
    }
}

body.c7-redesign .c7-exit[hidden] {
    display: none !important;
}

body.c7-redesign .c7-exit {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding:
        max(12px, env(safe-area-inset-top, 0px))
        max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
}

body.c7-redesign .c7-exit__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

body.c7-redesign .c7-exit__panel {
    position: relative;
    width: min(440px, 100%);
    max-width: min(440px, calc(100vw - 24px));
    min-width: 0;
    max-height: 100%;
    min-height: 0;
    margin: auto;
    border-radius: 18px;
    background: radial-gradient(ellipse 90% 70% at 50% 0%, #5a0d08 0%, #1c0605 70%, #0f0606 100%);
    border: 1px solid rgba(213, 43, 30, 0.6);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    text-align: center;
    color: #fff;
}

body.c7-redesign .c7-exit__scroll {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

body.c7-redesign .c7-exit__moose {
    width: auto;
    height: auto;
    max-width: min(180px, 46vw);
    max-height: min(170px, 28dvh);
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6));
}

body.c7-redesign .c7-exit__eye {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ff7a6e;
}

body.c7-redesign .c7-exit__panel h2 {
    margin: 0;
    font-family: var(--c7-font-display);
    font-weight: 900;
    font-stretch: 115%;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.03em;
    text-wrap: balance;
    color: #fff;
}

body.c7-redesign .c7-exit__sub,
body.c7-redesign .c7-exit__fine {
    margin: 0;
}

body.c7-redesign .c7-exit__sub {
    font-size: 15px;
    color: #d6cfd1;
}

body.c7-redesign .c7-exit__claim {
    width: 100%;
    height: 56px;
    margin-top: 6px;
    border-radius: 12px;
    border: 0;
    background: #d52b1e;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(213, 43, 30, 0.5);
}

body.c7-redesign .c7-exit__claim:hover {
    background: #ee3526;
}

body.c7-redesign .c7-exit__no {
    height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #a39a9e;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

body.c7-redesign .c7-exit__fine {
    font-size: 11px;
    color: #a39a9e;
}

body.c7-redesign .c7-exit__x {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 10px;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

html:has(body.c7-redesign.modal-open),
html:has(body.c7-redesign.c7-exit-open),
html:has(body.c7-redesign.c7-exchange-open),
body.modal-open.c7-redesign,
body.c7-redesign.c7-exit-open,
body.c7-redesign.c7-exchange-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.modal-open.c7-redesign {
    padding-right: 0 !important;
}

body.c7-redesign #exchangeModal.modal-overlay {
    box-sizing: border-box;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding:
        max(12px, env(safe-area-inset-top, 0px))
        max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
}

body.c7-redesign #exchangeModal .exchange-modal {
    width: min(380px, 100%);
    max-width: min(100%, calc(100vw - 24px));
    min-width: 0;
    max-height: 100%;
    margin: auto;
    overflow: auto;
    overscroll-behavior: contain;
}

body.c7-redesign #exchangeModal .modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}
