/* The message box is shown when the user clicks on the password field */
#message {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f1f1f1;
  border-radius: 0.5rem;
  color: #000;
  position: relative;
  padding: 1rem;
  margin-top: 1rem;
}

#message p {
  font-size: 1rem;
}

/* Add a green text color and a checkmark when the requirements are right */
.valid {
  color: green;
}

.valid:before {
  position: relative;
  left: -2rem;
  content: "✔";
}

/* Add a red text color and an "x" when the requirements are wrong */
.invalid {
  color: red;
}

.invalid:before {
  position: relative;
  left: -2rem;
  content: "✖";
}

.form-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto;
}

.form {
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.fieldset-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.form fieldset {
  position: relative;
  padding: 1rem 2rem 2.4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: start;
  margin-bottom: 2rem;
  border: 2px solid #333;
  transition: all .4s;
  border-radius: 0.2rem;
}

.form fieldset:focus-within {
  border: 2px solid #cd7c3f;
}

legend {
  padding: 1rem;
  font-weight: 500;
  text-align: center;
}

.form fieldset .nota {
  text-align: center;
  font-size: 0.8rem !important;
}

.form-fields-row,
.form-fields-column {
  display: flex;
  margin: 1rem 0;
  justify-content: center;
}

.form-fields-row {
  flex-direction: row;
}

.form-fields-column {
  flex-direction: column;
}

label {
  margin-bottom: 0.5rem;
}

.consentimento label {
  font-weight: 500;
}

.consentimento label span {
  font-weight: 600;
}

input,
textarea {
  padding: 0.5rem;
  font-size: 1rem;
  outline: none;
  border: 1px solid #333;
  transition: border .4s;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
  width: 20rem;
  border-radius: 0.2rem;
}

textarea {
  resize: vertical;
  min-height: 2.5rem;
  max-height: 10rem;
}

input:focus,
textarea:focus {
  border: 1px solid #cd7c3f;
}

.radio-fields {
  margin-right: 2rem;
}

.with-radio {
  align-self: flex-start !important;
}

.confirm-fields {
  margin: 1rem;
}

.password-input {
  position: relative;
}

#password-button {
  position: absolute;
  right: 0.6rem;
  width: 2.32rem;
  height: 2.32rem;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.button {
  padding: 1rem;
  margin: 1rem auto;
  z-index: 2;
}

.error {
  position: relative;
  text-align: center;
  font-size: 1rem;
}

.error > p > .bold {
  font-weight: 600;
}

.error-title {
  font-size: 2rem;
  text-align: center;
}

.confirm {
  position: relative;
  text-align: center;
  font-size: 1.8rem;
}

.confirm > p > .bold {
  font-weight: 600;
}

.confirm-title {
  font-size: 1.4rem;
  font-weight: 500;
  text-align: center;
}

@media only screen and (max-width: 600px) {

  .form-fields-row,
  .form-fields-column {
    margin: 1.4rem 0;
  }

  .confirm-fields-row {
    flex-direction: column;
  }

  .radio {
    margin: 0 !important;
  }
}