/*
 * Buffalo147 AI — sign-in, registration and recovery screens
 *
 * Two panes on desktop: the form on the leading side, a quiet brand panel on
 * the trailing side carrying the AI thinking motif. On mobile the brand panel
 * drops away entirely rather than shrinking, because a squashed decorative
 * column is worse than none.
 */

.bf-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
}

/* Ambient warmth behind everything, anchored to the brand accent. */
.bf-auth::before {
  content: '';
  position: absolute;
  inset-block-start: -30%;
  inset-inline-end: -10%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(169, 79, 49, 0.10) 0%, transparent 62%);
  pointer-events: none;
  z-index: var(--bf-z-behind);
}

@media (min-width: 960px) {
  .bf-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------------------------------------------------------------------
 * Form pane
 * ------------------------------------------------------------------ */

.bf-auth__main {
  position: relative;
  z-index: var(--bf-z-base);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--bf-space-8) var(--bf-space-5);
}

.bf-auth__inner {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.bf-auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--bf-space-8);
  font-weight: 700;
  font-size: var(--bf-size-lg);
  color: var(--bf-text);
}
.bf-auth__brand:hover { color: var(--bf-text); }

.bf-auth__mark {
  width: 34px; height: 34px;
  flex: none;
}

.bf-auth__title {
  font-size: var(--bf-size-2xl);
  margin-bottom: var(--bf-space-2);
}

.bf-auth__lead {
  color: var(--bf-text-muted);
  font-size: var(--bf-size-md);
  margin-bottom: var(--bf-space-6);
}

/* ---------------------------------------------------------------------
 * Google sign-in
 * ------------------------------------------------------------------ */

.bf-auth__social { margin-bottom: var(--bf-space-5); }

/*
 * The Google button.
 *
 * Ours, using the plugin's link. Overriding the plugin's own button from
 * outside meant fighting absolute positioning and inline styles, and every
 * `!important` made it a little worse — the two-tone seam was the symptom
 * of a design meant for a white form, not something a colour override
 * could fix.
 *
 * One surface, the mark beside the words, matching the fields below it.
 */
.bf-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--bf-glass-border);
  border-radius: var(--bf-radius-pill);
  background: var(--bf-glass);
  color: var(--bf-text);
  font-family: var(--bf-font);
  font-size: var(--bf-size-md);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--bf-fast) var(--bf-ease),
              border-color var(--bf-fast) var(--bf-ease);
}

.bf-google:hover {
  background: var(--bf-glass-strong);
  border-color: var(--bf-line-strong);
}

.bf-google:focus-visible {
  outline: 2px solid var(--bf-accent);
  outline-offset: 2px;
}

/* The mark keeps Google's four colours: it is the one part that must not
   be restyled, and a monochrome version reads as broken rather than
   tasteful. No tile behind it — the button is already a surface. */
.bf-google__mark {
  display: flex;
  align-items: center;
  flex: none;
}

/* Should the plugin's own markup ever be printed instead — when no link
   could be read from it — it is at least brought near the form's shape,
   without reaching inside it. */
.bf-auth__social .nsl-container { margin: 0 !important; padding: 0 !important; }

.bf-auth__social .nsl-container-buttons a {
  border-radius: var(--bf-radius-pill) !important;
  min-height: 48px !important;
}

.bf-auth__divider {
  display: flex;
  align-items: center;
  gap: var(--bf-space-3);
  margin-block: var(--bf-space-5);
  color: var(--bf-text-faint);
  font-size: var(--bf-size-xs);
}
.bf-auth__divider::before,
.bf-auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bf-line);
}

/* ---------------------------------------------------------------------
 * Footer links
 * ------------------------------------------------------------------ */

.bf-auth__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--bf-space-3);
  margin-bottom: var(--bf-space-5);
  flex-wrap: wrap;
}

.bf-auth__alt {
  margin-top: var(--bf-space-6);
  text-align: center;
  font-size: var(--bf-size-sm);
  color: var(--bf-text-muted);
}

.bf-auth__legal {
  margin-top: var(--bf-space-5);
  text-align: center;
  font-size: var(--bf-size-xs);
  color: var(--bf-text-faint);
  line-height: 1.9;
}

/* ---------------------------------------------------------------------
 * Brand pane
 * ------------------------------------------------------------------ */

.bf-auth__aside {
  display: none;
  position: relative;
  z-index: var(--bf-z-base);
  padding: var(--bf-space-12);
  border-inline-start: 1px solid var(--bf-line);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(169, 79, 49, 0.07), transparent 60%),
    var(--bf-surface);
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 960px) {
  .bf-auth__aside { display: flex; }
}

.bf-auth__aside-inner { max-width: 380px; margin-inline: auto; }

.bf-auth__quote {
  font-size: var(--bf-size-xl);
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: var(--bf-space-6);
}
.bf-auth__quote em {
  font-style: normal;
  color: var(--bf-accent);
}

.bf-auth__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--bf-space-3);
}

.bf-auth__point {
  display: flex;
  align-items: flex-start;
  gap: var(--bf-space-3);
  font-size: var(--bf-size-sm);
  color: var(--bf-text-muted);
}

.bf-auth__tick {
  width: 20px; height: 20px;
  flex: none;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--bf-accent-soft);
  border: 1px solid var(--bf-accent-line);
  position: relative;
}
.bf-auth__tick::after {
  content: '';
  position: absolute;
  inset-block-start: 5px;
  inset-inline-start: 6px;
  width: 5px; height: 8px;
  border: solid var(--bf-accent);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------------
 * Thinking mark
 *
 * The brand's processing motif, rendered as animated SVG rather than a GIF so
 * it stays sharp, costs almost nothing to run, and can later be driven by the
 * real request state instead of looping blindly.
 * ------------------------------------------------------------------ */

.bf-mark__ring {
  transform-origin: 50% 50%;
  animation: bf-mark-rotate 9s linear infinite;
}
.bf-mark__ring--inner {
  animation-duration: 6s;
  animation-direction: reverse;
}
.bf-mark__core {
  transform-origin: 50% 50%;
  animation: bf-mark-pulse 2.8s var(--bf-ease) infinite;
}

@keyframes bf-mark-rotate { to { transform: rotate(360deg); } }
@keyframes bf-mark-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .bf-mark__ring,
  .bf-mark__core { animation: none; }
}


/* ---- Phones ---------------------------------------------------------- */

@media (max-width: 640px) {
  .bf-auth__main { padding: var(--bf-space-6) var(--bf-space-4); }
  .bf-auth__brand { margin-bottom: var(--bf-space-6); }
  .bf-auth__title { font-size: var(--bf-size-2xl); }

  /* The form is the whole page here; the ambient glow only costs paint. */
  .bf-auth::before { display: none; }

  .bf-auth__meta { flex-direction: column; align-items: flex-start; gap: var(--bf-space-2); }
}
