/* ============================================================
   Shop Web — auth, onboarding and app shell.
   Tokens come from design-system.css. Big touch targets: every
   control is at least 52px tall, which is what a thumb needs.
   ============================================================ */

.auth {
  max-width: 460px;
  margin-inline: auto;
  padding: var(--s-8) var(--s-5) var(--s-6);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth__brand {
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  text-align: center;
  margin-bottom: var(--s-6);
}

.auth__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--s-2);
}

.auth__sub {
  color: var(--muted);
  margin: 0 0 var(--s-6);
}

.auth__foot {
  margin-top: var(--s-6);
  text-align: center;
  color: var(--muted);
}

.auth__foot a { color: var(--accent); font-weight: var(--fw-bold); }

/* Signed-out Account and login share one compact, scrollable screen.
   Scope the palette so signup, recovery and seller pages keep theirs. */
body:has(.login) {
  --bg: #F7F8F6;
  --text: #17211D;
  --muted: #626C66;
  --accent: #126B55;
  --surface-2: #D6DDD8;
}
.auth.login {
  max-width: 438px;
  padding: calc(16px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
  min-height: 100svh;
}
.login__back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 44px;
  color: var(--accent);
  font-size: 14px;
}
.login__brand { margin: 24px 0; text-align: center; }
.login__wordmark {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}
.login__wordmark img { flex: none; margin-inline-end: -8px; }
.login__brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login__title {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}
.login__sub { margin: 10px 0 24px; color: var(--muted); text-align: center; font-size: 14px; line-height: 1.75; }
.login .btn {
  min-height: 52px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 16px;
  transition: none;
}
.login .login__google {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #C7D0CA;
}
.login__google svg { width: 24px; height: 24px; }
.login .divider { margin: 24px 0; font-size: 14px; }
.login .field { margin-bottom: 16px; }
.login .field__label { font-size: 14px; margin-bottom: 8px; }
.login .field__input {
  height: 52px;
  background: #FFFFFF;
  border: 1px solid #D6DDD8;
  border-radius: 12px;
  font-size: 16px;
  text-align: left;
  scroll-margin-block: 24px;
}
.login .field__input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.login__password { position: relative; }
.login__password .field { margin-bottom: 0; }
.login__password .field__input { padding-left: 52px; }
.login__reveal {
  position: absolute;
  bottom: 4px;
  inset-inline-end: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}
.login__reveal[aria-pressed="true"] .login__eye-slash { display: none; }
.login__forgot { display: flex; align-items: center; width: fit-content; min-height: 44px; margin: 4px 0 16px; color: var(--accent); font-size: 14px; }
.login .btn--primary:hover, .login .btn--primary:active { background: #0B4F3F; }
.login__back:hover, .login__forgot:hover { color: #0B4F3F; text-decoration: underline; }
.login .alert { overflow-wrap: anywhere; }
@media (max-height: 700px) {
  .login__brand { margin-block: 12px 16px; }
}

/* ---------- fields ---------- */

.field { margin-bottom: var(--s-4); }

.field__label {
  display: block;
  margin-bottom: var(--s-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
}

.field__input {
  width: 100%;
  height: 54px;
  padding-inline: var(--s-4);
  background: var(--surface-2);
  border-radius: var(--r-field);
  font-size: var(--fs-md);
}

.field__input::placeholder { color: var(--muted); }

.field__input[aria-invalid="true"] { background: #F6E7E4; }

.field__hint { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.field__hint[data-state="ok"]   { color: var(--accent); }
.field__hint[data-state="bad"]  { color: #A2402F; }

/* the slug field shows the live URL as a prefix */
.slug-row {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--r-field);
  direction: ltr;
  overflow: hidden;
}

.slug-row__prefix {
  padding-inline: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
  flex: none;
}

.slug-row .field__input {
  min-width: 0;
  border-radius: 0;
  background: none;
  padding-inline: 0 var(--s-4);
  text-align: left;
}

.logo-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  min-height: 54px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-field);
  font-family: var(--font-head);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  text-align: center;
  transition: opacity var(--t-fast);
}

.btn:active { opacity: 0.85; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--quiet   { background: var(--surface-2); color: var(--text); }
.btn--ghost   { background: none; color: var(--muted); min-height: 44px; }

.btn + .btn { margin-top: var(--s-3); }

/* ---------- divider ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-5) 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--surface-2);
}

/* ---------- alerts ---------- */

.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-field);
  margin-bottom: var(--s-4);
  font-size: var(--fs-base);
}

.alert--error { background: #F6E7E4; color: #7C2D1B; }
.alert--ok    { background: #E4EFE9; color: var(--accent); }

/* ---------- wizard ---------- */

.wizard { max-width: 460px; margin-inline: auto; padding: var(--s-6) var(--s-5) var(--s-8); }

.wizard__steps {
  display: flex;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}

.wizard__step {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.wizard__step[data-done="true"] { background: var(--accent); }

.wizard__count { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 var(--s-2); }
.wizard__title { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.wizard__sub   { color: var(--muted); margin: 0 0 var(--s-5); }
.wizard__actions { margin-top: var(--s-6); }

/* ---------- logo picker ---------- */

.logo-pick {
  display: grid;
  place-items: center;
  gap: var(--s-3);
  padding: var(--s-6);
  background: var(--surface-2);
  border-radius: var(--r-card);
  text-align: center;
  color: var(--muted);
}

.logo-pick__preview {
  width: 96px;
  height: 96px;
  border-radius: var(--r-pill);
  object-fit: cover;
  background: var(--surface);
}

/* ---------- app shell ---------- */

.shell {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--s-5) var(--s-4)
           calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--s-6));
}

.shell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.shell__title { font-size: var(--fs-xl); }

.card-block {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--s-5) var(--s-4);
  margin-bottom: var(--s-3);
}

.card-block__label { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 var(--s-1); }
.card-block__value { font-family: var(--font-head); font-weight: var(--fw-bold); }

/* Phone numbers and URLs are latin: forced into their own direction so
   a leading "+" does not jump to the end of the string. */
.card-block__value--ltr { direction: ltr; text-align: right; }

.link-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  direction: ltr;
  background: var(--surface-2);
  border-radius: var(--r-field);
  padding: var(--s-3) var(--s-4);
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}

.copy-btn { flex: none; color: var(--accent); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
