/*
 * OAuth sign-in buttons: professional split treatment.
 * Microsoft: dark neutral shell (matches common product UX), full-colour logo.
 * Google: clean white + hairline border (Google sign-in pattern), full-colour G.
 *
 * Served at /static/css/oauth-provider-buttons.css — app mounts /static to
 * FRONTEND_DIR, so this file must live under frontend/css/ (not frontend/static/css/).
 */

/* Anchor-specific: defeat Tailwind / Preflight `a { color: inherit }` and link underlines
   so these read as primary actions, not body copy. */
a.ca-sso-btn,
a.ca-sso-btn:visited {
  box-sizing: border-box;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.65rem;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none !important;
  cursor: pointer;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  transition:
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

.ca-sso-btn {
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  transition:
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

/* Google (default when not using --microsoft) */
.ca-sso-btn:not(.ca-sso-btn--microsoft),
a.ca-sso-btn:not(.ca-sso-btn--microsoft),
a.ca-sso-btn:not(.ca-sso-btn--microsoft):visited {
  background: #fff !important;
  border: 1px solid #dadce0;
  color: #3c4043 !important;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.ca-sso-btn:not(.ca-sso-btn--microsoft):hover,
a.ca-sso-btn:not(.ca-sso-btn--microsoft):hover {
  color: #3c4043 !important;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.2),
    0 2px 6px rgba(60, 64, 67, 0.12);
  border-color: #bdc1c6;
}

.ca-sso-btn:not(.ca-sso-btn--microsoft):focus-visible,
a.ca-sso-btn:not(.ca-sso-btn--microsoft):focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* Microsoft */
.ca-sso-btn.ca-sso-btn--microsoft,
a.ca-sso-btn.ca-sso-btn--microsoft,
a.ca-sso-btn.ca-sso-btn--microsoft:visited {
  background: #171717 !important;
  border: 1px solid #1a1a1a;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.ca-sso-btn.ca-sso-btn--microsoft:hover,
a.ca-sso-btn.ca-sso-btn--microsoft:hover {
  color: #ffffff !important;
  background: #1a1a1a !important;
  border-color: #0f0f0f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.ca-sso-btn.ca-sso-btn--microsoft:focus-visible,
a.ca-sso-btn.ca-sso-btn--microsoft:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #2f2f2f;
}

.ca-sso-btn.ca-sso-btn--microsoft .ca-sso-btn-label,
a.ca-sso-btn.ca-sso-btn--microsoft .ca-sso-btn-label {
  color: #ffffff !important;
}

.ca-sso-btn-label {
  flex: 1;
  text-align: center;
}

.ca-sso-ico-ms {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ca-sso-ico-google {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Tailwind / Preflight sets svg { display: block } — that stacks the logo above the label. */
.ca-sso-btn svg,
a.ca-sso-btn svg {
  display: inline-block !important;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Optional compact “read-only” hint on the right — prefer a footnote under the stack instead */
.ca-sso-readpill {
  margin-left: auto;
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ca-sso-readpill--muted {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.ca-sso-btn.ca-sso-btn--microsoft .ca-sso-readpill--muted {
  background: rgba(74, 222, 128, 0.18);
  color: #bbf7d0;
}

/* ── Sign-in page chrome (partner gateway, app login, portal invite) ───────── */
.ca-signin-step-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 0.5rem;
  text-align: center;
}

.ca-oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
}

.ca-signin-card-top-accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 45%, #c026d3 100%);
}

.ca-divider-or {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0.25rem 2rem;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ca-divider-or::before,
.ca-divider-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}
