/* Wik Desktop -- sign-in (owner C). port: activity_onboarding.xml (root on colorSurface; header; the step pages) + the Material3
   widgets it inflates under Base.Theme.Wik (themes.xml: colorPrimary c_accent, colorOnPrimary c_on_accent, colorSurface
   c_surface, colorOnSurface c_text, colorOnSurfaceVariant / textColorSecondary c_subtext, colorOutline c_border, colorError
   c_red). Text sizes are set inline by signin.js (core/size.js text(), the curve every layout literal takes). 1 dp = 1 px. */

.signin-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;       /* the sign-in owns the whole window (app.js's full slot) */
  box-sizing: border-box;
  background: var(--c-surface);
  color: var(--c-text);
  overflow: hidden;
}

/* header: vertical, paddingTop 40dp, paddingBottom 16dp, centred */
.signin-header {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 16px 0;
}
/* ibBack: 48dp, start, marginStart 8dp, marginBottom -8dp, ic_chevron_right rotated 180, borderless */
.signin-back {
  align-self: flex-start;
  width: 48px;
  height: 48px;
  margin: 0 0 -8px 8px;
  padding: 15px;                    /* the 18dp vector centred in its 48dp button (ImageButton, no scale) */
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--c-subtext);          /* the vector's colorControlNormal */
  cursor: pointer;
}
.signin-back[hidden] { display: none; }
/* W1/69 d4 (A-AU-099): the house X (OnboardingActivity.kt:311, WikViews.closeButton 48dp, c_subtext), top right, marginEnd 8dp; it takes
   no line of its own -- nothing in the header moves */
.signin-header { position: relative; }
.signin-close {   /* W1/69 d4: END side (Android gravity END) -- inset-inline-end below follows RTL */
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 48px;
  height: 48px;
  padding: 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--c-subtext);
  cursor: pointer;
}
.signin-close svg { width: 100%; height: 100%; display: block; }
.signin-back svg { width: 100%; height: 100%; display: block; transform: rotate(180deg); }
:root[dir="rtl"] .signin-back svg { transform: none; }
.signin-back:hover { background: color-mix(in srgb, var(--c-text) 8%, transparent); }
/* the title: "Wik" + ic_wik (drawablePadding 10dp), 30sp bold, letterSpacing 0.06, colorPrimary, marginBottom 20dp */
.signin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: var(--c-accent);
  margin-bottom: 20px;
}
/* ic_wik is a 136 px nodpi bitmap: its dp size is the phone's density's (48 dp at the 2.8125 witness) -- DELIVERY ledger */
.signin-brand-mark { width: 48px; height: 48px; display: block; }
/* the step dots: 10dp ovals, 6dp each side; lit = colorPrimary, else textColorSecondary */
.signin-dots { display: flex; }
.signin-dot { width: 10px; height: 10px; margin: 0 6px; border-radius: 50%; background: var(--c-subtext); }
.signin-dot-on { background: var(--c-accent); }

.signin-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* a step page: paddingHorizontal 28dp, paddingTop 8dp, paddingBottom 32dp. extra (desktop): at most 480 px wide, centred */
.signin-col {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 28px 32px 28px;
  box-sizing: border-box;
}
.signin-step[hidden] { display: none; }
.signin-title { font-weight: bold; color: var(--c-text); margin-bottom: 10px; }
.signin-subtitle { color: var(--c-subtext); line-height: 1.45; margin-bottom: 24px; }

/* TextInputLayout, Material3 OutlinedBox: 56dp, 4dp corners, colorOutline 1dp (focused: colorPrimary 2dp), the floating label
   on the outline in colorOnSurfaceVariant; an error turns outline and label colorError and shows the line under the box */
.signin-field {
  display: block;
  position: relative;
  height: 56px;
  margin-bottom: 16px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  box-sizing: border-box;
}
.signin-field:focus-within { border: 2px solid var(--c-accent); }
.signin-field-label {
  position: absolute;
  top: 0;
  inset-inline-start: 12px;
  transform: translateY(-55%);
  padding: 0 4px;
  background: var(--c-surface);
  color: var(--c-subtext);
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.signin-field:focus-within .signin-field-label { color: var(--c-accent); }
.signin-field-input {
  width: 100%;
  height: 100%;
  padding: 0 48px 0 15px;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  caret-color: var(--c-accent);
}
.signin-field-clear {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  width: 36px;
  height: 36px;
  padding: 6px;
  transform: translateY(-50%);
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--c-subtext);
  cursor: pointer;
}
.signin-field-clear[hidden] { display: none; }
.signin-field-clear svg { width: 100%; height: 100%; display: block; }
.signin-field-bad, .signin-field-bad:focus-within { border-color: var(--c-red); }
.signin-field-bad .signin-field-label, .signin-field-bad:focus-within .signin-field-label { color: var(--c-red); }
.signin-field-error { color: var(--c-red); margin: -12px 16px 12px 16px; }
.signin-field-error[hidden] { display: none; }

/* tvAddressError / tvAuthError: colorError, lineSpacingMultiplier 1.35 (the wallet step's is centred, marginBottom 12dp) */
.signin-error { color: var(--c-red); line-height: 1.35; margin-bottom: 12px; }
.signin-error[hidden] { display: none; }
.signin-qr ~ .signin-error { text-align: center; }

/* ProgressBar (Widget.AppCompat.ProgressBar, 48dp, indeterminate), centred, marginBottom 6-10dp */
.signin-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px auto;
  box-sizing: border-box;
  border: 4px solid transparent;
  border-top-color: var(--c-accent);
  border-right-color: var(--c-accent);
  border-radius: 50%;
  animation: signin-spin 1s linear infinite;
}
.signin-spinner[hidden] { display: none; }
@keyframes signin-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .signin-spinner { animation-duration: 3s; } }

/* tvAuthStep: textColorSecondary, centred, marginBottom 8dp */
.signin-status { color: var(--c-subtext); text-align: center; margin-bottom: 8px; }
.signin-status[hidden] { display: none; }

/* MaterialButton: Material3 filled -- a full pill in colorPrimary, colorOnPrimary words (paddingVertical 14dp); the
   outlined one: colorOutline 1dp, colorPrimary words */
.signin-btn {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 14px 24px;
  box-sizing: border-box;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.0071em;
  text-align: center;      /* MaterialButton centres its words (R3-3: base.css's button { text-align: inherit } left them at the start) */
  cursor: pointer;
}
.signin-btn[hidden] { display: none; }
.signin-btn-primary { border: 0; background: var(--c-accent); color: var(--c-on-accent); margin-bottom: 20px; }
.signin-btn-primary:hover { background: color-mix(in srgb, var(--c-accent) 92%, var(--c-on-accent)); }
.signin-btn-outlined { border: 1px solid var(--c-border); background: transparent; color: var(--c-accent); padding: 10px 24px; margin-top: 8px; }
.signin-btn-outlined:hover { background: color-mix(in srgb, var(--c-accent) 8%, transparent); }
.signin-btn:disabled { opacity: 0.38; cursor: default; }
.signin-btn:focus-visible { outline: 2px solid var(--c-accent-shown); outline-offset: 2px; }

/* extra (desktop): the QR the phone scans (dark modules on white, the quiet zone kept) and the code the person types there */
.signin-qr {
  width: 232px;
  height: 232px;
  margin: 4px auto 16px auto;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #FFFFFF;     /* a scanner needs a light field under the modules, in both themes */
}
.signin-qr-img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.signin-qr-img:not([src]), .signin-qr-img[src=""] { visibility: hidden; }
.signin-qr-spent { opacity: 0.25; }
.signin-code {
  margin: 0 0 20px 0;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.3em;
  text-indent: 0.3em;      /* the trailing letter-space balanced, so the code sits centred */
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.signin-code-spent { opacity: 0.4; }

/* STEP 3 -- Done: centred, paddingTop 32dp; the check colorPrimary marginBottom 20dp; title marginBottom 14dp; body 48dp */
.signin-done { text-align: center; padding-top: 24px; }
.signin-check { color: var(--c-accent); margin-bottom: 20px; line-height: 1; }
.signin-done-title { margin-bottom: 14px; }
.signin-done-body { margin-bottom: 48px; }
/* r3 (K's FOR THE ASSEMBLY 7): the Motion effects setting -- held still (root data-wk-motion="still", K's reader) = no spin */
:root[data-wk-motion="still"] .signin-spinner { animation: none; }

/* W1/96 DSI (pack 197): START -- one Sign in; "Sign in elsewhere" a quiet text button under it (collapsed), its part below it */
.signin-start .signin-title { text-align: center; margin-bottom: 24px; }
.signin-start-error { text-align: center; white-space: pre-line; }
.signin-more {
  display: block;
  margin: 4px auto 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--c-subtext);
  font: inherit;
  cursor: pointer;
}
.signin-more:hover { color: var(--c-accent); background: color-mix(in srgb, var(--c-text) 6%, transparent); }
.signin-more:focus-visible { outline: 2px solid var(--c-accent-shown); outline-offset: 2px; }
.signin-other { margin-top: 20px; }
.signin-other[hidden] { display: none; }
.signin-signed { margin-top: 16px; }
.signin-signed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--c-border); }
.signin-signed-name { color: var(--c-text); overflow-wrap: anywhere; }
.signin-signed-out { border: 0; background: none; color: var(--c-red); font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.signin-signed-out:hover { background: color-mix(in srgb, var(--c-red) 10%, transparent); }
/* STEP: "1 of 2 · wik.lol" over the title, the code, the browser button, then the phone's QR (hub only) */
.signin-which { color: var(--c-subtext); text-align: center; margin-bottom: 6px; }
.signin-flow .signin-title { text-align: center; }
.signin-flow .signin-subtitle { text-align: center; margin: 16px 0 12px 0; }
.signin-flow .signin-subtitle[hidden], .signin-flow .signin-qr[hidden] { display: none; }
.signin-flow .signin-qr { width: 168px; height: 168px; padding: 8px; }
