/* BMCG AI sign-in page. Applies only when the Google sign-in button is on screen. */
html.light:has([data-testid="google"]) {
  --bmcg-bg: #f2f4f7;
  --bmcg-card: #ffffff;
  --bmcg-ink: #000000;
  --bmcg-muted: #4a5568;
  --bmcg-line: #dfe3ea;
}
html.dark:has([data-testid="google"]) {
  --bmcg-bg: #0d1b2a;
  --bmcg-card: #1b263b;
  --bmcg-ink: #ffffff;
  --bmcg-muted: #a9b4c6;
  --bmcg-line: #2e3d57;
}

/* Page: logo and card centered together */
html:has([data-testid="google"]) body,
html:has([data-testid="google"]) #root > div {
  background: var(--bmcg-bg) !important;
}
html:has([data-testid="google"]) #root > div {
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 32px 16px 72px;
}
html:has([data-testid="google"]) #root > div > div.h-10 {
  margin: 0;
  height: 52px;
  width: auto;
}
html:has([data-testid="google"]) #root > div > div.h-10 img {
  height: 52px;
  width: auto;
}
html:has([data-testid="google"]) #root > div > main {
  flex-grow: 0;
  width: 100%;
  justify-content: center;
}

/* Card with the BMCG letterhead bar along its top edge */
html:has([data-testid="google"]) main > div {
  position: relative;
  width: min(420px, 100%);
  background: var(--bmcg-card) !important;
  border: 1px solid var(--bmcg-line);
  border-radius: 14px;
  padding: 40px 32px 30px;
  overflow: hidden;
}
html:has([data-testid="google"]) main > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #000000 0 50%, #ff3b30 50%, #ff8a4c 100%);
}

/* Heading: app name + what it is */
html:has([data-testid="google"]) main h1 {
  font-size: 0;
  line-height: 0;
  margin: 0 0 28px;
  text-align: center;
}
html:has([data-testid="google"]) main h1::before {
  content: "BMCG AI";
  display: block;
  font: 800 40px/1.05 "Phudu", "Arial Black", sans-serif;
  letter-spacing: 0.01em;
  color: var(--bmcg-ink);
}
html:has([data-testid="google"]) main h1::after {
  content: "The BMCG team\2019s AI workspace. Chat with Claude, search our own documents and work in Attio, all in one place.";
  display: block;
  max-width: 34ch;
  margin: 12px auto 0;
  font: 400 15px/1.55 "Lato", system-ui, sans-serif;
  color: var(--bmcg-muted);
}

/* Google button */
html:has([data-testid="google"]) a[data-testid="google"] {
  min-height: 50px;
  border-radius: 10px;
  border: 1.5px solid var(--bmcg-line) !important;
  background: var(--bmcg-card) !important;
  color: var(--bmcg-ink) !important;
  font: 700 15px/1 "Lato", system-ui, sans-serif;
  transition: border-color 0.15s ease;
}
html:has([data-testid="google"]) a[data-testid="google"]:hover {
  border-color: #ea580c !important;
}
html:has([data-testid="google"]) a[data-testid="google"]:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
html:has([data-testid="google"]) main > div > div.mt-2::after {
  content: "Use your @bmcg.com.ph Google account.";
  display: block;
  margin-top: 16px;
  text-align: center;
  font: 400 13px/1.4 "Lato", system-ui, sans-serif;
  color: var(--bmcg-muted);
}

@media (max-width: 480px) {
  html:has([data-testid="google"]) main > div { padding: 36px 22px 26px; }
  html:has([data-testid="google"]) main h1::before { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has([data-testid="google"]) a[data-testid="google"] { transition: none; }
}
