/* =========================================================
   Faculti Property Services - MERCStream sign-in page (AB#283)
   Loaded by Login.aspx only, after the MercAgents theme stylesheet.
   Tokens are from the Fai Design System (colors_and_type.css).
   ========================================================= */

@font-face { font-family: "Season Sans";  src: url("fonts/SeasonSans-Regular.woff2") format("woff2");        font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Season Sans";  src: url("fonts/SeasonSans-SemiBold.woff2") format("woff2");       font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Season Serif"; src: url("fonts/SeasonSerif-Regular.woff2") format("woff2");       font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --brand-primary:        #411C76;
  --brand-primary-hover:  #5A3396;
  --brand-primary-subtle: rgba(65, 28, 118, 0.08);
  --brand-light:          #E3D9FA;
  --brand-gradient:       linear-gradient(135deg, #432275 0%, #24163C 100%);

  --btn-primary:          #FF7800;
  --btn-primary-hover:    #E86800;

  --color-bg:             #F0F0F0;
  --color-surface:        #FFFFFF;
  --color-border:         #E3D9FA;
  --color-border-subtle:  #F0F0F0;

  --fg-1: #000000;
  --fg-2: #411C76;
  --fg-3: #6B5F7E;

  --color-success: #16A34A;
  --color-warn:    #D97706;
  --color-danger:  #DC2626;

  --font-display: "Season Serif", "Times New Roman", Times, Georgia, serif;
  --font-body:    "Season Sans", Arial, Helvetica, sans-serif;

  --shadow-sm: 0 1px 2px  rgba(65, 28, 118, 0.06);
  --shadow-md: 0 2px 8px  rgba(65, 28, 118, 0.08);
  --shadow-lg: 0 4px 24px rgba(65, 28, 118, 0.10);
  --shadow-xl: 0 8px 40px rgba(65, 28, 118, 0.12);
  --focus-ring: 0 0 0 3px rgba(67, 34, 118, 0.08);
}

/* =========================================================
   LOGIN (AgentInterface.master + Login.aspx)
   Design system: auth pages are a centred card on the hero gradient.
   ========================================================= */

:root body,
:root body .main-wrapper {
  font-family: var(--font-body);
}

/* legacy theme paints a grey drop-shadow column on <html>; the gradient replaces it */
html:root {
  background: var(--brand-gradient) !important;   /* not "fixed": that leaves pages taller than one screen unpainted below the fold */
  min-height: 100%;
  height: auto !important;
}
:root body {
  background: transparent !important;
  margin: 0 !important;
  padding: 12vh 16px 32px !important;
  box-sizing: border-box;
}

/* the 780px white column becomes the auth card */
:root body .main-wrapper {
  width: 420px !important;
  margin: 0 auto !important;
  padding: 40px 40px 28px !important;
  background: var(--color-surface) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: var(--shadow-xl);
  box-sizing: border-box;
  min-height: 0 !important;
  height: auto !important;
}

:root body #aspnetForm { width: auto !important; margin: 0 !important; }
:root body .main-wrapper > div { display: none; }   /* empty legacy spacer under the form */

:root body #logo,
:root body #logo2,
:root body .innerContainer {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  text-align: center;
}

/* swap the Merc artwork for the Faculti lockup */
:root body #logo img { display: none; }
:root body #logo {
  height: 72px !important;
  background: url("images/faculti-ps-logo-indigo.png") center / contain no-repeat;
}
:root body #logo2 img { display: none; }
:root body #logo2::after {
  content: "MERCStream";
  display: block;
  margin: 20px 0 4px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.2;
  color: var(--brand-primary);
}

:root body .innerContainer > table { width: 100%; }
:root body .innerContainer br { display: none; }

/* the asp:Login table — strip the inline grey box + teal title bar */
:root body table.loginDetails {
  width: 100% !important;
  margin-top: 16px;
  background: transparent !important;
  border: 0 !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
}
:root body table.loginDetails table { width: 100%; }
:root body table.loginDetails td { padding: 0 !important; text-align: left !important; display: block; width: auto !important; height: auto !important; }
:root body table.loginDetails tr { display: block; }

/* teal title bar -> serif heading (Recover password / Password expiry keep their own title) */
:root body table.loginDetails td[style*="4AACC5" i] {
  background: transparent !important;
  color: var(--brand-primary) !important;
  font-family: var(--font-display) !important;
  font-size: 24px !important;
  font-weight: 400 !important;
  line-height: 1.2;
  text-align: center !important;
  margin: 4px 0 10px;
}
/* instruction / message rows */
:root body table.loginDetails td[colspan="2"][align="center"]:not([style*="4AACC5" i]) {
  text-align: center !important;
  color: var(--fg-3);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 6px;
}
/* the sign-in box itself: "Log In" -> quiet sentence-case prompt */
:root body #ctl00_mainContent_Login1 td[style*="4AACC5" i] {
  font-family: var(--font-body) !important;
  font-size: 0 !important;
  color: var(--fg-3) !important;
  margin: 0 0 20px;
}
:root body #ctl00_mainContent_Login1 td[style*="4AACC5" i]::after {
  content: "Sign in to continue";
  font-size: 14px;
}

:root body table.loginDetails label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
}
:root body table.loginDetails label::after { content: none; }

:root body table.loginDetails input[type="text"],
:root body table.loginDetails input[type="password"] {
  width: 100% !important;
  box-sizing: border-box;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
:root body table.loginDetails input[type="text"]:focus,
:root body table.loginDetails input[type="password"]:focus {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md), var(--focus-ring);
}
:root body table.loginDetails span[id$="Required"] { position: absolute; color: var(--color-danger); }

:root body table.loginDetails td[style*="Red" i] { color: var(--color-danger) !important; font-size: 13px; margin-top: 8px; }

/* orange is the CTA, full stop */
:root body table.loginDetails input[type="submit"] {
  width: 100% !important;
  height: auto !important;
  margin-top: 22px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--btn-primary) !important;
  background-image: none !important;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 150ms ease;
}
:root body table.loginDetails input[type="submit"]:hover { background: var(--btn-primary-hover) !important; }

/* Cancel (Recover password / Password expiry) is the secondary action, under the CTA */
:root body table.loginDetails input[type="submit"][id$="btnCancel"] {
  margin-top: 10px;
  color: var(--brand-primary);
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border);
}
:root body table.loginDetails input[type="submit"][id$="btnCancel"]:hover { background: var(--color-bg) !important; }

/* version line */
:root body table.loginDetails td[style*="Gray"] {
  margin-top: 18px;
  text-align: center !important;
  font-size: 11px;
  color: var(--fg-3) !important;
}

:root body #ctl00_mainContent_recoverPasswordLink,
:root body .innerContainer p a {
  font-size: 13px;
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
:root body .innerContainer p a:hover { color: var(--brand-primary-hover); }
:root body .innerContainer p { margin: 14px 0 0; text-align: center; }

/* footer: drop the teal bar image, sit quietly on the gradient */
:root body .form-footer {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 28px auto 0 !important;
  left: auto !important;
  background: none !important;
  text-align: center;
}
:root body .form-footer p,
:root body .form-footer #lhs {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72) !important;
  text-align: center !important;
}
:root body .contactdetails { display: none; }
