body {
  display: flex;
  justify-content: space-between;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
}

.form-section {
  display: flex;
  justify-content: center;
  width: 50%;
  background-color: var(--background);
  min-width: 450px;
  max-width: 550px;
}

main {
  margin-top: 80px;
  width: 360px;
  height: auto;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  border: none;
  padding: 24px;
  border-radius: 20px;
  color: var(--text);
}

.desktop-image {
  width: 70%;
  background-image: url('../images/sign-in\ background.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.sign-up h2 {
  margin-top: 8px;
}

.sign-up, .terms, .privacy-policy, .setup {
  margin-top: 20px;
  height: 600px;
  overflow-y: scroll;
}

.sign-up {
  margin-top: 0;
  overflow-y: scroll;
  height: calc(100vh - 100px);
  height: calc(100dvh - 100px);
  max-height: 700px;
}

.sign-up-form {
  align-items: center;
}

form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

h2.section-title {
  margin: 40px 0px 8px 0px;
}

.label-group {
  position: relative;
}

.extra-info {
  font-size: 16px;
  color: var(--login-support-text);
}

label, legend {
  margin: 16px 0px 8px 0px;
}

.sign-up label {
  font-size: 16px;
}

input {
  height: 32px;
  padding: 4px 12px;
  border-radius: 20px;
  border: none;
  box-shadow: 0 0 4px var(--light-shadow);
}

.label-group input {
  width: calc(100% - 24px);
}

input[type="date"] {
  width: calc(100% - 24px);
}

input[type="checkbox"], input[type="radio"] {
  padding: 0;
  height: auto !important;
  margin-top: 20px;
  box-shadow: none !important;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.radio-group {
  display: flex;
  align-items: center;
}

.radio-group input {
  margin: 0;
}

.radio-group label {
  margin: 16px 28px 16px 8px;
}

.goal-group {
  display: flex;
  flex-wrap: wrap;
  border: none;
  margin-top: 32px;
  position: relative;
}

.goal-group input[type="radio"] {
  display: none;
}

.goal-group label {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--goal-group);
  color: var(--reverse-text);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s ease-out;
  user-select: none;
  margin: 4px 16px 4px 0px;
}

.goal-group input[type="radio"]:checked + label {
  background-color: var(--highlight);
  transform: scale(1.05);
}

.custom-goal {
  display: none;
  margin-top: 20px;
  width: 100%;
}

.unit-tag {
  position: absolute;
  right: 0;
  width: 60px;
  height: 40px;
  border-radius: 0px 20px 20px 0px;
  background-color: var(--widget-item);
  display: flex;
  align-items: center;
  justify-content: center;
}

.weight-unit, .height-unit {
  top: 50%;
  transform: translateY(-50%);
}

.custom-unit {
  bottom: 0;
  display: none;
}

.custom-unit-show {
  display: flex;
}

.custom-label:checked + label + .custom-goal {
  display: block;
}

p {
  margin: 0px;
}

button, .go-back-from-legal {
  margin-top: 40px;
  background-color: var(--highlight);
  box-shadow: 0 0 6px var(--shadow);
  color: var(--reverse-text);
  height: 36px;
  font-size: 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

button.create-account {
  margin-top: 20px;
}

.redirect-signup {
  font-size: 16px;
  margin-top: 12px;
}

.right-link, .forgot-password {
  text-align: end;
  text-decoration: none;
}

.right-link a, .forgot-password a {
  text-decoration: none;
}

.go-back-from-legal {
  margin: 0px 0px 20px 0px;
  color: var(--reverse-text);
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0px;
}

.bottom-legal-button {
  margin-top: 20px;
}

.errors {
  font-size: 16px;
  color: var(--error);
  margin: 20px 0px -20px 0px;
}

.sign-up .errors:not(.change-password .errors) {
  margin: 4px 0px 0px 0px;
}

.step {
  display: none;
}

.step-two {
  display: none;
}

.step-two-shown {
  display: contents;
}

@media (max-height: 800px) {
  .login-form {
    align-items: center;
  }

  .login {
    margin: 0;
  }
}

@media (max-width: 800px) {
  body {
    justify-content: center;
  }

  .form-section {
    width: 100%;
    background-image: url('../images/sign-in\ background.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 20%;
  }

  .desktop-image {
    display: none;
  }

  main {
    backdrop-filter: blur(40px);
    background-color: var(--login-overlay);
    box-shadow: 0 0 6px var(--shadow);
  }

  .form-section {
    max-width: none;
  }

  .sign-up {
    margin-top: 20px;
  }

  .goal-group label {
    background-color: var(--goal-group-mobile);
  }
}

@media (max-width: 475px) {
  body, html {
    overflow-y: hidden;
    overflow-x: hidden;
  }

  main {
    width: calc(100vw - 100px);
  }
}