/* Sign-in shell — loaded from index.html for first paint and from main.tsx once
 * the React app mounts. Keeps layout stable before and after JS. */

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--rr-color-bg);
  color: var(--rr-color-fg);
  font-family: var(--rr-font-sans);
  font-size: var(--rr-text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.rr-layout {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  padding: calc(var(--rr-space-6) + var(--rr-space-8)) var(--rr-space-6) var(--rr-space-6);
  width: 100%;
}

.rr-no-settings-layout {
  width: min(100%, var(--rr-card-max-width));
}

.rr-settings-layout {
  width: min(100%, var(--rr-settings-max-width));
}

.rr-brand {
  display: flex;
  justify-content: center;
  margin-bottom: var(--rr-space-6);
}

.rr-brand__logo {
  display: block;
  width: min(var(--rr-logo-width), 100%);
  height: var(--rr-logo-height);
}

/* Route content width shell — same wrapper as around the spinner in index.html
 * and as AuthLayout inside `#root`. */
.rr-auth-layout {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  min-width: 0;
  width: 100%;
}

.rr-auth-layout--flow {
  max-width: var(--rr-card-max-width);
}

.rr-auth-layout--settings {
  max-width: var(--rr-settings-max-width);
}

/* Overlap `#rr-app-loading` and `#root` in one grid cell so flow UI replaces the
 * spinner in place without shifting the layout slot (see index.html). */
.rr-auth-slot {
  display: grid;
  width: 100%;
}

.rr-auth-slot > * {
  grid-area: 1 / 1;
  width: 100%;
}
