body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  padding: 20px;
  color: #333;
}

/* Container principale */
.form-container {
  background-color: #ffffff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 720px;
  margin: 40px auto;
}

/* Etichette */
label {
  display: block;
  margin: .4vw 0;
  margin-top: 20px;
  font-size: 80%;
  color: #007B87;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 900;
}

.required::after {
  content: " *";
  color: red;
}

/* Tooltip */
.tooltip-icon {
  display: inline-block;
  background-color: #007B87;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
  margin-left: 5px;
}

/* Input, Select, Textarea */
input,
select {
  display: block;
  width: 100%;
  height: 40px;
  padding: .375rem .75rem;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #F7F8F8;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  margin-top: 5px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: .375rem .75rem;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #F7F8F8;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  margin-top: 5px;
}

/* Errori */
input.error,
textarea.error,
select.error {
  border: 1px solid red;
}

.error-message {
  color: red;
  font-size: 0.9em;
  margin-top: 2px;
}

/* Submit */
input[type="submit"] {
  background-color: #007B87;
  color: white;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  font-weight: bold;
  text-transform: uppercase;
}

input[type="submit"]:hover {
  background-color: #005b66;
}

/* Select più leggibili */
select {
  min-width: 200px;
}

/* Fieldset sezioni */
fieldset.form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

fieldset.form-section legend {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
  color: #007B87;
}

/* Disabilitati (es. .form-check) */
.form-check-input:disabled~.form-check-label {
  color: #6c757d;
}

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

/* Fieldset */
fieldset {
  border: 2px solid #007B87;
  /* Colore istituzionale */
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background-color: #ffffff;
  /* Sfondo leggero per separare visivamente le sezioni */
}

/* Legend */
legend {
  font-size: 1rem;
  font-weight: 700;
  color: #007B87;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 0.5rem;
  margin-left: 0.5rem;


  text-align: center;
  display: block;
  /* width: 100%;*/
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .form-container {
    padding: 16px;
    margin: 10px;
    box-shadow: none;
    border-radius: 0;
  }

  input,
  select,
  textarea {
    font-size: 1rem;
    height: auto;
    padding: 10px;
    margin-bottom: 16px;
  }

  label {
    font-size: 0.95rem;
  }

 
  .tooltip-icon {
    text-transform: none;
    width: 26px;
    height: 26px;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
    background-color: #007B87;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-left: 0.5em;
    cursor: pointer;
    
  }
  .tippy-box[data-theme~='light-border'] {
    text-transform: none;
    word-break: break-word;
    font-size: 0.9rem;
    padding: 0.7em;
  }

  fieldset {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  legend {
    font-size: 0.95rem;
  }

  textarea {
    min-height: 150px;
  }

  input[type="submit"] {
    font-size: 1rem;
    width: 100%;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
    line-height: normal;
    display: inline-block;
    vertical-align: middle;
  }
  
}
/* Evita che il punto interrogativo erediti il text-transform dalla label */
label .tooltip-icon {
  text-transform: none !important;
}

/* Evita che il contenuto del tooltip (generato da Tippy.js) sia maiuscolo */
.tippy-box {
  text-transform: none !important;
}

input[type="submit"] {
  line-height: 1.2;
  height: 48px; /* oppure lo stesso valore del padding top + bottom */
  padding-top: 12px;
  padding-bottom: 12px;
}