/* Version 1.0.3 */
/* === Load Font Awesome === */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');

/* === Page background === */
html, body, #keycloak-bg {
  background-color: #e4e4e4 !important;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* === Hide header, page title, and field labels === */
#kc-header,
#kc-header-wrapper,
#kc-page-title {
  display: none !important;
}

/* Hide the label text AND collapse its wrapper so it doesn't
   leave behind empty padding-bottom space (pf-v5-u-pb-xs) */
.pf-v5-c-form__group-label {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* === Center the login box on screen === */
.pf-v5-c-login__container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

/* === Login card === */
.pf-v5-c-login__main {
  width: 100%;
  max-width: 407px;
  margin: 0 auto !important;
  padding: 1.5rem 1.5rem 1.75rem;
  background-color: #f6f6f6 !important;
  border: 1px solid #d8d8d8 !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
}

/* === Logo header area ===
   APEX shows the logo inside its own white inset panel, not
   floating on the card's gray background — give it one here too. */
.pf-v5-c-login__main-header {
  width: 355px;
  margin-left: auto;
  margin-right: auto;
  height: 190px;
  display: block !important;
  background-color: #ffffff !important;
  border-radius: 0 !important;
  background-image: url('../img/Realpaylogo_PS2.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin-bottom: 5rem;
  padding: 0 !important;
  box-sizing: border-box;
}

/* === Form container === */
#kc-form-wrapper {
  width: 100%;
}

/* === Kill ALL PatternFly borders and shadows === */
.pf-v5-c-form-control,
.pf-v5-c-input-group,
.pf-v5-c-button.pf-m-control {
  --pf-v5-c-form-control--BorderColor: transparent !important;
  --pf-v5-c-form-control--hover--BorderBottomColor: transparent !important;
  --pf-v5-c-form-control--focus--BorderBottomColor: transparent !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
}

.pf-v5-c-form-control::after,
.pf-v5-c-form-control::before,
.pf-v5-c-button.pf-m-control::after,
.pf-v5-c-button.pf-m-control::before {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.pf-v5-c-button.pf-m-control {
  --pf-v5-c-button--m-control--after--BorderTopColor: transparent !important;
  --pf-v5-c-button--m-control--after--BorderRightColor: transparent !important;
  --pf-v5-c-button--m-control--after--BorderBottomColor: transparent !important;
  --pf-v5-c-button--m-control--after--BorderLeftColor: transparent !important;
}

/* === Username wrapper — border on form-control === */
.pf-v5-c-form-control:has(#username) {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  height: 42px !important;
  border: 1.5px solid #d0d0d0 !important;
  border-radius: 0 !important;
  background-color: #ffffff !important;
  box-sizing: border-box !important;
}

.pf-v5-c-form-control:has(#username:focus) {
  border: 2px solid #07245d !important;
}

/* === Password wrapper — border on INPUT GROUP to include eye button === */
.pf-v5-c-input-group:has(#password) {
  display: flex !important;
  align-items: center !important;
  height: 42px !important;
  border: 1.5px solid #d0d0d0 !important;
  border-radius: 0 !important;
  background-color: #ffffff !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative !important;
}

.pf-v5-c-input-group:has(#password:focus) {
  border: 2px solid #07245d !important;
}

/* === Input fields === */
#username,
#password {
  height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  padding-left: 36px !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #333 !important;
  outline: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  flex: 1 !important;
}

#username:focus,
#password:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background-color: transparent !important;
}

/* === Username icon (fa-user) === */
.pf-v5-c-form-control:has(#username)::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f007";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaaaaa;
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

/* === Password icon (fa-key) === */
.pf-v5-c-input-group:has(#password)::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f084";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaaaaa;
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

/* === Eye toggle button inside the border ===
   APEX's reference field has no show/hide icon. Uncomment the
   `display: none` rule below if you want strict pixel parity;
   leave the block below it if you'd rather keep the eye icon
   as an added UX affordance. */
#password-show-password {
  /* display: none !important; */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 10px !important;
  color: #aaaaaa !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  flex-shrink: 0 !important;
}

#password-show-password:hover {
  color: #07245d !important;
  background: transparent !important;
}

/* === Form group spacing === */
.pf-v5-c-form__group {
  margin-bottom: 1 em !important;
  width: 355px;
  margin-left: auto;
  margin-right: auto;
}

.pf-v5-c-form__group:last-child {
  margin-bottom: 0 !important;
}

/* === Sign In button === */
#kc-login {
  width: 355px;
  background-color: #07245d !important;
  border-color: #07245d !important;
  color: #ffffff !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700 !important;
  font-size: 15px;
  height: 44px;
  border-radius: 0 !important;
  margin-top: 4px;
  letter-spacing: 0.3px;
  cursor: pointer;
}

#kc-login:hover {
  background-color: #0a2e77 !important;
  border-color: #0a2e77 !important;
}

#password::-ms-reveal,
#password::-ms-clear,
#password::-webkit-credentials-auto-fill-button {
  display: none !important;
}