/* ════════════════════════════════════════════════
   STILI BUILD DI TEST — badge ambiente + label funzione
   ════════════════════════════════════════════════ */

/* Badge "Ambiente di test" — basso al centro, su ogni schermata */
#build-badge{
  position:fixed;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  z-index:5000;
  background:rgba(180,35,24,.95);
  color:#fff;
  font-family:system-ui,-apple-system,'Inter',sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.3px;
  padding:5px 14px;
  border-radius:999px;
  box-shadow:0 4px 14px rgba(0,0,0,.3);
  pointer-events:none;
  white-space:nowrap;
  max-width:92vw;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Pulsante flottante per attivare/disattivare le label funzione */
#fn-toggle{
  position:fixed;
  right:12px;
  bottom:10px;
  z-index:5001;
  width:34px;height:34px;
  border-radius:50%;
  border:none;
  background:#1f2937;
  color:#9ca3af;
  font-family:monospace;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 3px 10px rgba(0,0,0,.3);
  transition:background .15s,color .15s;
}
#fn-toggle.on{ background:#2563eb;color:#fff; }
#fn-toggle:hover{ background:#374151; }

/* Le label funzione sono nascoste finché non si attiva la modalità */
.fn-label{ display:none; }

.fn-labels-on .fn-label{
  display:inline-block;
  position:absolute;
  top:0;
  left:0;
  z-index:4900;
  background:#2563eb;
  color:#fff;
  font-family:monospace;
  font-size:9.5px;
  font-weight:700;
  line-height:1.2;
  padding:2px 5px;
  border-radius:0 0 5px 0;
  pointer-events:none;
  white-space:nowrap;
  box-shadow:0 1px 4px rgba(0,0,0,.25);
  opacity:.92;
}

/* Quando le label sono attive, evidenzia leggermente gli elementi marcati */
.fn-labels-on [data-fn]{
  outline:1px dashed rgba(37,99,235,.5);
  outline-offset:-1px;
}
