:root {
  --keycloak-logo-url: url('../img/logo.svg');
  --keycloak-bg-logo-color: #ffffff;
  --keycloak-logo-height: 52px;
  --keycloak-logo-width: 152px;
  --keycloak-card-top-color: #fd9d19;

  /* Ommni Primary Color Override */
  --ommni-primary: #fd9d19;
  --ommni-primary-hover: #e88a0a;
  --ommni-primary-active: #d47a00;

  /* Override PatternFly primary colors */
  --pf-v5-global--primary-color--100: #fd9d19;
  --pf-v5-global--primary-color--200: #e88a0a;
  --pf-v5-global--primary-color--300: #d47a00;
  --pf-v5-global--primary-color--400: #c06b00;
  --pf-v5-global--primary-color--500: #ac5c00;
  --pf-v5-global--primary-color--600: #984d00;
  --pf-v5-global--primary-color--700: #843e00;
  --pf-v5-global--primary-color--800: #702f00;
  --pf-v5-global--primary-color--900: #5c2000;

  --pf-v5-global--primary-color--100: #fd9d19;
  --pf-v5-global--primary-color--200: #e88a0a;
  --pf-v5-global--primary-color--300: #d47a00;
  --pf-v5-global--primary-color--400: #c06b00;
  --pf-v5-global--primary-color--500: #ac5c00;
  --pf-v5-global--primary-color--600: #984d00;
  --pf-v5-global--primary-color--700: #843e00;

  --pf-v5-global--primary-color--dark-100: #fd9d19;
  --pf-v5-global--primary-color--dark-200: #e88a0a;
  --pf-v5-global--primary-color--dark-300: #d47a00;
  --pf-v5-global--primary-color--dark-400: #c06b00;
  --pf-v5-global--primary-color--dark-500: #ac5c00;
  --pf-v5-global--primary-color--dark-600: #984d00;
  --pf-v5-global--primary-color--dark-700: #843e00;
  --pf-v5-global--primary-color--dark-800: #702f00;
  --pf-v5-global--primary-color--dark-900: #5c2000;
}

.pf-v5-c-login__container {
  grid-template-columns: 34rem;
  grid-template-areas:
    'header'
    'main';
}

/* Info section - top margin + bottom padding */
.pf-v5-c-login__main-footer-band:first-child {
  margin-block-start: var(--pf-v5-global--spacer--lg);
}

.pf-v5-c-login__main-footer-band:last-child {
  padding-bottom: 0;
}
/* Info section */

.login-pf body {
  background: var(--keycloak-bg-logo-color);
  height: 100%;
}

.pf-v5-c-login__main {
  background-color: #ffffff !important;
}

/* Primary Button Styling with Ommni Color */
.pf-v5-c-button.pf-m-primary,
button[type='submit'],
input[type='submit'] {
  background-color: #fd9d19 !important;
  border-color: #fd9d19 !important;
  color: #ffffff !important;
}

.pf-v5-c-button.pf-m-primary:hover,
button[type='submit']:hover,
input[type='submit']:hover {
  background-color: #e88a0a !important;
  border-color: #e88a0a !important;
}

.pf-v5-c-button.pf-m-primary:active,
button[type='submit']:active,
input[type='submit']:active {
  background-color: #d47a00 !important;
  border-color: #d47a00 !important;
}

/* Input Focus States with Ommni Color */
.pf-v5-c-form-control:focus,
input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus {
  border-color: #fd9d19 !important;
  box-shadow: 0 0 0 1px #fd9d19 !important;
}

/* Links with Ommni Color */
a {
  color: #fd9d19 !important;
}

a:hover {
  color: #e88a0a !important;
}

/* Card Top Border with Ommni Color */

/* Text Colors for White Background */
body,
.pf-v5-c-login__main,
.pf-v5-c-form,
.pf-v5-c-form-control,
input,
label,
.pf-v5-c-form__label,
.pf-v5-c-form__label-text,
.pf-v5-c-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #1a202c !important;
}

/* Secondary text colors */
.pf-v5-c-helper-text,
.pf-v5-c-form__helper-text,
small,
.text-muted {
  color: #4a5568 !important;
}

/* Placeholder text */
.pf-v5-c-form-control::placeholder,
input::placeholder {
  color: #718096 !important;
  opacity: 1 !important;
}

/* Hide the default header text */
.pf-v5-c-login__header .pf-v5-c-brand {
  color: transparent !important;
  font-size: 0 !important;
  text-align: center;
}

/* Logo above "Sign in to your account" text */
.pf-v5-c-login__main-header::before {
  content: '';
  display: block;
  background-image: var(--keycloak-logo-url);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  height: var(--keycloak-logo-height);
  width: var(--keycloak-logo-width);
  margin: 1rem auto 0.75rem auto !important;
}

/* Ensure the main header has proper spacing */
.pf-v5-c-login__main-header {
  text-align: center !important;
  padding-top: 1rem !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

div.kc-logo-text span {
  display: none;
}

.kc-login-tooltip {
  position: relative;
  display: inline-block;
}

.kc-login-tooltip .kc-tooltip-text {
  top: -3px;
  left: 160%;
  background-color: black;
  visibility: hidden;
  color: #fff;

  min-width: 130px;
  text-align: center;
  border-radius: 2px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  padding: 5px;

  position: absolute;
  opacity: 0;
  transition: opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
  visibility: visible;
  opacity: 0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
  content: ' ';
  position: absolute;
  top: 15px;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

#kc-recovery-codes-list {
  columns: 2;
}

#certificate_subjectDN {
  overflow-wrap: break-word;
}

/* Specific styling for the main login title */
.pf-v5-c-login__main-header .pf-v5-c-title,
.pf-v5-c-login__main-header h1 {
  font-size: 1.5rem !important;
  color: #1a202c !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin-top: 0 !important;
  margin-bottom: 2rem !important;
}

#kc-verify-email-form {
  margin-top: 24px;
  margin-bottom: 24px;
}

#kc-header-wrapper {
  font-size: 29px;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.2em;
  white-space: normal;
  color: var(--pf-v5-global--Color--light-100) !important;
  text-align: center;
}

hr {
  margin-top: var(--pf-v5-global--spacer--sm);
  margin-bottom: var(--pf-v5-global--spacer--md);
}

#kc-social-providers svg:not(.google) {
  filter: invert(47%) sepia(88%) saturate(7486%) hue-rotate(199deg) brightness(91%) contrast(101%);
}

#kc-social-providers svg {
  height: var(--pf-v5-global--FontSize--xl);
}

@media (prefers-color-scheme: dark) {
  #kc-social-providers svg:not(.google) {
    filter: invert(54%) sepia(96%) saturate(2028%) hue-rotate(174deg) brightness(99%) contrast(97%);
  }
}

@media (min-width: 768px) {
  div.pf-v5-c-login__main-header {
    grid-template-columns: 70% 30%;
  }
}
