/* The screens that stay in Rails (layouts/foundry.html.erb): sign-in, the
 * password gate, the page-host screens and the tools connection result.
 * What Foundry UI does not draw itself, with its tokens only. */

/* One narrow column, centred on the screen. */
.screen {
  --page-width: 26rem;
  min-height: 100dvh;
  justify-content: center;
}

/* The header lockup (Foundry UI, Logos): a 24 px logo, a third of its width
 * apart from the name, lower case in the heading face. */
.lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--foreground);
}

.lockup svg { flex: none; }

/* Sign-in's title is the lockup itself, larger. */
.card > header > .lockup[data-size="lg"] {
  justify-content: flex-start;
  gap: 0.625rem;
  font-size: 1.5rem;
  line-height: 2rem;
}

/* An empty state heading the page sits under the lockup (the component
 * fills its container's height); its title is the page's h1, drawn as the
 * component draws its h2. */
.screen > .empty { flex: none; }

.empty h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.empty > header > p { margin: 0; }

/* The tools connection result: the outcome's state colour on its icon. */
.outcome[data-outcome="connected"] figure { color: var(--success); }
.outcome[data-outcome="failed"] figure { color: var(--destructive); }

/* Developer sign-in, outside production: a quiet disclosure under the
 * one primary action. */
.dev-login > summary {
  display: block;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
  text-align: center;
}

.dev-login > summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: calc(var(--radius) - 2px);
}

.dev-login[open] > summary { margin-bottom: 1rem; }
