/* Overlay generale */
.popup-overlay_formazione2 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
}

/* BOX CONTENUTO — fisso a 700px */
.popup-box_formazione2 {
  background: white;
  border-radius: 14px;
  width: 90%;
  max-width: 970px;
  height: 600px;
  font-family: 'Inter', sans-serif;
  color: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
  padding: 60px 50px;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-box_formazione2::-webkit-scrollbar {
  display: none;
}

.scroll-area {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

.popup-content_formazione2 {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-content_formazione2::-webkit-scrollbar {
  display: none;
}




/* Titolo e testo */
.titolo_flex {
  display: flex;
}


.titolo_flex h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  font-size: 20px;
  line-height: 26px;
  padding-bottom: 20px;
}

.step_formazione2 h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  font-size: 20px;
  line-height: 26px;
  padding-bottom: 20px;
}

.titolo_flex p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  font-size: 14px;
  line-height: 20px;
  padding-top: 5px;
  padding-left: 5px;
  font-style: italic;
}

.popup-box_formazione2 h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  font-size: 28px;
  line-height: 34px;
  padding-bottom: 10px;
}

.paragrafo_sottotitolo {
  font-size: 18px;
  color: #000000;
  line-height: 24px;
  padding-bottom: 30px;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.label_column {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 24px;
  padding-left: 0px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.btn-back {
  color: black !important;
}

/* Domanda */
.question-block_formazione2 h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.question-note_formazione2 {
  font-size: 13px;
  font-weight: 400;
  color: #666;
}

.input-wrapper_formazione2 {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  width: 50%;
}

.form-row_formazione2 {
  display: flex;
  gap: 20px
}

/* Opzioni */
.checkbox-group_formazione2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.checkbox-group_formazione2 label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid #ccc;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.checkbox-group_formazione2 input[type="radio"] {
  accent-color: #0cb300;
  transform: scale(1.3);
}

.checkbox-group_formazione2 label:hover {
  border-color: #007bff;
  background-color: #f9f9ff;
}

/* Progress bar */
.progress-area_step {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
}

.form-row_formazione2 input {
  border: 1px solid black;
  outline: none;
}

#dettaglioStep3_form4,
#dettaglioStep6_form4,
.form-group {
  padding-top: 30px;
}

.form-group {
  flex-direction: column;
  display: flex;
}

#dettaglioStep5_form4 {
  padding-top: 30px;
}

.messaggio7,
.messaggio3,
.messaggio4,
.messaggio5,
.messaggio6,
.messaggio8 {
  width: 100%;
  border: 1px solid #ccc;
  outline: none;
  resize: none;
  padding: 10px 20px 10px;
}

.messaggio7:focus-visible,
.messaggio3:focus-visible,
.messaggio4:focus-visible,
.messaggio5:focus-visible,
.messaggio6:focus-visible,
.messaggio8:focus-visible {
  border: 1px solid black;
  outline: none;
}

.btn-submit_form4 {
  background-color: #009dff;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-submit_form4:hover {
  background-color: #0084d6;
}

.progress-bar_step {
  width: 120px;
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill_step {
  height: 100%;
  background: #0cb300;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-step-text {
  font-size: 13px;
  font-weight: 600;
}

/* Pulsante avanti */
.button-row_formazione2 {
  text-align: right;
  margin-top: 25px;
}

.btn-next {
  border: 2px solid #000;
  background: white;
  border-radius: 30px;
  padding: 7px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: black;
}

@media (hover: hover) and (pointer: fine) {
  .btn-next:hover {
    background: #000;
    color: white;
  }
}

.btn-next:active {
  background: #000;
  color: white;
}

/* Pulsante chiusura */
.popup-close_formazione2 {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgb(0, 0, 0);
  font-weight: bold;
}

/* Animazione */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.flex_barra {
  display: flex;
  justify-content: space-between;
  padding-top: 150px;
}

/* Nascondi il radio originale */
.custom-radio input[type="radio"] {
  display: none;
}

/* Quadrato vuoto */
.custom-radio .checkmark {
  width: 25px;
  height: 25px;
  border: 2px solid #000000;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 0;
  position: relative;
}

/* Spunta visibile solo quando selezionato */
.custom-radio input:checked+.checkmark::after {
  content: "\2714";
  color: #0cb300 !important;
  font-size: 25px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.custom-radio input[type="checkbox"] {
  display: none;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 0px;
  margin-top: -5px;
}

.checkbox-grid label {
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 19px;
  padding: 10px 2px 10px 0px;
}

@media (min-width: 700px) and (max-width: 1024px) {
  .checkbox-grid label {
    padding: 0px 0px 10px 0px;
  }
}

/* MEDIA QUERIES */
/* CONTAINER */
@media (max-width: 409px) {
  .popup-box_formazione2 {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (min-width: 410px) and (max-width: 699px) {
  .popup-box_formazione2 {
    padding-left: 50px;
    padding-right: 50px;
  }
}

@media (min-width: 700px) and (max-width: 870px) {
  .popup-box_formazione2 {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* TITOLO */
@media (max-width: 369px) {
  .popup-box_formazione2 h2 {
    line-height: 26px;
    font-size: 18px;
  }
}

@media (min-width: 369px) and (max-width: 388px) {
  .popup-box_formazione2 h2 {
    line-height: 28px;
    font-size: 20px;

  }
}

@media (min-width: 389px) and (max-width: 409px) {
  .popup-box_formazione2 h2 {
    line-height: 30px;
    font-size: 22px;
  }
}

@media (min-width: 410px) and (max-width: 820px) {
  .popup-box_formazione2 h2 {
    line-height: 30px;
    font-size: 22px;
  }
}

@media (min-width: 821px) and (max-width: 943px) {
  .popup-box_formazione2 h2 {
    line-height: 34px;
    font-size: 26px;
  }
}

/* PARAGRAFO */
@media (max-width: 369px) {
  .step_formazione2 h3 {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (min-width: 370px) and (max-width: 1200px) {
  .step_formazione2 h3 {
    font-size: 16px;
    line-height: 24px;
  }
}

@media (max-width: 955px) {
  .titolo_flex {
    display: flex;
    flex-direction: column;
  }

  .step_formazione2 h3 {
    padding-bottom: 0px;
  }

  .titolo_flex p {
    padding-left: 0px;
    padding-bottom: 20px;

  }

  .checkbox-grid label {
    padding: 0px 0px 10px 0px;
  }

  .form-row_formazione2 {
    padding-top: 0px;
  }
}


/* FLEX-TITOLO */
@media (max-width: 699px) {

  .paragrafo_sottotitolo {
    padding-bottom: 0px;
  }

  .input-wrapper_formazione2 {
    margin-bottom: 10px;
  }


  .popup-content_formazione2 p {
    padding-bottom: 10px;
    padding-left: 0px;
  }

  .step_formazione2 h3 {
    padding-bottom: 10px;
  }

  label {
    font-size: 13px;
    line-height: 19px;
  }

  .custom-radio .checkmark {
    width: 20px;
    height: 20px;
  }

  .custom-radio input:checked+.checkmark::after {
    font-size: 16px;
  }

  .checkbox-grid {
    grid-template-columns: repeat(1, 1fr);
    margin-top: 10px;
  }

  #dettaglioStep3_form4 {
    padding-top: 20px;
  }

  #dettaglioStep5_form4 {
    padding-top: 0px;
  }

  #dettaglioStep6_form4 {
    padding-top: 30px;
  }

  .form-row_formazione2 {
    gap: 0px;
    display: flex;
    flex-direction: column;
  }

  .titolo_flex {
    padding-top: 0px !important;
  }

  .form-group {
    padding-top: 0px;
  }

  textarea {
    font-size: 14px;
  }


  /* L'area centrale che scorre */
  .scroll-area {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 10px;
    box-sizing: border-box;
  }

  .popup-box_formazione2 {
    overflow: hidden;
    padding-bottom: 50px;
    position: relative;
  }

  .titolo_flex p {
    padding-left: 0px;
  }

  .titolo_flex h3 {
    padding-top: 10px;
  }

  .form-row_formazione2 input {
    font-size: 14px;
  }

  .checkbox-grid label {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (max-width: 375px) {
  .titolo_flex h3 {
    padding-top: 0px;
  }

  .btn-next {
    padding: 5px 10px;
  }

  .titolo_flex9 {
    padding-top: 0px !important;
  }
}

@media (max-width: 1024px) {

  /* L'area centrale che scorre */
  .scroll-area {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 10px;
    box-sizing: border-box;
  }

  .popup-box_formazione2 {
    overflow: hidden;
    padding-bottom: 50px;
    position: relative;
  }



  .checkbox-grid {
    grid-template-columns: repeat(1, 1fr);
    margin-top: 10px;
  }

  .input-wrapper_formazione2 {
    width: 100%;
  }

}

@media (min-width: 700px) and (max-width: 954px) {
  .step_formazione2 h3 {
    padding-bottom: 5px;
  }
}

.custom-radio.option-error .checkmark {
  border: 2px solid red !important;
}

/* Quando l'utente seleziona un'opzione, bordo nero */
.custom-radio input:checked~.checkmark {
  border: 2px solid #000 !important;
}

.input-wrapper_formazione2 .error-message {
  color: red;
  font-size: 12px;
  display: none;
  margin-top: 4px;
  border: none;
}




@media (max-width: 409px) {
  .popup-box_formazione2 {
    height: 600px;
  }

  .form-row_formazione2 {
    padding-top: 0px;
  }

  .input-wrapper_formazione2 {
    margin-bottom: 10px;
  }

  .btn-next {
    padding: 5px 10px;
  }

  .asterisco {
    display: none;
  }

  .titolo_flex h3 {
    padding-top: 5px;
  }

  .titolo_flex p {
    padding-bottom: 0px;
  }

  #dettaglioStep4 {
    padding-top: 10px;
  }

  .btn-submit_form4 {
    font-size: 14px;
    padding: 8px 15px;
  }
}


@media (max-width: 1128px) {
  .paragrafo_sottotitolo {
    font-size: 16px;
    line-height: 22px;
  }

  .paragrafo_sottotitolo {
    margin-block-start: 0px !important;
    margin-block-end: 0px !important;
  }
}

@media (max-width: 369px) {
  .paragrafo_sottotitolo {
    line-height: 20px;
    font-size: 14px;
  }
}

.input-wrapper_formazione2 {
  position: relative;
  margin-bottom: 15px;
  width: 100%;
}

/* Input e textarea */
.input-wrapper_formazione2 input,
.input-wrapper_formazione2 textarea {
  width: 100%;
  padding: 10px 20px 10px;
  font-size: 12px;
  line-height: 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  background: none;
  transition: border 0.2s ease;
}

/* Label */
.input-wrapper_formazione2 label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0 4px;
  color: #666;
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Quando focus o input ha valore */
.input-wrapper_formazione2 input:focus+label,
.input-wrapper_formazione2 input:not(:placeholder-shown)+label,
.input-wrapper_formazione2 textarea:focus+label,
.input-wrapper_formazione2 textarea:not(:placeholder-shown)+label {
  top: -1px;
  left: 15px;
  font-size: 12px;
  color: #008bee;
}

/* Bordo input focus */
.input-wrapper_formazione2 input:focus,
.input-wrapper_formazione2 textarea:focus {
  border-color: #008bee;
}

/* Errori */
.input-wrapper_formazione2 .error-message {
  color: red;
  font-size: 12px;
  display: none;
  margin-top: 4px;
}

@media (max-width: 699px) {

  input,
  textarea,
  select {
    font-size: 16px !important;
    transform: scale(1);
    transform-origin: left center;
  }
}

/* -- Custom Dropdown con Checkbox -- */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  color: #333;
}

.dropdown-toggle:hover {
  border-color: #999;
}

.dropdown-arrow {
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: #000000;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: #008bee12;
  color: #008bee;
}

.dropdown-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Tags delle selezioni attive */
.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  min-height: 0;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #008bee12;
  color: #008bee;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
}

.tag-item .tag-remove {
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  color: #008bee;
}

.tag-item .tag-remove:hover {
  color: #c00;
}