*,
*::before,
*::after {
  box-sizing: border-box;
}

.heading {
  text-align: center;
  color: #010158;
  visibility: visible;
}

.forms-wrapper {
  margin: 0 auto;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #010158;
  border-radius: 3px;
  padding: 1.6em;
  padding-top: 0.5em;
  background-color: #dcdcff;
  position: relative;
}

.message {
  background-color: #010158;
  color: white;
  padding: 1em 1.3em;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  display: block;
}

.message.hide {
  display: none;
}

.input-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0.5em 1em;
}

.input-wrapper input {
  width: 100%;
  padding: 0.5em 0.8em;
  color: #010158;
  border: 1px solid #010158;
  border-radius: 3px;
  font-size: 1em;
}

.input-wrapper label {
  display: block;
  margin-bottom: 0.2em;
  color: #010158;
}

.forms-wrapper .buttons {
  margin: 1em 0.5em 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

button {
  cursor: pointer;
  padding: 0.8em 1em;
  background-color: white;
  outline: none;
  border: 1px solid #010158;
  color: #010158;
  border-radius: 3px;
  font-weight: bold;
}

button:hover {
  background-color: #010158;
  color: white;
}

input.wrong {
  color: white;
  background-color: rgb(121, 3, 3);
  border: 1px solid red;
}

.heading.hide {
  visibility: hidden;
}

@media (max-width: 400px) {
  .forms-wrapper {
    width: 280px;
    padding: 1em;
    padding-top: 0.3em;
    background-color: #dcdcff;
    position: relative;
  }

  .input-wrapper input {
    width: 100%;
    padding: 0.4em 0.6em;
    color: #010158;
    border: 1px solid #010158;
    border-radius: 3px;
    font-size: 0.8em;
  }

  input-wrapper {
    margin: 0.2em 0.6em;
  }

  .forms-wrapper .buttons {
    margin: 0.2em 0.2em 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .forms-wrapper .buttons button {
    font-size: 0.8em;
  }
}
