/* ==========================================================================
 * ModSeed — page-auth.css (auth page ONLY; loaded AFTER style.css)
 * ---------------------------------------------------------------------------
 * A faithful port of the workspace's auth view (src/components/platform/
 * auth-view.tsx): the bg-grid backdrop, the max-w-md card (border-border/70,
 * shadow-lg), centered pixel-font title, username/password fields with the
 * eye toggle, the three bordered agreement boxes, the mode-switch line and
 * the free-plan note + inline Mojang disclaimer.
 *
 * Structure:
 *   1. Small Tailwind utilities the shared subset in style.css doesn't define
 *      (same class names, so the markup ports 1:1 from the JSX).
 *   2. Fidelity overrides where the shared component classes diverge from the
 *      workspace's shadcn/ui rendering — scoped to the auth page only.
 * ========================================================================== */

/* ── 1. Missing utilities used by the ported markup ───────────────────────── */
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.flex-1 { flex: 1 1 0%; }
.w-44 { width: 11rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* inline link that stays inside the site (RouterTextLink in auth-view.tsx) */
.text-link {
  font-weight: 500;
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.text-link:hover { color: var(--amber-600); }
.dark .text-link:hover { color: var(--amber-400); }

/* icon sizing — style.css's .icon (16px) wins over .size-* by source order,
   so re-assert the JSX icon sizes with higher specificity */
.icon.size-3 { width: 12px; height: 12px; }
.icon.size-4 { width: 16px; height: 16px; }

/* ── 2. Fidelity overrides (auth page only) ───────────────────────────────── */

/* workspace Card = rounded-xl (radius + 4px); style.css .card uses --radius */
#main .card { border-radius: calc(var(--radius) + 4px); }

/* auth card: border-border/70 + shadow-lg (shadcn <Card className="border-border/70 shadow-lg">) */
.auth-card {
  border-color: color-mix(in oklab, var(--border) 70%, transparent);
  box-shadow: 0 10px 15px -3px oklch(0 0 0 / 0.1), 0 4px 6px -4px oklch(0 0 0 / 0.1);
}

/* CardHeader items-center text-center (flex column, centered) */
.auth-card .card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px; /* shadcn CardHeader gap-1.5 */
  padding-bottom: 0;
}
.auth-logo {
  width: 48px; height: 48px; /* size-12 */
  margin-left: auto; margin-right: auto;
  border-radius: var(--radius);
}
.auth-card-title {
  margin-top: 8px; /* mt-2 */
  font-family: "Press Start 2P", ui-monospace, "SFMono-Regular", monospace;
  font-weight: 400;
  font-size: 14px; /* text-sm */
  line-height: 1.625; /* leading-relaxed */
  letter-spacing: 0.02em;
}

/* submit button — size lg, full width, 44px touch target */
.auth-submit { height: 44px; }
.auth-submit .icon { width: 16px; height: 16px; }

/* password eye toggle — absolute right, w-10, vertically centered; the
   transparent button extends 4px above/below the 36px input so the hit
   target stays >= 44px while looking flush like the workspace */
.pw-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; /* w-10 */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) - 4px);
  transition: color 0.15s ease;
}
.pw-toggle:hover { color: var(--foreground); }
.pw-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* agreement boxes — bordered muted boxes (the Agreement component) */
.agreement {
  display: flex;
  align-items: flex-start;
  gap: 12px; /* gap-3 */
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
  padding: 12px; /* p-3 */
}
.agreement .checkbox { margin-top: 2px; } /* mt-0.5 */
.agreement-label {
  flex: 1 1 0%;
  font-size: 12px; /* text-xs */
  font-weight: 400; /* font-normal */
  line-height: 1.625; /* leading-relaxed */
  color: var(--muted-foreground);
  cursor: pointer;
}

/* mode-switch line */
.auth-mode-switch { margin-top: 20px; } /* mt-5 */

/* free-plan note + inline Mojang disclaimer below a border-t */
.signup-notes {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px; /* space-y-2 */
  border-top: 1px solid var(--border);
  padding-top: 16px; /* pt-4 */
}
.auth-mojang { font-size: 9px; } /* text-[9px] per auth-view.tsx override */

/* username availability hint (debounced live check) */
.avail-hint { font-size: 12px; }
.avail-hint.ok { color: var(--emerald-600); }
.dark .avail-hint.ok { color: var(--emerald-400); }

/* hide without display:none semantics loss */
[hidden] { display: none !important; }
