/*
 * PF4 -> PF5 compatibility bridge for keycloak.v2 parent.
 * Keep this file focused on selector bridging and low-risk parity tweaks.
 */

body[data-page-id^="login-"] {
  background: #f2f2f2;
  padding-bottom: 4rem;
}

/* Stable wrapper hooks for theme-level layout control across PF versions. */
#dv-login-layout.dv-login-standard {
  min-height: 100vh;

}

#dv-login-layout.dv-login-with-side-panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 2fr;
}

/* Bridge legacy PF4 login wrappers to PF5 login wrappers. */
.login-pf-page,
.pf-v5-c-login__main {
  padding-top: 0;
  min-height: 100vh;
}

.login-pf-page-header,
.pf-v5-c-login__main-header {
  margin: 0;
  padding: 0;
}

/* Bridge legacy PF4 card styles to PF5 card shell. */
.card-pf,
.pf-v5-c-card {
  max-width: 600px;
  height: fit-content;
  box-shadow: none;
  border: none;
  background-color: transparent;
  padding-left: 1rem;
  padding-right: 1rem;
}

.login-pf-page .card-pf .instruction,
.pf-v5-c-card .instruction {
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  width: 460px;
  color: #14113b;
  margin: 0;
}

.login-pf-page .card-pf li.instruction,
.pf-v5-c-card li.instruction {
  font-size: 12px;
  color: #474747;
  width: 475px;
}

.login-pf-page .card-pf p,
.pf-v5-c-card p {
  color: black;
}

/* Keep form card spacing and title hierarchy visually close to legacy PF4. */
#dv-login-layout .pf-v5-c-card,
#dv-login-layout .card-pf {
  margin: auto;
}

h1#kc-page-title {
  color: #14113b;
  font-size: 28px;
  font-weight: 500;
  line-height: 44px;
  margin: 0;
}

#kc-content-wrapper {
  margin-top: 32px;
}

#kc-page-title {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
}

a {
  color: #7740bf;
  font-size: 16px;
}

label {
  color: black;
}

/* Keep CTA visual parity for both plain inputs and PF5 button classes. */
#kc-form-buttons input,
#kc-form-buttons .pf-v5-c-button {
  background-color: #7740bf;
  border-radius: 4px;
}

#kc-form-buttons input:disabled,
#kc-form-buttons .pf-v5-c-button:disabled {
  background-color: grey;
  border-radius: 4px;
  color: white;
}

#kc-social-providers ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#kc-social-providers li + li {
  margin-top: 0.75em;
}

#kc-social-providers .pf-v5-c-button {
  background-color: #0066cc;
  border-radius: 4px;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#kc-header.dv-kc-header-login {
  position:absolute
}

.dv-login-form-options {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#dv-no-account-warning {
  padding-top: 2em;
}

.pf-v5-c-form__group {
  padding-top:.75em;
}

#custom-error-banner-message {
  font-size:14px;
}
