/* UEL — Keycloak login theme.
 * Extends keycloak.v2 (PatternFly v5). Customization is done by overriding the
 * CSS custom properties that keycloak.v2 exposes plus a few PatternFly v5 tokens.
 * Palette taken from https://sites.uel.br/portaltransparencia/ and https://portal.uel.br
 *   navbar-uel  -> #00753B (primary green)
 *   bg-uel      -> #002C18 (deep green)
 */

:root {
  /* keycloak.v2 hooks (see theme/keycloak.v2/login/resources/css/styles.css).
   * --keycloak-logo-url is intentionally omitted: it targets div.kc-logo-text,
   * which is not rendered by the v2 template. The visible logo is painted on
   * #kc-header-wrapper below instead. */
  --keycloak-bg-logo-url:   none;
  --keycloak-card-top-color: #00753B;

  /* PatternFly v5 tokens used by buttons, links, focus rings */
  --pf-v5-global--primary-color--100: #00753B;
  --pf-v5-global--primary-color--200: #002C18;
  --pf-v5-global--link--Color:        #00753B;
  --pf-v5-global--link--Color--hover:  #002C18;
  --pf-v5-global--active-color--100:  #00753B;
  --pf-v5-global--BackgroundColor--dark-100: #00753B;
}

/* keycloak.v2 sets the body background from --keycloak-bg-logo-url; with
 * `none` we lose the image, so paint a UEL green gradient instead. */
.login-pf body,
html.login-pf,
body.login-pf {
  background: linear-gradient(160deg, #00753B 0%, #002C18 100%) no-repeat center center fixed !important;
  background-size: cover !important;
}

/* Replace the realm-name text header with the official UEL vertical logo (icon + "Universidade Estadual de Londrina").
 * The SVG is a white-fill vector trace of the color vertical lockup from portal.uel.br. */
#kc-header-wrapper {
  font-size: 0 !important;
  color: transparent !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 0 !important;
  background: url("../img/logo-uel-vertical.svg") center/contain no-repeat;
  height: 280px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0;
}
#kc-header-wrapper * {
  display: none;
}

/* Primary button: use UEL green even when PF tokens are themed for dark mode. */
.pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: #00753B;
  --pf-v5-c-button--m-primary--hover--BackgroundColor: #009149;
  --pf-v5-c-button--m-primary--active--BackgroundColor: #002C18;
  --pf-v5-c-button--m-primary--focus--BackgroundColor: #009149;
}

/* Form-control focus ring in UEL green */
.pf-v5-c-form-control:focus-within {
  --pf-v5-c-form-control--focus--BorderBottomColor: #00753B;
}

/* Links in the card body */
.pf-v5-c-login__main a {
  color: #00753B;
}
.pf-v5-c-login__main a:hover {
  color: #002C18;
}

/* Footer / info section sits on the green background — keep text readable. */
.pf-v5-c-login__main-footer-band-item,
.pf-v5-c-login__main-footer-band-item a {
  color: rgba(255, 255, 255, 0.92) !important;
}
.pf-v5-c-login__main-footer-band-item a {
  text-decoration: underline;
}
