/* "Continue with Apple / Google" buttons (public/app/js/lib/auth.js), matching the
   phone app: 56px tall, full width, pill shaped, stacked 12px apart. */

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
  width: 100%;
}

.auth-btn {
  position: relative;
  width: 100%;
  height: 56px;
  border-radius: 28px;
  transition: opacity 0.2s ease;
}

.auth-btn-face {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  padding: 0 var(--s-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.auth-btn-face ion-icon {
  font-size: 18px;
}

.auth-apple .auth-btn-face {
  background: #000;
  color: #fff;
}

.auth-apple .auth-btn-face ion-icon {
  font-size: 20px;
  margin-top: -3px; /* the Apple logo sits optically low */
}

/* Google's light theme (sign-in branding guidelines): white fill, light gray
   outline, dark gray label, the full-colour G at its natural proportions. */
.auth-google .auth-btn-face {
  gap: 12px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08), 0 2px 8px rgba(60, 64, 67, 0.06);
}

.auth-google-g {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Google's official button, stretched over ours and made transparent: the click lands
   on it (see lib/auth.js). It only takes clicks once it has rendered. */
.auth-gis {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
  opacity: 0;
  pointer-events: none;
}

.auth-google.is-ready .auth-gis {
  pointer-events: auto;
}

.auth-gis-inner {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* Keyboard focus on Google's (invisible) button shows on ours. */
.auth-google.is-ready:has(iframe:focus-visible, [role='button']:focus-visible) .auth-btn-face {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Busy ---------- */

.auth-btn .spinner {
  border-color: currentColor;
  border-right-color: transparent;
}

.auth-btn.is-busy .auth-btn-face,
.auth-btn.is-busy .auth-gis {
  pointer-events: none;
}

.auth-buttons.is-busy .auth-btn:not(.is-busy) {
  opacity: 0.45;
  pointer-events: none;
}
