/* === Panel flotante horizontal === */
#floating-controls {
  position: fixed;
  bottom: 20px;
  right: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  background: var(--panel-bg, rgba(0,0,0,0.1));
  padding: 6px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: width 0.3s ease, gap 0.3s ease, padding 0.3s ease;
  z-index: 9999;
}

/* Botones */
#floating-controls button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: inherit;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#floating-controls button:hover {
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
}

/* Botón toggle del panel */
#panel-toggle {
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  font-size: 14px;
}

/* Estado contraído */
#floating-controls.collapsed button:not(#panel-toggle) {
  display: none;
}

/* Tema oscuro */
body.dark-mode #floating-controls {
  --panel-bg: rgba(255,255,255,0.05);
}
