/* BUI-4035: the sign-in fields as part of the web window (`web/.../AppleSignInDialog.module.css`, `SignInOptions.module.css`, the
   shared Button): the same values, by the same --bn-* names. The window sends its own values (light or dark) at start; these are light. */
@font-face {
  font-family: BuiltInter;
  src: url('/inter.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bn-ink: #141312;
  --bn-paper: #ffffff;
  --bn-soft: #57534e;
  --bn-faint: #78716c;
  --bn-line: color-mix(in srgb, var(--bn-ink) 12%, transparent);
  --bn-fail: #9f2d17;
  --bn-control-disabled: color-mix(in srgb, var(--bn-ink) 8%, var(--bn-paper));
  --bn-control-disabled-ink: color-mix(in srgb, var(--bn-ink) 58%, var(--bn-paper));
  --bn-text-body: 16px;
  --bn-text-meta: 14px;
  --bn-text-caption: 13px;
  --bn-radius-control: 8px;
  --bn-1: 4px;
  --bn-2: 8px;
  --bn-3: 12px;
  color-scheme: light;
}

/* Transparent and unscrolled: the window's panel shows through, and the frame takes the page's height. */
html, body { margin: 0; padding: 0; overflow: hidden; background: transparent; }

body {
  color: var(--bn-ink);
  font-family: BuiltInter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: var(--bn-text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* Room for the focus ring inside the frame's edge. */
main { padding: 2px; }

.form { display: grid; gap: var(--bn-2); }

label {
  color: var(--bn-ink);
  font-size: var(--bn-text-caption);
  font-weight: 500;
}

input[type='email'], input[type='password'], input[type='text'] {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--bn-line);
  border-radius: var(--bn-radius-control);
  background: var(--bn-paper);
  color: var(--bn-ink);
  font: inherit;
  font-size: var(--bn-text-body);
}

input:focus-visible { outline: none; border-color: var(--bn-ink); }
input:disabled { opacity: 0.7; }

.text {
  margin: 0;
  color: var(--bn-soft);
  font-size: var(--bn-text-caption);
  line-height: 1.55;
}

.error {
  margin: 0;
  color: var(--bn-fail);
  font-size: var(--bn-text-caption);
  line-height: 1.5;
}

/* One button per row here, so no phone breakpoint: the frame's own width is not the window's. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bn-2);
  margin-top: var(--bn-1);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  box-sizing: border-box;
  border-radius: var(--bn-radius-control);
  font: inherit;
  font-size: var(--bn-text-meta);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.2s ease, color 0.2s ease;
}

button:disabled { cursor: not-allowed; opacity: 0.5; }
button[aria-busy='true'] { cursor: progress; opacity: 1; }

.accent { background: var(--bn-ink); border-color: var(--bn-ink); color: var(--bn-paper); }
.accent:hover:not(:disabled) { background: transparent; color: var(--bn-ink); }

.quiet { background: var(--bn-paper); border-color: var(--bn-line); color: var(--bn-soft); }
.quiet:hover:not(:disabled) { border-color: var(--bn-ink); color: var(--bn-ink); }

.link {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bn-ink);
  font-size: var(--bn-text-caption);
  font-weight: 400;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.choices { display: grid; gap: var(--bn-2); margin: 0; padding: 0; border: 0; }

.choices legend {
  margin-bottom: var(--bn-1);
  color: var(--bn-ink);
  font-size: var(--bn-text-caption);
  font-weight: 500;
}

.choice {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--bn-2);
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--bn-line);
  border-radius: var(--bn-radius-control);
  font-size: var(--bn-text-caption);
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

.choice:has(input:checked) { border-color: var(--bn-ink); }
.choice input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--bn-ink); }
