@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-VariableFont_wdth,wght.ttf") format("truetype");
}

:root {
  --keycloak-logo-url: url("https://cdn01.s3.eu-central-1.amazonaws.com/static/SPD_Logo_Rot.svg");
  --keycloak-logo-height: 130px;
  --spd-primary: #e3000f;

  --spd-error-color: #b900b9;
  --pf-v5-global--danger-color--100: var(--spd-error-color);
  --pf-v5-global--danger-color--200: var(--spd-error-color);
  --pf-v5-global--danger-color--300: var(--spd-error-color);
  --pf-v5-c-alert--m-inline--m-danger--BackgroundColor: #f8e6f8 !important;

  --pf-v5-global--primary-color--100: black !important;
  --pf-v5-global--primary-color--200: #801a2f !important;
  --pf-v5-global--link--Color: var(--spd-primary);
  --pf-v5-global--link--Color--hover: #801a2f;
  --pf-v5-global--primary-color--dark-100: var(--spd-primary) !important;
  --pf-v5-global--primary-color--dark-200: #801a2f !important;
  --pf-v5-c-form-control--focus--BorderBottomColor: var(--spd-primary) !important;
  --pf-v5-c-form-control--BorderBottomColor: var(--spd-primary) !important;
  --pf-v5-c-form-control--hover--BorderBottomColor: var(--spd-primary) !important;
  --pf-v5-global--active-color--100: var(--spd-primary) !important;
  --pf-v5-global--active-color--200: #801a2f !important;
  --keycloak-card-top-color: white !important;
  --pf-v5-global--FontFamily--heading: "Open Sans", "RedHatDisplay", helvetica,
    arial, sans-serif;
  --pf-v5-global--FontFamily--text: "Open Sans", "RedHatText", helvetica, arial,
    sans-serif;
}

.pf-v5-c-login__container {
  grid-template-columns: 40rem;
}

.pf-v5-c-helper-text {
  font-weight: bold;
}

.login-pf body {
  background: none;
  background-color: #ededed;
  height: 100%;

  #kc-info {
    margin-top: 1rem;
  }
}

#kc-registration {
  margin-top: 1.5rem;

  span {
    font-weight: bold;
  }

  a {
    margin-top: 1rem !important;
  }
}

.pf-v5-c-login__main-footer-band {
  border-block-start: none;
}

.pf-v5-c-form-control {
  &::after {
    border-block-end: none;
  }

  &::before {
    border-style: none;
  }
}


.pf-v5-c-form-control {
  position: relative;
  display: flex;
  align-items: center;

  &>input[type="text"],
  &>input[type="password"],
  &>input#kc-attempted-username,
  &#emailCode {
    background: none;
    border: 3px solid #8c8c8c;
    border-radius: 6px;
    box-sizing: border-box;
    color: #333333;
    font-family: "Open Sans";
    font-size: 1rem;
    font-weight: normal;
    height: 54px;
    line-height: 1.375rem;
    margin: 0;
    padding: 19px 12px;
    width: 100%;
    flex: 1;
    padding-right: 40px;
  }

  .pf-v5-c-form-control__utilities {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;

    .pf-v5-c-form-control__icon {
      font-size: 1.25rem;
      padding: 0;
    }
  }
}

div#kc-registration a,
form#kc-select-try-another-way-form a#try-another-way.pf-m-secondary {
  border-radius: 100vmax;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  height: 50px;
  line-height: 1rem;
  padding: 14px 28px;
  text-align: center;
  text-decoration: none;
  width: fit-content;

  transition: opacity 300ms ease-in-out, background-color 200ms ease-in-out,
    border 200ms ease-in-out, color 200ms ease-in-out;

  background-color: white;
  border: 3px solid black;
  color: black;

  &:hover {
    background-color: black;
    border: 3px solid black;
    color: white;
  }
}

#kc-totp-settings-form .pf-v5-c-form__actions {
  margin-block-end: 0;
  margin-block-start: 0;
  margin-inline-end: 0;
  margin-inline-start: 0;
}

#kc-update-email-form  .pf-v5-c-form__actions {
  margin-block-end: 0;
  margin-block-start: var(--pf-v5-c-form--GridGap); /* Match margin used between email input and logout sessions checkbox  */
  margin-inline-end: 0;
  margin-inline-start: 0;
}

#kc-form-login {

  /* Hides empty div if remember me is disabled, otherwise spacing is duplicated */
  &>div:not(:has(*)) {
    display: none;
  }
}

#kc-form-buttons>div {
  display: flex;
  gap: 0.7em;
  justify-content: space-between;
  flex-wrap: wrap;

  .pf-v5-c-button {
    margin: 0 !important;
  }
}

#kc-form-buttons .pf-v5-c-button,
#kc-form-buttons.pf-v5-c-button,
.pf-v5-c-form__actions .pf-v5-c-button,
#kc-select-try-another-way-form #try-another-way,
button#kc-login {
  border-radius: 100vmax;
  display: block-inline;
  margin: 0 auto;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  height: 50px;
  line-height: 1rem;
  padding: 14px 28px;
  text-align: center;
  text-decoration: none;
  width: fit-content;

  transition: opacity 300ms ease-in-out, background-color 200ms ease-in-out,
    border 200ms ease-in-out, color 200ms ease-in-out;

  &:after {
    border: none;
  }

  &.pf-m-primary {
    background-color: black;
    border: 3px solid black;
    color: white;

    &:hover {
      background-color: white;
      border: 3px solid black;
      color: black;
    }
  }

  &.pf-m-secondary {
    color: var(--spd-primary);
  }
}

.select-auth-container {
  border-top: none;

  li.pf-v5-c-data-list__item {
    border-block-end: none !important;
    border-block-start: none !important;
    padding-bottom: 1.5em;

    &:hover {
      box-shadow: none !important;
    }
  }

  .select-auth-box-parent {
    background-color: white;
    border: 2px solid black;
    color: black;
    border-radius: 25px;
    padding: 1em;

    &:hover {
      box-shadow: none !important;
      background-color: #e7e7e7;
    }

    .pf-m-icon,
    .pf-v5-c-data-list__item-action {
      padding: 0;
      margin: 0
    }

    .pf-v5-c-data-list__item-content {
      display: grid;
      padding: 0;
    }

    .pf-v5-c-data-list__cell {
      padding-block-end: 0px !important;
      padding-block-start: 0px !important;
    }

    .select-auth-box-headline {
      font-size: large;
      font-weight: bold;
    }

    .select-auth-box-desc {}
  }
}

#kc-otp-login-form #kc-form-buttons .pf-v5-c-button,
#kc-totp-settings-form .pf-v5-c-form__actions .pf-v5-c-button {
  background-color: white;
  border: 3px solid black;
  color: black;

  &:hover {
    background-color: black;
    border: 3px solid black;
    color: white;
  }

  &.pf-m-primary {
    background-color: black;
    border: 3px solid black;
    color: white;

    &:hover {
      background-color: white;
      border: 3px solid black;
      color: black;
    }
  }
}

.pf-v5-c-helper-text__item-text {
  color: var(--spd-error-color)
}

.pf-v5-c-login__main-body .subtitle .pf-v5-c-helper-text__item-text{
  color: black;
}

#kc-header-wrapper {
  margin-top: 3em;
}

div.kc-logo-text {
  background-position: center;
}

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;

  display: flex;
  justify-content: center;
  gap: 1.5rem;

  background: white;
  padding: 0.5rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (min-width: 576px) {
  .pf-v5-c-login__container {
    transform: translateY(calc(var(--keycloak-logo-height) / 2 * -1));
  }
}

@media (min-width: 1200px) {
  .pf-v5-c-login__container {
    transform: translateY(calc(var(--keycloak-logo-height) * -1));
  }
}