:root {
  --keycloak-logo-url: url('../brand/logo/lockup-white.svg');
  --keycloak-card-top-color: var(--uj-yellow);
}
.login-pf body { background: var(--uj-background); min-height: 100vh; height: auto; }
.pf-v5-c-login { min-height: 100vh; padding: 2rem 1rem; }
.pf-v5-c-login__container { width: 100%; max-width: 34rem; margin: auto; grid-template-columns: minmax(0, 1fr); }
#kc-header { margin-bottom: 1.5rem; }
#kc-header-wrapper {
  background: url('../brand/logo/lockup-white.svg') no-repeat center / contain;
  width: min(100%, 340px); height: 96px; margin: 0 auto; font-size: 0; letter-spacing: 0;
}
.pf-v5-c-login__main { background: var(--uj-surface); color: white; border-radius: .5rem; border: 1px solid var(--uj-border); box-shadow: 0 8px 30px #00305b40; }
.pf-v5-c-login__main-header { border-top: 3px solid var(--uj-yellow); border-radius: .5rem .5rem 0 0; }
#kc-page-title { font-family: var(--uj-font-ui); color: white; font-size: 1.6rem; font-weight: 500; }
.pf-v5-c-login__main-footer-band { background: var(--uj-surface-raised); color: var(--uj-foreground-muted); }
.pf-v5-c-login__main-body a:not(.pf-v5-c-button) { text-decoration: underline; text-underline-offset: .2em; }
#kc-social-providers .pf-v5-c-button { color: var(--uj-link); background: var(--uj-surface-raised); border: 1px solid var(--uj-border); border-radius: var(--uj-radius); }
.pf-v5-c-form-control > input, .pf-v5-c-form-control > select, .pf-v5-c-form-control > textarea { background: transparent; color: var(--uj-foreground); }
.pf-v5-c-check__label, .pf-v5-c-form__label, .pf-v5-c-helper-text { color: var(--uj-foreground); }
@media(max-width: 600px) { .pf-v5-c-login { padding: 1rem .75rem; } }

/* Both registration actions use the same primary button treatment. */
#kc-register-form #kc-form-buttons input[type="submit"],
#kc-register-form #kc-form-options a,
#kc-registration a,
#kc-social-providers :is(#social-uj, #social-usos) {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .5rem 1rem;
  border: 0;
  border-radius: var(--uj-radius);
  background: var(--uj-primary);
  color: var(--uj-on-primary);
  font: 500 1rem/1.5 var(--uj-font-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
#kc-register-form #kc-form-buttons input[type="submit"]:hover,
#kc-register-form #kc-form-options a:hover,
#kc-registration a:hover,
#kc-social-providers :is(#social-uj, #social-usos):hover { background: var(--uj-primary-hover); }
#kc-register-form #kc-form-buttons input[type="submit"]:active,
#kc-register-form #kc-form-options a:active,
#kc-registration a:active,
#kc-social-providers :is(#social-uj, #social-usos):active { background: var(--uj-primary-active); }
#kc-register-form #kc-form-buttons input[type="submit"]:focus-visible,
#kc-register-form #kc-form-options a:focus-visible,
#kc-registration a:focus-visible,
#kc-social-providers :is(#social-uj, #social-usos):focus-visible { outline: 3px solid white; outline-offset: 3px; }
#kc-register-form > .pf-v5-c-login__main-footer-band { background: transparent; padding: 0; margin: 0; }
#kc-register-form #kc-form-options { padding: 0; }

#kc-info.pf-v5-c-login__main-footer-band { background: transparent; padding: 0; }
#kc-info-wrapper { padding: 0; }

#kc-social-providers :is(#social-uj, #social-usos)[aria-disabled="true"] { opacity: .6; cursor: wait; }

/* Action buttons replace the footer band, so its divider is unnecessary. */
#kc-info.pf-v5-c-login__main-footer-band,
#kc-register-form > .pf-v5-c-login__main-footer-band {
  border-block-start: 0;
  --pf-v5-c-login__main-footer-band--BorderTopWidth: 0;
}

/* Compact flag-only native language selector. */
.pf-v5-c-login__main-header-utilities { justify-self: end; }
.pf-v5-c-login__main-header-utilities > .pf-v5-c-form-control { width: 4.5rem; }
#login-select-toggle { font-size: 1.2rem; min-width: 0; }


.registration-methods { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 0; }
.registration-methods p { margin: 0; }

/* The form supplies its own gap around this divider. */
#kc-register-form > .kc-login-divider { margin-block: 0; }
