/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0
*/

/* ===== Percorso Builder ===== */
#percorso-builder-container {
  font-family: sans-serif;
  padding: 1em;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 8px;
}
#percorso-builder-container h2 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
}
#percorso-builder-container fieldset {
  border: 1px solid #ddd;
  padding: 1em;
  margin-bottom: 1em;
  border-radius: 4px;
}
#percorso-builder-container legend {
  font-weight: bold;
}
#percorso-builder-container label {
  margin-right: 1em;
  display: inline-block;
}
#percorso-builder-container input[type="checkbox"] {
  margin-right: 0.5em;
}
#save-percorso {
  margin-top: 1em;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}
#save-percorso:hover {
  background: #c2185b;
}

/* ===== Riepilogo ===== */
.percorso-riepilogo {
  padding: 1.5em;
  background: #fffefc;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  margin-top: 2em;
  
}

.percorso-riepilogo h2 {
  font-size: 1.4em;
  margin-bottom: 0.5em;
  color: #e91e63;
  border-bottom: 2px solid #e91e63;
  padding-bottom: 0.3em;
}

.percorso-riepilogo p strong {
  color: #444;
}

.percorso-riepilogo fieldset {
  border: 1px solid #ddd;
 
  padding: 1em;
  margin-bottom: 1.5em;
  border-radius: 6px;
  background: #fdfdfd;
}

.percorso-riepilogo legend {
  font-weight: bold;
  padding: 0 0.5em;
  color: #e91e63;
}

.percorso-riepilogo div > strong {
  display: block;
  font-weight: bold;
  margin-top: 0.5em;
  margin-bottom: 0.3em;
  color: #333;
}

.percorso-riepilogo ul {
  margin: 0 0 1em 1.5em;
  padding: 0;
  list-style-type: disc;
}

.percorso-riepilogo li {
  margin-bottom: 0.2em;
  color: #444;
  font-size: 15px !important;
  font-family: Poppins;
  font-weight: 400;
 
}

/* Colori dinamici per competenze indentate */
.percorso-riepilogo li[data-area="1"] {
  color: #007bff;
}
.percorso-riepilogo li[data-area="2"] {
  color: #4caf50;
}
.percorso-riepilogo li[data-area="3"] {
  color: #ff9800;
}

/* Responsive */
@media (max-width: 768px) {
  .percorso-riepilogo {
    padding: 1em;
  }
  .percorso-riepilogo h2 {
    font-size: 1.2em;
  }
}


#percorso-builder-container input[type="radio"] {
  display: none;
}

#percorso-builder-container label[for]:has(input[type="radio"]),
#percorso-builder-container input[type="radio"] + label {
  display: inline-block;
  background: #f1f1f1;
  padding: 0.5em 1em;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 0.5em;
  border: 2px solid transparent;
  font-weight: 600;
  transition: all 0.2s ease;
}

#percorso-builder-container input[type="radio"]:checked + label {
  background: #e91e63;
  color: white;
  border-color: #e91e63;
}
#percorso-builder-container input[type="checkbox"] {
  margin-right: 0.5em;
  vertical-align: middle;
}
#percorso-builder-container label {
  vertical-align: middle;
}
/* === Percorso Builder === */
.builder-mode {
  margin-bottom: 1em;
}
.builder-mode input[type="radio"] {
  display: none;
}
.builder-mode label {
  background: #f1f1f1;
  padding: 0.5em 1em;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 0.5em;
  font-weight: 600;
  border: 2px solid transparent;
}
.builder-mode input[type="radio"]:checked + label,
.builder-mode label.active {
  background: #e91e63;
  color: white;
  border-color: #e91e63;
}

/* Checkbox spacing */
.cb-att, .cb-comp {
  margin-right: 0.5em;
  vertical-align: middle;
}
label {
  vertical-align: middle;
}

/* Tabs */
.tabs-nav {
  margin-bottom: 1em;
}
.tab-btn {
  background: #f1f1f1;
  border: none;
  padding: 0.5em 1em;
  margin-right: 0.5em;
  border-radius: 6px;
  cursor: pointer;
}
.tab-btn.active {
  background: #e91e63;
  color: white;
}
.tab-pane {
  margin-top: 1em;
}
fieldset {
  margin-bottom: 1em;
  padding: 1em;
  border: 1px solid #ddd;
  border-radius: 6px;
}
legend {
  font-weight: bold;
  color: #e91e63;
}
.comps-of-att {
  margin-top: 0.5em;
  display: flex;
  flex-direction: column;
}

.indented {
  margin-left: 2em;
}

/* Responsive */
@media (max-width: 768px) {
  .builder-mode label {
    display: inline-block;
    margin-bottom: 0.5em;
  }
  .tab-btn {
    margin-bottom: 0.5em;
  }
  fieldset {
    padding: 0.5em;
  }
}
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
}

.tab-btn {
  padding: 0.5em 1em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: bold;
  border: 2px solid transparent;
}

.tab-btn.active {
  color: white !important;
}

.cb-comp, .cb-att {
  margin-right: 0.5em;
  vertical-align: middle;
}

fieldset {
  margin-bottom: 1.5em;
  padding: 1em;
}

legend {
  font-weight: bold;
  font-size: 1.1em;
}

.indented {
  padding-left: 1.5em;
  margin-top: 0.25em;
}

@media (max-width: 600px) {
  .tabs-nav {
    flex-direction: column;
  }
  .tab-btn {
    width: 100%;
    text-align: center;
  }
}
.percorso-actions {
  margin-top: 2em;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}


@media (max-width: 600px) {
  .percorso-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .percorso-actions a {
    width: 100%;
    text-align: center;
  }
}



.percorso-actions a:hover {
  background-color: #000f73;
  color: #ffffff;
}
.btn-bacheca {
  display: inline-block;
  margin-left: 10px;
  padding: 0.5em 1em;
  background-color: #555;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.btn-bacheca:hover {
  background-color: #333;
}

.studente-riga {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.studente-header {
  background-color: #f5f5f5;
}

.percorso-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  align-items: flex-start;
}

.percorso-actions a {
  display: inline-block;
  padding: 0.75em 1.25em;
  font-weight: bold;
  text-align: center;
  border-radius: 6px;
  background-color: #006da7;
  color: #fff;
  text-decoration: none;
  min-width: 160px;
}

.studenti-assegnati {
  flex: 1 1 100%;
  margin-top: 1.5em;
}
.studenti-assegnati thead tr {
  background-color: #f5f5f5;
  /* Cambiato da border-bottom: 1px a 0.5px per il bordo superiore più sottile */
  border-bottom: 0.5px solid #ccc;
}

.studenti-assegnati tbody tr {
  /* Aggiungo una linea orizzontale sottile tra le righe */
  border-bottom: 0.5px solid #ddd;
}

.studenti-assegnati tbody tr:last-child {
  border-bottom: none; /* Rimuove la linea sotto l'ultima riga */
}



@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.loader-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid #ccc;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;

  /* ✅ Queste due righe aiutano la visibilità */
  min-width: 16px;
  min-height: 16px;
}

.toast-message {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #336479;
  color: white;
  padding: 0.75em 1.5em;
  border-radius: 8px;
  font-size: 0.95em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  10%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}
style.innerHTML += `
  .mappa-fase a:hover {
    text-decoration: underline;
    color: #2a5d70;
  }
`;
/* INIZIO STILE LISTA STUDENTI

/* Contenitore principale della lista utenti */


/* RIGA INTESTAZIONE */
#lista-studenti > .header-row {
  display: flex;
  font-weight: bold;
  border-bottom: 2px solid #ccc;
  padding: 5px 0;
  background: #f9f9f9;
}

/* Celle intestazione */
#lista-studenti > .header-row > div {
  padding: 0 10px;
  box-sizing: border-box;
}

/* RIGHE DATI UTENTI */
#lista-studenti > .dce-item-user {
  display: flex;
  border-bottom: 1px solid #ccc;
  padding: 5px 0;
  font-size: 13px;
  align-items: center;
}

/* Celle righe dati */
#lista-studenti > .dce-item-user > .dce-user_content > div {
  padding: 0 10px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Imposta larghezza fissa colonne intestazione e righe per perfetto allineamento */
#lista-studenti > .header-row > div:nth-child(1),
#lista-studenti > .dce-item-user > .dce-user_content > div:nth-child(1) {
  flex: 1 1 160px;
  min-width: 160px;
  max-width: 160px;
}

#lista-studenti > .header-row > div:nth-child(2),
#lista-studenti > .dce-item-user > .dce-user_content > div:nth-child(2) {
  flex: 1 1 120px;
  min-width: 120px;
  max-width: 120px;
}

#lista-studenti > .header-row > div:nth-child(3),
#lista-studenti > .dce-item-user > .dce-user_content > div:nth-child(3) {
  flex: 1 1 60px;
  min-width: 60px;
  max-width: 60px;
}

#lista-studenti > .header-row > div:nth-child(4),
#lista-studenti > .dce-item-user > .dce-user_content > div:nth-child(4) {
  flex: 1 1 60px;
  min-width: 60px;
  max-width: 60px;
}

#lista-studenti > .header-row > div:nth-child(5),
#lista-studenti > .dce-item-user > .dce-user_content > div:nth-child(5) {
  flex: 1 1 80px;
  min-width: 80px;
  max-width: 80px;
}
/* Contenitore tabella */
.dce-grid-users.simplegrid {
  display: table !important;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

/* Riga studente */
.dce-item-user {
  display: table-row !important;
  border-bottom: 1px solid #ccc;
  height: 35px; /* altezza fissa uniforme */
  font-size: 13px;
  line-height: 1.2em !important;
}

/* Contenitore dati riga */
.dce-user_content {
  display: contents !important; /* permette ai figli di comportarsi come celle */
}

/* Ogni colonna */
.dce-user_content > div {
  display: table-cell !important;
  padding: 5px 10px;
  vertical-align: middle !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  border-right: 0px solid #eee;
}

/* Rimuovi il bordo a destra nell'ultima colonna */
.dce-user_content > div:last-child {
  border-right: none;
}

/* Intestazione prima riga */
.dce-item-user:first-child .dce-user_content > div::before {
  content: attr(data-label);
  display: block;
  font-weight: bold;
  color: #000555;
  margin-bottom: 8px;
}

/* Nasconde intestazione nella colonna azioni */
.dce-item-user:first-child .dce-user_content > div:last-child::before {
  content: none !important;
}
/* Imposta scroll sulla lista studenti in Creazione percorso */
#tabella-studenti {
  max-height: 400px;
  overflow-y: auto;
  background-color: #fff;
  padding: 0; /* togli padding per evitare spostamenti */
  margin-top: 15px;
}

/* intestazione non flex, sticky */
.studente-header {
  position: sticky;
  top: 0;
  background-color: #eee;
  font-weight: bold;
  padding: 8px 10px;
  z-index: 10;
  display: block; /* togli flex */
}

/* ogni "colonna" intestazione in linea */
.studente-header > div {
  display: inline-block;
  flex: none;
  width: 20%; /* o la larghezza che ti serve */
}

/* righe studenti flessibili */
.studente-riga {
  display: flex;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

/* ogni "colonna" riga */
.studente-riga > div {
  flex: 1; /* o 20% come intestazione per allineare */
  min-width: 0; /* per evitare overflow */
}

/* opzionale per la prima colonna checkbox */
.studente-riga > div:first-child {
  flex: 0 0 30px; /* larghezza fissa per checkbox */
}
.studente-header > div:first-child {
  flex: 0 0 30px;
}

/* aggiunge distanza nei filtri studenti, dopo le label */
#filtri-studenti label {
  display: inline-block; /* mantiene le label in linea */
  margin-bottom: 6px; /* distanza verticale tra label e input */
  vertical-align: top; /* allinea bene label e input */
}

#filtri-studenti select,
#filtri-studenti input[type="text"] {
  display: block;   /* fa andare il select/input su riga nuova */
  margin-top: 4px;  /* distanza sopra input rispetto alla label */
}

