/* Keycloak 26.7.1 keycloak.v2 login customizations. */

:root {
  --pf-v5-global--FontFamily--heading: 'Roboto', 'All Round Gothic Medium', sans-serif;
  --pf-v5-global--FontFamily--text: 'Roboto', 'All Round Gothic Medium', sans-serif;
  --hf-login-input-background: #fbfbfd;
  --hf-login-footer-background: #d5d5d5;
  --hf-login-muted-color: #72767b;
  --hf-login-button-foreground: #fff;
  --hf-login-shadow-highlight: var(--primaryColorWhite);
}

.pf-v5-c-login {
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 4.5rem;
}

.pf-v5-c-login__container {
  width: calc(100% - 2rem);
  max-width: 40.625rem;
  grid-template-columns: minmax(20rem, 40.625rem);
  padding-bottom: 5rem;
}

.pf-v5-c-login__main {
  max-width: 40.625rem;
  padding-bottom: 2rem;
  color: var(--textColor);
  background: none;
  box-shadow: none;
}

#kc-header,
#kc-header-wrapper {
  color: var(--textColor) !important;
}

#kc-page-title {
  width: 100%;
  font-family: 'Roboto Bold', 'Roboto', sans-serif;
  font-size: 2rem;
  font-weight: normal;
  text-align: center;
}

.hf-login-subtitle {
  margin-bottom: 0;
  text-align: center;
}

.pf-v5-c-form__group {
  position: relative;
  margin-top: 0.75rem;
}

.pf-v5-c-login__main-header {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 0.25rem;
  padding-top: 2rem;
  border-top: 0;
}

.pf-v5-c-login__main:has(#password) .pf-v5-c-login__main-header,
.pf-v5-c-login__main:has(#kc-reset-password-form) .pf-v5-c-login__main-header {
  padding-top: 4rem;
}

.pf-v5-c-login__main-body:has(#password) .hf-login-subtitle {
  margin-bottom: 1rem;
}

.pf-v5-c-login__main-header-utilities {
  align-self: flex-end;
}

.pf-v5-c-form__group > .pf-v5-c-form__group-label,
.pf-v5-c-form__group > .pf-v5-c-form__label {
  position: absolute;
  top: 0.85rem;
  left: 1.15rem;
  z-index: 1;
  margin: 0;
  color: #6c757d;
  line-height: 1;
  pointer-events: none;
  transition:
    top 0.2s ease,
    font-size 0.2s ease;
}

.pf-v5-c-form__group:focus-within > .pf-v5-c-form__group-label,
.pf-v5-c-form__group:focus-within > .pf-v5-c-form__label,
.pf-v5-c-form__group:has(input.input-filled) > .pf-v5-c-form__group-label,
.pf-v5-c-form__group:has(input.input-filled) > .pf-v5-c-form__label,
.pf-v5-c-form__group:has(input:autofill) > .pf-v5-c-form__group-label,
.pf-v5-c-form__group:has(input:autofill) > .pf-v5-c-form__label,
.pf-v5-c-form__group:has(input:-webkit-autofill) > .pf-v5-c-form__group-label,
.pf-v5-c-form__group:has(input:-webkit-autofill) > .pf-v5-c-form__label,
.pf-v5-c-form__group:has(textarea.input-filled) > .pf-v5-c-form__group-label,
.pf-v5-c-form__group:has(textarea.input-filled) > .pf-v5-c-form__label,
.pf-v5-c-form__group:has(select.input-filled) > .pf-v5-c-form__group-label,
.pf-v5-c-form__group:has(select.input-filled) > .pf-v5-c-form__label {
  top: -1.1rem;
  font-size: 0.75rem;
}

.pf-v5-c-login__main-header-utilities .pf-v5-c-form-control,
.pf-v5-c-login__main-header-utilities .pf-v5-c-form-control:hover,
.pf-v5-c-login__main-header-utilities .pf-v5-c-form-control:focus-within {
  width: 5.25rem;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  outline: 0;
}

#login-select-toggle {
  width: 5.25rem;
  min-height: auto;
  padding: 0.25rem 1rem 0.25rem 0;
  color: var(--hf-login-muted-color);
  font-size: 0.75rem;
}

.pf-v5-c-login__main-header-utilities .pf-v5-c-form-control__toggle-icon {
  transform: translateY(-0.25rem);
}

.pf-v5-c-form-control {
  border: 1px solid #000;
  border-radius: 1.25rem 1.25rem 0 1.25rem;
  background-color: var(--hf-login-input-background);
}

.pf-v5-c-form-control:hover,
.pf-v5-c-form-control:focus-within {
  border-color: var(--primaryColor);
  outline: 2px solid var(--primaryColor);
  outline-offset: -2px;
}

.pf-v5-c-form-control.pf-m-error {
  border-color: #c9190b;
}

.pf-v5-c-form-control::before,
.pf-v5-c-form-control::after {
  border: 0;
}

.pf-v5-c-form-control > input,
.pf-v5-c-form-control > textarea,
.pf-v5-c-form-control > select {
  min-height: 2.75rem;
  background-color: transparent;
  outline: 0;
}

.pf-v5-c-input-group {
  background-color: var(--hf-login-input-background);
  border: 1px solid #000;
  border-radius: 1.25rem 1.25rem 0 1.25rem;
}

.pf-v5-c-input-group:hover,
.pf-v5-c-input-group:focus-within {
  border-color: var(--primaryColor);
  outline: 2px solid var(--primaryColor);
  outline-offset: -2px;
}

.pf-v5-c-input-group .pf-v5-c-form-control,
.pf-v5-c-input-group .pf-v5-c-form-control:hover,
.pf-v5-c-input-group .pf-v5-c-form-control:focus-within {
  background-color: transparent;
  border: 0;
  outline: 0;
}

.pf-v5-c-input-group:has(.pf-v5-c-form-control.pf-m-error) {
  border-color: #c9190b;
}

.pf-v5-c-input-group__item .pf-v5-c-button.pf-m-control {
  color: var(--textColor);
  background-color: transparent;
  border-radius: 0 1.25rem 0 0;
}

.pf-v5-c-input-group__item .pf-v5-c-button.pf-m-control::after {
  border: 0;
}

.pf-v5-c-form__actions,
div#kc-form-buttons {
  display: flex;
  justify-content: flex-end;
}

.pf-v5-c-form__group:has(> .pf-v5-c-form__actions),
div#kc-form-buttons {
  margin-top: 1rem;
}

#kc-form-login > .pf-v5-c-form__group:not(:has(*)) {
  display: none;
  margin-top: 0;
}

.pf-v5-c-button.pf-m-primary {
  width: auto;
  padding: 0.5rem 1rem;
  color: var(--hf-login-button-foreground);
  font-family: 'All Round Gothic Medium', serif;
  font-size: 1rem;
  background-color: var(--primaryColor);
  border: 0;
  border-radius: 1.25rem 1.25rem 1.25rem 0;
  box-shadow:
    -15px -16px 30px var(--hf-login-shadow-highlight),
    5px 5px 20px #a6b4c8e6;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.pf-v5-c-button.pf-m-primary:hover {
  background-color: var(--primaryColor);
  box-shadow:
    -15px -16px 30px var(--hf-login-shadow-highlight),
    5px 5px 20px #a378fe;
}

.pf-v5-c-button.pf-m-primary:active {
  color: var(--primaryColor);
  background-color: var(--backgroundColor);
  border-color: var(--primaryColor);
  box-shadow:
    inset 5px 5px 10px #a6b4c8e6,
    inset -4px -4px 5px var(--hf-login-shadow-highlight);
}

.pf-v5-c-button.pf-m-secondary {
  width: auto;
  padding: 0.5rem 1rem;
  color: var(--textColor);
  font-family: 'All Round Gothic Medium', serif;
  font-size: 1rem;
  background: transparent;
  border: 1px solid var(--backgroundColor);
  border-radius: 1.25rem 1.25rem 1.25rem 0;
  box-shadow:
    -10px -10px 15px var(--hf-login-shadow-highlight),
    5px 5px 20px #a6b4c8e6;
}

.pf-v5-c-button.pf-m-secondary:hover {
  color: var(--primaryColor);
  background-color: transparent;
  border-color: var(--primaryColor);
}

.pf-v5-c-button.pf-m-secondary::after {
  border: 0;
}

#kc-reset-password-form .pf-v5-c-form__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  margin: 0;
  padding-top: 0;
}

#kc-reset-password-form {
  row-gap: 0.25rem;
}

#kc-reset-password-form .pf-v5-c-form__actions > .pf-m-primary {
  grid-row: 2;
  grid-column: 2;
}

#kc-reset-password-form .pf-v5-c-form__actions > a.pf-m-secondary {
  grid-row: 1;
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0;
  color: var(--primaryColorAnchor);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#kc-reset-password-form .pf-v5-c-form__actions > a.pf-m-secondary:hover {
  color: var(--primaryColor);
  background: none;
  border: 0;
}

#kc-social-providers .pf-v5-c-button.pf-m-secondary {
  justify-content: center !important;
  width: 100%;
  padding: 0.375rem 1rem;
  background: var(--hf-login-input-background);
  border: 1px solid var(--hf-login-footer-background);
  border-radius: 0;
  box-shadow: none;
}

#kc-social-providers .pf-v5-c-button.pf-m-secondary svg {
  display: none;
}

.pf-v5-c-login__main-footer-band:has(+ #kc-social-providers) {
  width: calc(100% + 1rem);
  margin-right: -0.5rem;
  margin-left: -0.5rem;
  padding: 0.5rem 1rem;
}

#kc-social-providers {
  width: calc(100% + 1rem);
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

#kc-info {
  padding-right: 0;
  padding-left: 0;
}

input.pf-v5-c-button.pf-m-primary {
  border-radius: 1.25rem 1.25rem 1.25rem 0 !important;
}

#kc-select-try-another-way-form {
  display: none;
}

.hf-login-back-link {
  margin-top: 1rem;
}

#invitationHint,
#kc-registration-terms-text,
#kc-terms-text {
  margin-bottom: 1.5rem;
}

#reload-hint {
  display: none;
  padding: 2rem 1rem;
  color: var(--hf-login-muted-color);
  text-align: center;
}

.hf-login-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 110;
  width: 100%;
  padding: 0.65rem 1rem;
  font-family: 'Play', sans-serif;
  text-align: center;
  background: var(--hf-login-footer-background);
}

.hf-login-footer__links a {
  color: var(--primaryColorAnchor);
  text-decoration: none;
}

@media (max-width: 768px) {
  .pf-v5-c-login {
    padding-top: 1.5rem;
  }

  .pf-v5-c-login__container {
    grid-template-columns: minmax(0, 1fr);
  }

  .pf-v5-c-login__main {
    padding-bottom: 7rem;
  }
}
