/* InvokePortal sign-in — brand styling. */
:root {
  --il-red: #BE1F2D;
  --il-red-dark: #9A1622;
  --il-purple: #6B1F7C;
  --il-purple-dark: #551563;
  --navy: #0F1B2D;
  --il-gray: #5B6470;
  --bg: #F4F5F7;
  --line: rgba(15, 27, 45, 0.08);
}

* { box-sizing: border-box; }

/* Background lives on <html> only — putting it on both html and body
   double-painted it, and the grid/centering on <html> was shrink-wrapping
   <body> to the card width, which is why it only covered part of the page. */
html {
  min-height: 100%;
  background:
    radial-gradient(1200px 620px at 72% -12%, rgba(107, 31, 124, 0.14), transparent 62%),
    radial-gradient(1000px 520px at -12% 112%, rgba(190, 31, 45, 0.12), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Helvetica, "Trebuchet MS", Arial, sans-serif;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

/* ---- Card ---- */
.card {
  position: relative;
  width: min(440px, 100%);
  padding: 44px 40px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 27, 45, 0.04),
    0 12px 28px rgba(15, 27, 45, 0.08),
    0 28px 64px rgba(15, 27, 45, 0.10);
  text-align: center;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--il-red) 0%, var(--il-red) 45%, var(--il-purple) 100%);
}

.brand {
  font-family: "Barlow Condensed", Helvetica, sans-serif;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0.3px;
  line-height: 1;
}
.brand-invoke { color: var(--navy); }
.brand-portal { color: var(--il-red); }

.tagline {
  margin: 10px 0 28px;
  color: var(--il-gray);
  font-size: 15px;
}

/* ---- Provider buttons ---- */
#firebaseui-container { min-height: 48px; }
.firebaseui-container { max-width: none; box-shadow: none; background: transparent; }
.firebaseui-card-content { padding: 0; }
.firebaseui-idp-list { margin: 0; padding: 0; }
.firebaseui-list-item { margin: 0 0 12px; }
.firebaseui-list-item:last-child { margin-bottom: 0; }

.firebaseui-idp-button,
.mdl-button {
  width: 100% !important;
  max-width: none !important;
  min-height: 50px;
  display: flex !important;
  align-items: center;
  border-radius: 10px !important;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.10);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.firebaseui-idp-button:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 27, 45, 0.16);
}
.firebaseui-idp-button:active { transform: translateY(0); filter: brightness(0.88); }
.firebaseui-idp-button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* FirebaseUI sets background-color inline, so these need !important */
.firebaseui-list-item:nth-child(1) .firebaseui-idp-button { background-color: var(--il-red) !important; }
.firebaseui-list-item:nth-child(2) .firebaseui-idp-button { background-color: var(--il-purple) !important; }

.firebaseui-idp-text {
  font-family: Helvetica, "Trebuchet MS", Arial, sans-serif !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  padding-left: 14px;
  text-align: left;
}

.firebaseui-idp-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}
.firebaseui-idp-icon { width: 17px; height: 17px; }

/* ---- Misc ---- */
.loader { margin-top: 12px; color: var(--il-gray); font-size: 14px; }

.error {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(190, 31, 45, 0.08);
  border: 1px solid rgba(190, 31, 45, 0.18);
  color: var(--il-red);
  font-size: 14px;
  text-align: left;
}

.footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--il-gray);
  font-size: 12px;
}

@media (max-width: 480px) {
  .card { padding: 34px 24px 24px; border-radius: 16px; }
  .brand { font-size: 34px; }
}