/* ANARCHISM.AFRICA — Sign-in / Join page (full viewport between header & footer) */

/* Sign-in / Join page sits BETWEEN the persistent chrome — header on top,
   left rail on the desktop side, bottombar at the bottom. It must never
   obscure them so the user can always navigate away. */
.aa-auth-page {
  position: fixed;
  top: 56px;             /* below the topbar (header)                    */
  left: 0; right: 0;
  bottom: 60px;          /* above the bottombar (footer) on desktop too  */
  z-index: 26;            /* BELOW rail (28), bottombar (35), topbar (30) */
  display: none;
  background: var(--bg);
  color: var(--fg);
  overflow-y: auto;
  animation: aap-up .25s ease-out both;
}
.aa-auth-page.open { display: block; }

/* Desktop: leave room for the left rail (64px collapsed, 220px open). */
@media (min-width: 769px) {
  body.has-rail .aa-auth-page { left: 64px; transition: left .26s ease; }
  body.has-rail.rail-open .aa-auth-page { left: 220px; }
}

/* Mobile: bottombar is 56px tall. */
@media (max-width: 768px) {
  .aa-auth-page { bottom: 56px; top: 56px; }
}

@media (prefers-reduced-motion: reduce) { .aa-auth-page { animation: none; } }
@keyframes aap-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Body class: prevent BACKGROUND scroll behind the auth page, but DO NOT
   apply overflow:hidden globally — that breaks scrolling inside the page
   itself on touch devices. */
body.aa-auth-open { overflow: hidden; }

/* Close button — top-right, big and obvious */
.aa-auth-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 26px;
  line-height: 1;
  cursor: pointer; padding: 0;
  border-radius: 0;
  transition: background .15s, color .15s;
}
.aa-auth-close:hover { background: var(--fg); color: var(--bg); }

/* Two-column on desktop, stacked on mobile */
.aa-auth-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 80px) clamp(20px, 4vw, 56px);
  min-height: 100%;
  box-sizing: border-box;
}
@media (max-width: 820px) {
  .aa-auth-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Left pitch column — big punk type */
.aa-auth-pitch { min-width: 0; }
/* Logo card — always a BLACK tile regardless of theme so the AA mark reads
   the same on dark and light backgrounds. The SVG itself contains the
   white outlined "A" + Africa silhouette, painted directly on the black
   square. The card sits flush-left, no border, no rounded corners. */
.aa-auth-mark {
  margin-bottom: 18px;
  display: inline-block;
  width: 96px; height: 96px;
  background: #000 url('/icons/AAlogo1.svg') center / 70% no-repeat;
  /* Hide the legacy <img> child so it doesn't double-paint over the bg. */
}
.aa-auth-mark img { display: none; }
.aa-auth-pitch h1 {
  margin: 0;
  font-family: 'Bebas Neue', 'Anton', 'Impact', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: .03em;
  line-height: .95;
  text-transform: uppercase;
}
.aa-auth-lede {
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 50ch;
}
.aa-auth-bullets {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: grid; gap: 8px;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--fg);
}
.aa-auth-bullets li {
  padding-left: 4px;
  border-left: 2px solid var(--accent);
  padding: 4px 12px;
}

/* Sign in / Sign up tab toggle */
.aa-auth-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--line);
}
.aa-auth-mode-tab {
  flex: 1;
  padding: 10px 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font: 700 .78rem 'JetBrains Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.aa-auth-mode-tab:hover { color: var(--fg); }
.aa-auth-mode-tab.is-active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

/* Display-name row (visible in sign-up mode only) */
.aa-auth-name-row {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 18px;
}
.aa-auth-name-row input {
  padding: 11px 14px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--input-border);
  font: 500 .94rem 'Space Grotesk', sans-serif;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}
.aa-auth-name-row input:focus {
  outline: none;
  border-color: var(--fg);
}

/* Right form column */
.aa-auth-form {
  background: var(--bg-2);
  border: 2px solid var(--fg);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 8px 8px 0 0 var(--accent);
  min-width: 0;
}
@media (max-width: 600px) {
  .aa-auth-form { box-shadow: none; border-width: 1px; }
}
.aa-auth-form-title {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.aa-auth-form-sub {
  margin: 6px 0 22px;
  color: var(--fg-dim);
  font-size: .9rem;
  line-height: 1.5;
}
.aa-auth-google {
  display: flex; justify-content: center; align-items: center;
  min-height: 60px;
  margin-bottom: 18px;
}
.aa-auth-google iframe { max-width: 100% !important; }    /* GIS widget */
.aa-auth-fineprint {
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .04em;
  line-height: 1.6;
  margin: 12px 0 0;
}
.aa-auth-fineprint a { color: var(--accent); }

/* ============================================================
   3-METHOD AUTH (Google + email magic link + phone OTP)
   ============================================================ */
.aa-auth-method {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 6px;
}
.aa-auth-method-label {
  font: 600 .68rem 'JetBrains Mono', monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--label-color);
}
.aa-auth-row {
  display: flex; gap: 8px; align-items: stretch;
}
.aa-auth-row input {
  flex: 1; min-width: 0;
  padding: 11px 14px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--input-border);
  font: 500 .94rem 'Space Grotesk', sans-serif;
  border-radius: 0;
}
.aa-auth-row input:focus {
  outline: none;
  border-color: var(--fg);
}
.aa-auth-row .btn {
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 0;
}
.aa-auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
}
.aa-auth-divider::before,
.aa-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.aa-auth-status {
  font-size: .76rem;
  color: var(--muted);
  margin: 4px 0 0;
  min-height: 1.2em;
}
.aa-auth-google { min-height: 44px; }
