/* InvokePortal sign-in — brand styling. */

:root {
  --il-red: #BE1F2D;
  --il-red-dark: #9A1622;
  /* Purple retired — brand palette is red / white / slate. Slate now carries
     the secondary button, the top-bar gradient, and the background wash. */
  --il-slate: #5B6470;
  --il-slate-dark: #474E58;
  --il-slate-tint: #EFF0F2;
  /* ~8% slate on white — secondary hover + icon disc */
  --il-slate-tint-2: #E7E9EB;
  /* ~12% — secondary :active */
  --navy: #0F1B2D;
  --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(91, 100, 112, 0.16), transparent 62%),
    radial-gradient(1000px 520px at -12% 112%, rgba(190, 31, 45, 0.10), 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-slate) 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-slate);
  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,
    background-color .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.
   Styling is keyed on data-provider-id (set by FirebaseUI from the provider
   id in app.js), not list position: a staff-only deployment has just one
   button, so nth-child rules would misfire onto it. */
.firebaseui-idp-button[data-provider-id="saml.customer"] {
  background-color: var(--il-red) !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;
}

.firebaseui-idp-icon {
  width: 28px;
  height: 28px;
}

/* The customer button intentionally shows no logo for now — hide its
   icon disc entirely so the label sits flush. TODO: replace with a per-customer
   configurable school logo (set iconUrl in app.js from a config.js value) and
   drop this rule. */
.firebaseui-idp-button[data-provider-id="saml.customer"] .firebaseui-idp-icon-wrapper {
  display: none;
}

/* ---- Secondary provider (staff): outlined, white on slate ----
   The university button stays the solid-red primary; staff is the exception
   path, so it drops to an outline. Three things have to be overridden
   together: the inline background-color, the globally-white .firebaseui-idp-text,
   and the white icon disc (invisible on a white button). The base :hover uses
   filter: brightness() which only muddies a white surface, so it's swapped for
   an explicit background-color and reset with filter: none. */
.firebaseui-idp-button[data-provider-id="saml.invoke-staff"] {
  background-color: #fff !important;
  border-color: var(--il-slate);
  box-shadow: none;
}

.firebaseui-idp-button[data-provider-id="saml.invoke-staff"] .firebaseui-idp-text {
  color: var(--il-slate) !important;
}


.firebaseui-idp-button[data-provider-id="saml.invoke-staff"]:hover {
  background-color: var(--il-slate-tint) !important;
  filter: none;
  box-shadow: 0 4px 12px rgba(15, 27, 45, 0.10);
}

.firebaseui-idp-button[data-provider-id="saml.invoke-staff"]:active {
  background-color: var(--il-slate-tint-2) !important;
  filter: none;
  box-shadow: none;
}

/* ---- Misc ---- */
.loader {
  margin-top: 12px;
  color: var(--il-slate);
  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-slate);
  font-size: 12px;
}

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

  .brand {
    font-size: 34px;
  }
}