/* Skin 3 "vega" — sign in / sign up / forgot / reset + slide captcha (cwallet.com/login layout).
   Class names .ap-* are the contract nova-auth-modal.js toggles states on. */

.vh--auth { justify-content: space-between; box-shadow: none; }
.vh--auth .va-back { transform: rotate(180deg); }
html.ap-lock, html.ap-lock body { overflow: hidden; overscroll-behavior: none; }

/* page: the art panel (left) + the form column (right), all on black */
body.v-authp { background: #000; }
.va { display: flex; min-height: calc(100vh / var(--vz, 1)); min-height: calc(100svh / var(--vz, 1)); background: #000; }
.va-side { display: flex; justify-content: center; align-items: flex-start; flex: none; width: 640px; padding: 24px 100px 24px 24px; }
.va-card { box-sizing: border-box; display: flex; flex-direction: column; flex: none; width: 100%; min-height: 100%; max-width: 516px; padding: 40px 44px 32px; border: 0; border-radius: 28px; background: radial-gradient(120% 60% at 100% 0%, rgba(171, 225, 39, .06), transparent 55%), var(--v-surface); }
/* the form sits in the middle of the card: equal auto space above the title and below the last control */
.va-card > .ap-pane { display: flex; flex: 1; flex-direction: column; padding-top: 40px; }
.va-card > .ap-pane > .va-head { margin-top: auto; }
.va-card > .ap-pane:not(:has(> .va-note))::after { content: ""; flex: none; height: 24px; margin-top: auto; }
.va-card > .ap-pane[hidden] { display: none; }
.va-brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; color: var(--v-t1); }
.va-brand img { display: block; width: auto; height: 27px; max-width: 180px; object-fit: contain; }
.va-brand span { font: 700 24px/1 var(--v-font); letter-spacing: -.035em; white-space: nowrap; }
.va-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.va-title { min-width: 0; font: 700 36px/1.1 var(--v-font); letter-spacing: -.035em; color: var(--v-t1); }
.va-swap { display: inline-flex; align-items: center; flex: none; height: 38px; padding: 0 16px; border-radius: 99px; background: var(--v-raised); color: var(--v-t1); font: 600 14px/1 var(--v-font); white-space: nowrap; transition: background-color .15s var(--v-ease); }
.va-swap:hover { background: #303136; color: var(--v-t1); }
.va-swap__ico { display: none; }
.va-lede { margin-top: 12px; color: var(--v-t2); font-size: 15px; line-height: 1.55; }
.va-tabs { display: flex; gap: 22px; margin-top: 46px; }
.va-tabs span { color: var(--v-t3); font: 500 16px/1 var(--v-font); }
.va-tabs .is-on { color: var(--v-t1); font-weight: 600; }

/* the button: cwallet's dark slab with lime type, never dark-on-dark */
.va-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 28px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--v-brand); color: var(--v-brand-ink); font: 600 16px/1.2 var(--v-font); cursor: pointer; transition: background-color .15s, opacity .15s; }
.va-btn:hover:not(:disabled) { background: var(--v-brand-hover); }
/* the recolour bridge greys every .ap-submit on hover; the lime auth button keeps its colour */
body.vega .va-btn.ap-submit:hover:not(:disabled) { background: var(--v-brand-hover); }
body.vega .va-btn.ap-submit:disabled:hover { background: var(--v-brand); }
.va-btn:disabled { opacity: .35; cursor: not-allowed; }
.va-note { margin-top: auto; padding-top: 40px; color: var(--v-t3); font-size: 12px; line-height: 1.6; text-align: center; }
.va-note a { color: var(--v-t2); }
.va-note a:hover { color: var(--v-t1); }

/* the art panel: the domain's name in dots, lying on a diagonal and drifting along it, with a typed line on top */
.va-art { position: relative; flex: 1; min-width: 0; overflow: hidden; user-select: none; -webkit-user-select: none; background: #000; container-type: size; }
.va-art__word { position: absolute; left: 50%; top: 50%; width: 260cqmax; transform: translate(-50%, -50%) rotate(52deg); -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }
.va-art__track { display: flex; width: max-content; gap: .28em; font: 800 42cqmin/1 var(--v-font); letter-spacing: -.05em; white-space: nowrap; animation: va-drift 70s linear infinite; }
.va-art__track span { color: transparent; background: radial-gradient(circle, #34373d 0 1.6px, transparent 2.1px) 0 0 / 8px 8px; -webkit-background-clip: text; background-clip: text; }
@keyframes va-drift { to { transform: translateX(calc(-50% - .14em)); } }
.va-art__type { position: absolute; left: 50%; top: 50%; z-index: 1; display: flex; align-items: center; height: 40px; margin: 0; transform: translate(-50%, -50%); white-space: nowrap; font: 800 36px/40px var(--v-font); letter-spacing: -.02em; }
.va-art__type span { color: #fff; }
.va-art__caret { display: block; flex: none; width: 3px; height: 40px; margin-left: 2px; border-radius: 1px; background: var(--v-brand); animation: va-caret 1s steps(1) infinite; }
@keyframes va-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .va-art__track, .va-art__caret { animation: none; } }

.va-fields { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.va-fields[hidden] { display: none; }
.va-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* field */
.ap-field { display: block; }
.ap-field[hidden] { display: none; }
.ap-pane > .ap-field { margin-top: 28px; }
.ap-field__label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--v-t2); font-size: 13px; font-weight: 500; }
.ap-field__box { position: relative; display: flex; align-items: center; height: 52px; border: 1px solid transparent; border-radius: 14px; background: var(--v-field); transition: border-color .15s, background-color .15s; }
.ap-field__box[hidden] { display: none; }
.ap-field__box:hover { background: #292a2f; }
.ap-field__box:focus-within { border-color: var(--v-focus); }
.ap-field__box.is-invalid { border-color: var(--v-down); }
.ap-input { flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 0; background: none; color: var(--v-t1); font: 500 16px/1 var(--v-font); outline: none; }
.ap-input::placeholder { color: var(--v-t3); font-weight: 400; }
/* browser autofill (a saved email / password): the field keeps its own look — no square plate painted over the
   rounded box (the input itself is square; the rounding is on .ap-field__box). The fill colour change is held off
   by an endless transition, and the input takes the box's left rounding in case a browser paints anyway. */
.ap-input { border-radius: 13px 0 0 13px; }
.ap-input:is(:-webkit-autofill, :autofill), .ap-input:is(:-webkit-autofill, :autofill):is(:hover, :focus) { -webkit-text-fill-color: var(--v-t1); -webkit-box-shadow: none; box-shadow: none; caret-color: var(--v-t1); transition: background-color 9999999s ease-in 0s, color 9999999s ease-in 0s; }
.ap-input--code { letter-spacing: .4em; font-variant-numeric: tabular-nums; font-weight: 600; }
.ap-field__btn { display: grid; place-items: center; width: 36px; height: 36px; margin-right: 6px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--v-t3); cursor: pointer; }
.ap-field__btn[hidden] { display: none; }
.ap-field__btn:hover { color: var(--v-t1); }
.ap-field__btn .ap-eye-on { display: none; }
.ap-field__btn.is-shown .ap-eye { display: none; }
.ap-field__btn.is-shown .ap-eye-on { display: inline; }
.ap-field__btn span { display: inline-grid; }
.ap-hint { display: block; margin-top: 8px; color: var(--v-t3); font-size: 13px; line-height: 1.45; }
.ap-link { padding: 0; border: 0; background: none; color: var(--v-brand); font: 500 14px var(--v-font); cursor: pointer; }
.ap-link:hover { color: var(--v-brand-hover); text-decoration: underline; text-underline-offset: 3px; }
.ap-field__label .ap-link { color: var(--v-t2); font-size: 13px; }
.ap-field__label .ap-link:hover { color: var(--v-t1); }

/* promo code toggle */
.ap-promo-code__toggle { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--v-t2); font: 500 14px var(--v-font); cursor: pointer; }
.ap-promo-code__toggle:hover { color: var(--v-t1); }
.ap-promo-code__toggle svg { transition: transform .2s var(--v-ease); }
.ap-promo-code.is-open .ap-promo-code__toggle svg { transform: rotate(180deg); }
.ap-promo-code .ap-field__box { margin-top: 10px; }

/* terms checkbox */
.ap-check { position: relative; display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; color: var(--v-t1); font-size: 14px; line-height: 1.5; cursor: pointer; }
.ap-check input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 1px 0 0; cursor: pointer; }
.ap-check__box { display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--v-t3); border-radius: 5px; color: var(--v-brand-ink); transition: background-color .12s, border-color .12s; }
.ap-check__box svg { opacity: 0; transform: scale(.6); transition: opacity .12s, transform .15s; }
.ap-check input:checked + .ap-check__box { border-color: var(--v-brand); background: var(--v-brand); }
.ap-check input:checked + .ap-check__box svg { opacity: 1; transform: none; }
.ap-check input:focus-visible + .ap-check__box { outline: 2px solid var(--v-brand); outline-offset: 2px; }
.ap-check .ap-link { font-size: 14px; }

/* error / ok line */
.ap-error { display: flex; gap: 8px; margin-top: 10px; color: #ff5d6c; font-size: 14px; line-height: 1.45; }
.ap-error[hidden] { display: none; }
.ap-error.is-ok { color: var(--v-brand); }

.ap-alt { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; color: var(--v-t2); font-size: 14px; text-align: center; }
.ap-alt > span { color: var(--v-t4); }

/* slide captcha (nova-auth-modal.js) */
html.ap-cap-open { overflow: hidden; }
.ap-cap { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--v-mask); animation: v-fade .18s ease; }
.ap-cap[hidden] { display: none; }
.ap-cap__panel { width: 380px; max-width: 100%; padding: 20px 24px 24px; border-radius: var(--v-r-lg); background: var(--v-surface); box-shadow: 0 0 0 1px var(--v-line); }
.ap-cap__head { display: flex; align-items: center; justify-content: space-between; }
.ap-cap__title { font: 600 18px/1.3 var(--v-font); }
.ap-cap__icon { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--v-t2); cursor: pointer; }
.ap-cap__icon:hover { color: var(--v-t1); }
.ap-cap__hint { margin: 6px 0 16px; color: var(--v-t2); font-size: 14px; }
.ap-cap__stage { position: relative; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; border-radius: var(--v-r-md); background: var(--v-raised); outline: 2px solid transparent; outline-offset: -2px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: outline-color .16s ease; }
.ap-cap__bg { display: block; width: 100%; height: 100%; pointer-events: none; }
.ap-cap__bg:not([src]) { visibility: hidden; }
.ap-cap__piece { position: absolute; left: 0; top: 0; z-index: 1; width: 18.75%; height: auto; max-width: none; filter: none; cursor: grab; touch-action: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.ap-cap__piece[hidden] { display: none; }
.ap-cap.is-drag .ap-cap__piece { cursor: grabbing; filter: none; }
.ap-cap.is-busy .ap-cap__piece, .ap-cap.is-ok .ap-cap__piece { cursor: default; }
.ap-cap.is-loading .ap-cap__stage { animation: ap-cap-pulse 1.2s ease-in-out infinite; }
@keyframes ap-cap-pulse { 50% { opacity: .55; } }
.ap-cap.is-ok .ap-cap__stage { outline-color: var(--v-brand); }
.ap-cap.is-fail .ap-cap__stage { outline-color: var(--v-down); }
.ap-cap.is-fail .ap-cap__piece { animation: ap-cap-shake .36s ease; }
@keyframes ap-cap-shake { 20% { translate: -4px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.ap-cap.is-back .ap-cap__piece { transition: left .24s ease, top .24s ease; }

/* desktop: the page is exactly the window and never scrolls (the card fills its height, like cwallet's);
   on a short window only the form column scrolls, inside itself */
@media (min-width: 1024px) {
  html:has(body.v-authp), body.v-authp { height: 100%; overflow: hidden; }
  .va { height: calc(100vh / var(--vz, 1)); height: calc(100svh / var(--vz, 1)); min-height: 0; }
  .va-side { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .va-side::-webkit-scrollbar { display: none; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .va-card { padding-top: 32px; }
  .va-card > .ap-pane { padding-top: 28px; }
  .va-fields { margin-top: 24px; }
  .va-note { padding-top: 28px; }
}
@media (max-width: 1180px) {
  .va-side { width: 580px; padding: 24px 40px 24px 24px; }
  .va-art__type { font-size: 30px; }
}
@media (max-width: 1023px) {
  .va-art { display: none; }
  .va-side { width: 100%; padding: 40px 24px; }
  .va-card { max-width: 516px; }
}
@media (max-width: 767px) {
  .va-side { min-height: calc(100svh / var(--vz, 1)); padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
  .va-card { min-height: calc(calc(100svh / var(--vz, 1)) - 52px); }
  .va-card { max-width: none; padding: 0; border: 0; border-radius: 0; background: none; }
  .va-title { font-size: 30px; }
  .va-swap { height: 36px; padding: 0 14px; font-size: 14px; }
  .ap-input { font-size: 16px; }
  .ap-cap { align-items: flex-end; padding: 0; }
  .ap-cap__panel { width: 100%; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
}


/* ---------- sign-up password strength (vega-pw.js) ---------- */
.ap-pw__word { min-height: 16px; font-size: 13px; font-weight: 700; white-space: nowrap; will-change: transform, opacity; }
.ap-pw__bars { display: flex; gap: 6px; margin-top: 10px; }
.ap-pw__bars i { position: relative; flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ap-pw__bars i b { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; will-change: width; }
.ap-pw .ap-hint { margin-top: 10px; }
.ap-pw__eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ap-pw__eye [data-pw-pupil] { transform-box: fill-box; transform-origin: center; }
