/* =========================
   Accessibilità
   ========================= */
.visually-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* =========================
   Base
   ========================= */
body{
  font-family: Calibri, Arial, sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
}

/* =========================
   Input e bottoni generici
   ========================= */
input[type="text"]{
  width: 1500px;
  height: 160px;
  font-size: 48px;
  padding: 15px;
  box-sizing: border-box;
}

button{
  font-size: 48px;
  box-sizing: border-box;
}

/* =========================
   Bottoni rotondi (drone/bordone)
   ========================= */
.round-button{
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: darkred;
  color: white;
  font-size: 39px;
  font-weight: bold;
  text-align: center;
  line-height: 150px;
  cursor: pointer;
  border: none;
}

/* =========================
   Info (bottone + immagine)
   ========================= */
#contenitoreImmagine{
  position: relative;
  display: inline-block;
}

#immagineInfo{
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 10px;
}

.pulsante-info{
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: #808080;
  color: #fff;
  font-size: 39px;
  font-weight: bold;
  text-align: center;
  line-height: 150px;
  cursor: pointer;
  border: none;
}

/* =========================
   Pulsanti play
   ========================= */
.play-btn{
  width: 400px;
  height: 180px;
  font-size: 48px;
  line-height: 180px;
}

/* =========================
   Schema (zoom SOLO qui)
   ========================= */
.schema{
  zoom: 25%;
}

.schema img,
.schema map,
.schema area{
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* =========================
   Controls layout
   ========================= */
.controls{
  display: flex;
  flex-direction: column;
}

/* La topbar deve stare in alto */
.controls .topbar{
  order: -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px;
}

.controls .loops{
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* Forza bottoni rotondi nel flusso */
.round-button,
.right-button{
  position: static !important;
  top: auto !important;
  left: auto !important;
}

/* Keybar: sempre nel flusso + scroll orizzontale */
#keybar{
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;

  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  scrollbar-gutter: stable;
}

#keybar button{
  margin: 5px;
  width: 300px;
  height: 100px;
  font-size: 50px;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  line-height: 100px;
  text-decoration: none;

  flex: 0 0 auto;
  white-space: nowrap;
}

/* Stato NON attivo */
#keybar button.button,
#keybar button.button2{
  background-color: #6c757d;
}

/* Hover (non attivo) */
#keybar button.button:hover,
#keybar button.button2:hover{
  background-color: #5a6268;
}

/* Stato attivo */
#keybar button.active{
  background-color: #007bff;
}

/* Hover quando attivo */
#keybar button.active:hover{
  background-color: #0056b3;
}

.controls{
  zoom: 25%;
}

map area[onclick] {
  cursor: pointer;
}