/* Carica il font Lievito da _language */
@font-face {
  font-family: 'Lievito';
  src: url('./_language/Lievito.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  background: black;
  font-family: Helvetica, Arial, sans-serif; /* menu in Helvetica */
  color: white;
  display: flex;
  flex-direction: column;
  text-align: center;
}

#topLabel {
  position: absolute;       /* sempre sopra */
  top: 5px;                 /* piccolo margine dall’alto */
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;          /* molto piccolo */
  color: #ffffff80;
  pointer-events: none;     /* non interferisce con mouse */
  z-index: 1000;            /* sopra tutto il resto */
  white-space: nowrap;      /* testo su una sola riga */
}
canvas#patternCanvas {
  flex: 1 1 auto;
  width: 100%;
  display: block;
  background: black;
  font-family: 'Lievito', sans-serif; /* canvas usa Lievito */
}

/* Footer styling */
footer {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
  background: black;
}

footer label {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Stile uguale a quello dell'input */
#menu textarea {
  width: 100%;
  height: 32px;              /* altezza come l’input singolo */
  padding: 6px 10px;
  background: #222;
  color: #fff;
  border: 0;
  border-radius: 4px;
  outline: none;
  text-transform: uppercase;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  resize: none;              /* impedisce il ridimensionamento manuale */
  overflow: hidden;          /* nasconde eventuali scrollbar */
}



/* Slider label */
.slider-label {
  position: relative;
  z-index: 3;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  pointer-events: none;
  margin-bottom: 4px;
}

/* Slider fill */
.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(255,255,255,0.18);
  z-index: 1;
  pointer-events: none;
}

/* Range input */
footer input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: transparent;
  z-index: 2;
  cursor: pointer;
}

#micButton {
  position: absolute;
  right: 50px; /* lascia spazio a FIT */
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  padding: 5px 8px;
  border-radius: 4px;
  border: 0;
  background: #222;
  color: #fff;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-moz-range-thumb,
input[type="range"]::-ms-thumb {
  width: 0;
  height: 100%;
  background: transparent;
  border: 0;
}

/* FIT button */
#fitButton {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  padding: 5px 8px;
  border-radius: 4px;
  border: 0;
  background: #222;
  color: #fff;
  cursor: pointer;
}


/* Chrome / Safari */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 100%;
  background: transparent;
  border: none;
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
  width: 0;
  height: 100%;
  background: transparent;
  border: none;
}

/* Edge / IE */
input[type="range"]::-ms-thumb {
  width: 0;
  height: 100%;
  background: transparent;
  border: none;
}
