/*
    Styling for different input fields
 */

.oauth-input-field {
  background-position: 0.5rem center;
  background-size: 1.25rem;
  padding-left: 2rem;
  box-sizing: border-box;
}

.oauth-user-field {
  background: url("../images/user.svg") no-repeat 0.5rem center / 1.25rem;
}

.oauth-email-field {
  background: url("../images/envelope.svg") no-repeat 0.5rem center / 1.25rem;
}

.oauth-password-wrapper {
  display: flex;
  align-items: center;

  & input {
    background: url("../images/lock.svg") no-repeat 0.5rem center / 1.25rem;
    padding-right: 2.25rem;
  }
}

/*
    Show/hide password icon
 */
.oauth-password-visibility-toggle {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: -2rem;
  cursor: pointer;

  label {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    background: url("../images/eye-slash.svg") no-repeat center / 1.25rem;

    &:hover {
      transform: scale(1.25);
    }
  }

  input {
    opacity: 0;
    position: absolute;
  }

  input:checked + label {
    background: url("../images/eye.svg") no-repeat center / 1.25rem;
  }

  input:focus-visible + label {
    box-shadow: 0 0 0 0.1875rem rgba(188, 199, 199, 0.5);
  }
}

/*
    Misc. styling
 */
em.oauth-field-helptext {
  margin-bottom: 0.625rem;
}

section.oauth-dialog-content {
  overflow: auto;
}

.oauth-footer-wrapper {
  display: flex;
  justify-content: space-between;

  &:has(> #lang-picker:only-child) {
    justify-content: flex-end;
  }
}

.oauth-provider-buttons:not(:last-of-type) {
  margin-bottom: 0.5rem;
}

.oauth-provider-buttons {
  height: auto;
  text-wrap: wrap;
}

.oauth-message-container {
  width: 100%;
  text-align: center;
  display: block;
  margin-top: 2rem;
}

/*
    Stylehaven overrides
 */

.sh-action-bar {
  width: fit-content;
}

.sh-logo {
  margin: 1rem auto 0.5rem auto;
}

h1 {
  margin: 0 auto 0 auto;
  width: fit-content;
}

.sh-button--secondary {
  margin-bottom: 0.5rem;
}

.sh-form-group__label__em {
  white-space: normal;
}

.sh-description-list .sh-description-list__inline-group {
  width: 100%;
  display: inline-block;
}

#lang-picker {
  align-items: baseline;
}
